Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/tvm/relax/vm_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _vmlink(
runtime=_autodetect_system_lib_req(target, system_lib),
)
for ext_mod in ext_libs:
if ext_mod.type_key == "cuda":
if ext_mod.is_device_module:
tir_ext_libs.append(ext_mod)
else:
relax_ext_libs.append(ext_mod)
Expand Down
4 changes: 4 additions & 0 deletions python/tvm/runtime/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ def is_runnable(self):
"""
return (self.get_property_mask() & ModulePropertyMask.RUNNABLE) != 0

@property
def is_device_module(self):
return self.type_key in ["cuda", "opencl", "metal", "hip", "vulkan", "webgpu"]

@property
def is_dso_exportable(self):
"""Returns true if module is 'DSO exportable', ie can be included in result of
Expand Down