-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fixing issue #17840 #18526
base: master
Are you sure you want to change the base?
Fixing issue #17840 #18526
Changes from 12 commits
6774474
29ddefe
7627eaa
087a100
75f975b
aafaa99
84c389a
47ba73f
060a3b1
46256d4
bb8727b
1e406c7
c4dbc64
a92f500
beca3b8
2bdeb6b
d55a005
3183a90
3bb193c
dfd98a4
a578b0d
ebfc059
c75ed75
0ee8126
4c6298f
da96721
165f697
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1363,7 +1363,15 @@ int MXGetVersion(int *out) { | |
#if MXNET_USE_TVM_OP | ||
int MXLoadTVMOp(const char *libpath) { | ||
API_BEGIN(); | ||
tvm::runtime::TVMOpModule::Get()->Load(libpath); | ||
tvm::runtime::TVMOpModule *libpath_module = tvm::runtime::TVMOpModule::Get(); | ||
jinboci marked this conversation as resolved.
Show resolved
Hide resolved
|
||
libpath_module->Load(libpath); | ||
#if MXNET_USE_CUDA | ||
std::string libpathstr(libpath); | ||
std::string cubinpath = libpathstr.substr(0, libpathstr.size() - 11) + "libtvmop.cubin"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be better to pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I rewrite it in a more elegant way :)
|
||
tvm::runtime::TVMOpModule cubin_module; | ||
cubin_module.Load(cubinpath); | ||
libpath_module->Import(cubin_module); | ||
#endif | ||
API_END(); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from https://github.com/apache/incubator-tvm/blob/master/python/tvm/runtime/module.py#L136 we can see
func_binary.imported_modules
should always exist.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review. I have deleted these lines.