with tvm.transform.PassContext(opt_level=2):
graph, lib, params = relay.build(mod, target="rocm", params=None)
to build with “ROCM” as target. Till here i was able to run the code.
But when i export the library using
lib.export_library("lib.so", fcompile=False)
i get following error:
Traceback (most recent call last):
File "tvm_half_test.py", line 33, in <module>
lib.export_library("lib.so", fcompile=False)
File "/home/user/pim-workspace/rib_tvm/tvm/python/tvm/runtime/module.py", line 503, in export_library
modules = self._collect_dso_modules()
File "/home/user/pim-workspace/rib_tvm/tvm/python/tvm/runtime/module.py", line 440, in _collect_dso_modules
return self._collect_from_import_tree(lambda m: m.is_dso_exportable)
File "/home/user/pim-workspace/rib_tvm/tvm/python/tvm/runtime/module.py", line 429, in _collect_from_import_tree
), f"Module {module.type_key} should be either dso exportable or binary serializable."
AssertionError: Module hip should be either dso exportable or binary serializable.
Could anyone please point me right direction for this issue?
thanks
Hi, @yogeesh. That seems odd to me since ROCMModuleNode is set as binary serializable correctly.
Would you check if you are failing at ROCMModuleNode and how their module property is set?
I don’t have AMD machine so I couldn’t reach where you are at unfortunately.
Build failed because of missing rocm-related dependency.
File "/home/ubuntu/tvm/python/tvm/contrib/rocm.py", line 171, in callback_rocm_bitcode_path
raise RuntimeError("could not find bitcode " + n)
RuntimeError: could not find bitcode oclc_daz_opt_on
hi @junrushao , @sunggg
i was able to rectify the issue by returning the property mask for rocm asdso_exportable. I was wondering if it was actually missing in tvm , but as @tqchen mentioned it has been fixed, i will pull the latest.
thanks