Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TVM version to 0.10 #77

Closed
4 tasks done
ambroise-arm opened this issue Oct 31, 2022 · 1 comment · Fixed by #80
Closed
4 tasks done

Update TVM version to 0.10 #77

ambroise-arm opened this issue Oct 31, 2022 · 1 comment · Fixed by #80
Assignees

Comments

@ambroise-arm
Copy link
Collaborator

ambroise-arm commented Oct 31, 2022

TVM v0.10.0 has been released: https://github.com/apache/tvm/releases/tag/v0.10.0

Update from the current 0.8 version.

  • Test compilation on all supported models
  • Test tuning on all supported models (some model's tuning are currently failing on 0.8)
  • Run in code for the models where it can be done (yolo_v2_tiny, baidu_cnn, lidar_centerpoint)
  • Make sure the is no API issue with the current 0.9 version of TVM used in tvm_vendor for the runtime in Autoware
@ambroise-arm ambroise-arm self-assigned this Oct 31, 2022
@ambroise-arm
Copy link
Collaborator Author

ambroise-arm commented Oct 31, 2022

Regression: baidu_cnn does't compile for Vulkan with TVM 0.10 (bisecting TVM gives apache/tvm#10423 as the culprit)

$ tvmc compile --target vulkan model_files/bcnn.onnx 
One or more operators have not been tuned. Please tune your model for better performance. Use DEBUG logging level to see more details.
Traceback (most recent call last):
  File "/usr/local/bin/tvmc", line 11, in <module>
    load_entry_point('tvm==0.10.0.dev1+gda7b48f94', 'console_scripts', 'tvmc')()
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/driver/tvmc/main.py", line 115, in main
    sys.exit(_main(sys.argv[1:]))
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/driver/tvmc/main.py", line 103, in _main
    return args.func(args)
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/driver/tvmc/compiler.py", line 180, in drive_compile
    compile_model(
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/driver/tvmc/compiler.py", line 353, in compile_model
    graph_module = build(
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/driver/tvmc/compiler.py", line 428, in build
    return relay.build(
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/relay/build_module.py", line 364, in build
    graph_json, runtime_mod, params = bld_mod.build(
  File "/usr/local/lib/python3.8/dist-packages/tvm-0.10.0.dev1+gda7b48f94-py3.8-linux-aarch64.egg/tvm/relay/build_module.py", line 161, in build
    self._build(
  File "tvm/_ffi/_cython/./packed_func.pxi", line 331, in tvm._ffi._cy3.core.PackedFuncBase.__call__
  File "tvm/_ffi/_cython/./packed_func.pxi", line 276, in tvm._ffi._cy3.core.FuncCall
  File "tvm/_ffi/_cython/./base.pxi", line 181, in tvm._ffi._cy3.core.CHECK_CALL
tvm._ffi.base.TVMError: Traceback (most recent call last):
  14: TVMFuncCall
  13: _ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16P
  12: tvm::relay::backend::RelayBuildModule::GetFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#3}::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
  11: tvm::relay::backend::RelayBuildModule::BuildRelay(tvm::IRModule, tvm::runtime::String const&)
  10: tvm::TIRToRuntime(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target const&)
  9: tvm::SplitMixedModule(tvm::IRModule, tvm::Target const&, tvm::Target const&)
  8: tvm::ApplyPasses(tvm::IRModule, tvm::transform::Sequential)
  7: tvm::transform::Pass::operator()(tvm::IRModule) const
  6: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
  5: tvm::transform::SequentialNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
  4: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
  3: tvm::transform::ModulePassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
  2: _ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjIZNS0_15TypedPackedFuncIFNS_8IRModuleES5_NS_9transform11PassContextEEE17AssignTypedLambdaIZNS_3tir9transform13MakePackedAPIEiEUlS5_S7_E_EEvT_EUlRKNS0_7TVMArgsEPNS0_11TVMRetValueEE_EEE4CallEPKS1_SF_SJ_
  1: tvm::tir::transform::MakePackedAPI(int)::{lambda(tvm::IRModule, tvm::transform::PassContext)#1}::operator()(tvm::IRModule, tvm::transform::PassContext) const [clone .isra.0]
  0: tvm::tir::MakePackedAPI(tvm::tir::PrimFunc&&, int)
  File "../src/tir/transforms/make_packed_api.cc", line 329
TVMError: Not all Vars are passed in api_args:  'blockIdx.y'  is not bound to any variables

(same on x86)

EDIT: also happens for opencl backend

Issue raised here: https://discuss.tvm.apache.org/t/model-compilation-fails-on-gpu-target/13866

EDIT: fixed by apache/tvm#13341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant