-
Notifications
You must be signed in to change notification settings - Fork 6.8k
dynamic load libnvrtc.so #17858
Comments
I agree it makes sense to |
@mxnet-label-bot add [bug] |
Hi @mseth10, do you think the utilities that you introduced in dynamic library loading support PR could be used for this? |
Hi @ptrendx if you need a generic dlopen for this, I'll suggest using ctypes CDLL. |
But that would be just for Python then, right? I would need it to call functions from C++ and the load_lib function from your PR seems like it already handles all the differences in OSs and stuff. |
Sorry, I thought you were referring to the python api introduced by the PR. That has a lot of additional functionality. |
I thought about this and the real problem seems to actually be |
@ptrendx yes |
Description
Compiling MXNet with
nvrtc
support dynamically linkslibcuda.so
. However,libcuda.so
is part of the cuda driver and not typically available on cpu machines. This means, on cpu machineslibmxnet.so
will have missing dependencies and can't be loaded.Unfortunately, parts of MXNet compilation require to
dlopen(libmxnet.so)
. In particularOpWrapperGenerator.py
for the cpp package. This breaks compiling mxnet with nvrtc + cpp-package on cpu machines (as used by our CI).As a workaround, the stub driver can be added to
LD_LIBRARY_PATH
. A better solution may be todlopen
libnvrtc and thereby drop the dependency onlibcuda.so
.CC: @ptrendx
References
The text was updated successfully, but these errors were encountered: