GPU: Unable to load PTX file
BrianHanke opened this issue · comments
MoonRay CPU is working from the command line, but I get this error when trying to enable XPU:
Warning (lib.render): GPU: Unable to load PTX file: /shaders/GPUPrograms.ptx ...falling back to CPU vectorized mode
Error: GPU: Unable to load PTX file: /shaders/GPUPrograms.ptx ...falling back to CPU vectorized mode
The shaders
folder is indeed empty. I'm running vanilla CentOS 7 with a 1070 Ti and a 1060. The GPUs are confirmed working in Karma XPU in Houdini.
While building MoonRay (Step 4: https://docs.openmoonray.org/getting-started/installation/building-moonray/building-moonray-centos-7/#step-4-build-moonray), you might want to check the output of "cmake --preset container-release" to make sure it was able to find CUDA as well as OptiX before starting the build process. Otherwise, its going to be built without GPU support and the shaders folder would then be empty.
@knightcrawler25 Aha, there is indeed a problem there:
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- No CUDA support
I've followed the build guide to the letter. How can I enable a CUDA compiler?
The simplest way (that worked for me) is to first set the path variable to where nvcc is available on your system. This will allow cmake to find CUDA:
export PATH=/usr/local/cuda/bin:${PATH}
Then make sure the complier and the cmake versions are set to the ones mentioned in the instructions:
scl enable devtoolset-9 bash
export PATH=/installs/cmake-3.23.1-linux-x86_64/bin:${PATH}
Then proceed with Step 4 of the build instructions.
Great, it's working now! Thanks a lot for the help. :)
Hi, I'm having the same error with my Arch Linux build.
moonray_gui -in scene.rdla scene.rdlb -exec_mode xpu -debug
GPU: Creating accelerator
GPU: Loading .ptx: /shaders/GPUPrograms.ptx
DEBUG (lib.render): GPU: Unable to load PTX file: /shaders/GPUPrograms.ptx ...falling back to CPU vectorized mode
Warning (lib.render): GPU: Unable to load PTX file: /shaders/GPUPrograms.ptx ...falling back to CPU vectorized mode
Error: GPU: Unable to load PTX file: /shaders/GPUPrograms.ptx ...falling back to CPU vectorized mode
GPU: Freeing accelerator
GPU: Closed database: "/var/tmp/OptixCache_adro/optix7cache.db"
GPU: Cache data size: "2.0 MiB"
00:00:00 915.9 MB | GPU setup aborted due to error:
00:00:00 915.9 MB | Unable to load PTX file: /shaders/GPUPrograms.ptx
00:00:00 915.9 MB | Falling back to CPU vector mode
My Cuda version is 12.2.0 (RTX 3090), the /opt/moonray/shaders/GPUPrograms.ptx
exists. I tested both with optix 7.3 and 7.7 (using a patch)