yzhliu commented on a change in pull request #18526:
URL: https://github.com/apache/incubator-mxnet/pull/18526#discussion_r438519767
##########
File path: contrib/tvmop/compile.py
##########
@@ -152,6 +152,12 @@ def get_cuda_arch(arch):
# we create libtvmop.o first, which gives us chance to link tvm_runtime
together with the libtvmop
# to allow mxnet find external helper functions in libtvm_runtime
func_binary.save(arguments.target_path + "/libtvmop.o")
+ try:
+ imported_modules
+ except NameError:
+ imported_modules = []
+ if len(imported_modules):
Review comment:
why checking `imported_modules` while actually accessing
`func_binary.imported_modules` ?
##########
File path: src/c_api/c_api.cc
##########
@@ -1363,7 +1363,13 @@ 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();
+ libpath_module->Load(libpath);
+#if MXNET_USE_CUDA
+ tvm::runtime::TVMOpModule cubin_module;
+ cubin_module.Load("libtvmop.cubin");
Review comment:
it should combine with the `libpath`, otherwise it is loading from
./libtvmop.cubin
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]