Torch 0.3.1 undefined symbol: nvrtGetProgramLogSize + cuLaunchKernel

Hello guys! I have an issue about torch 0.3.1 import process

Here is the thing.

Local server environment does not support CUDA(only using CPU) in RHEL6.9, glibc2.12 - too old system?! lol
Anyway, to using torch framework, only torch v0.3.1 version supports my local server system.

And mixing nuitka builder to connect another job, program crashed showing below message.

[myaccount@my system]$ {program.exe}
Traceback (most recent call last):
   File "{myenvironment}/torch/__init__.py" line56, in <module torch>
ImportError: {myenvironment}/torch/_C.so: undefined symbol: nvrtGetProgramLogSize
[myaccount@my system]$

Torch forum issue reported similar problem, but I guessed it slightly differ with my situation. Anyway, I tried to search what is the problem in nvrtGetProgramLogSize

[myaccount@my system]$ readelf -s {myenvironment}/torch/_C.cpython-36m-x86_64-linux-gnu.so | grep nvrtcGetProgramLogSize
    310: 0000000000000000    0 NOTYPE GLOBAL DEFAULT UND nvrtcGetProgramLogSize
14565: 0000000000000000    0 NOTYPE GLOBAL DEFAULT UND nvrtGetProgrramLogSize

I guess above terminal message means the linker was not able to link this symbol during pytorch installation.
Is there anyone who knows that solution?

  • update!
    So far, I realized that I have to set .basrc file information about LD_PRELOAD options
[myaccount@my system]$ LD_PRELOAD={my_setting_path}/nuitka/{another}/torch/lib/* ./{exe_file}/libnvrtc-56d4825a.so.8.0.61 {exe_file}

Using LD_PRELOAD options, nvrtGetProgramLogSize message is disappeared.
However, another bug message shows.

[myaccount@my system]$ LD_PRELOAD={torch lib path}/libnvrtc-56d4825a.so.8.0.61 {exe_file}
Traceback (most recent call last):
  File "/home/vinpremkumar/20211115/ALi/nuitka/ali.dist/torch/__init__.py", line 58, in <module torch>
ImportError: /home/vinpremkumar/20211115/ALi/nuitka/ali.dist/torch/_C.so: undefined symbol: cuLaunchKernel

As you see, cuLaunchKernel undefined symbol bug message appears. Any idea?