CUDA_ERROR_INVALID_PTX

Use this forum for general user support and related questions.
Post Reply
User avatar
rrubberr
Posts: 34
Joined: Sun Mar 25, 2018 5:21 am
Location: California

CUDA_ERROR_INVALID_PTX

Post by rrubberr » Mon Jul 27, 2020 9:33 am

When attempting to use LuxCore 2.4 CUDA rendering, it produced the error "CUDA_ERROR_INVALID_PTX: a PTX JIT compilation failed" :? I received this error while using NVIDIA Quadro driver version 392.58, which although not the "biggest number" driver, it is worth noting that this is a current driver, and was released as part of the NVIDIA Quadro 390 driver branch on June 24, 2020.

This driver, according to the release notes, includes CUDA 9.1, which is perhaps not supported by LuxCore 2.4 :?: Upon switching to a driver from the 418 branch which includes CUDA 10.1, this issue was resolved. This error can be resolved by switching to a different Quadro driver branch, however, I could not find a CUDA requirement listed on the LuxCore page or the 2.4 release notes. Both drivers were tested on a clean installation of Windows with Blender 2.83. If this is a requirement, it may be helpful to add it to the website (unless it is already listed and I just cannot find it).
Error printed in the Blender console.
Error printed in the Blender console.
Here are the release notes for the two driver versions:
http://us.download.nvidia.com/Windows/Q ... -notes.pdf
http://us.download.nvidia.com/Windows/Q ... -notes.pdf
HP Z620: 2x E5-2695v2, 192GB RAM, Quadro M6000 24GB

User avatar
Dade
Developer
Posts: 4496
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: CUDA_ERROR_INVALID_PTX

Post by Dade » Mon Jul 27, 2020 9:52 am

rrubberr wrote:
Mon Jul 27, 2020 9:33 am
This driver, according to the release notes, includes CUDA 9.1, which is perhaps not supported by LuxCore 2.4 :?:
Yes, v2.4 was developed with CUDA 10 and v2.5 is developed with CUDA 11 (required by Optix v7.1).
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 3681
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: CUDA_ERROR_INVALID_PTX

Post by B.Y.O.B. » Mon Jul 27, 2020 10:11 am

I have added a note about the required CUDA version to the "new in v2.4" page.
It might also be a good idea to throw a runtime error in LuxCore with a clear error message in case a driver with lower CUDA version is used for GPU rendering (if it's possible to detect this).

User avatar
Dade
Developer
Posts: 4496
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: CUDA_ERROR_INVALID_PTX

Post by Dade » Mon Jul 27, 2020 10:41 am

B.Y.O.B. wrote:
Mon Jul 27, 2020 10:11 am
It might also be a good idea to throw a runtime error in LuxCore with a clear error message in case a driver with lower CUDA version is used for GPU rendering (if it's possible to detect this).
v2.4, as far as I know, works with any (not prehistoric) CUDA version. The problem is related to the NVRTC (i.e. the CUDA runtime compiler).

We had to include the NVRTC with Lux because it is not included with NVIDIA driver. We included the one in CUDA 10. The above problem arise because the compiler generates PTX for CUDA 10 (or better) while the driver was supporting only CUDA 9.

If you replace NVRTC DLL included in Lux with the one in CUDA 9 SDK, everything should work fine.

I may be able to check the PTX version supported by the drivers but I'm not sure.
Support LuxCoreRender project with salts and bounties

User avatar
rrubberr
Posts: 34
Joined: Sun Mar 25, 2018 5:21 am
Location: California

Re: CUDA_ERROR_INVALID_PTX

Post by rrubberr » Mon Jul 27, 2020 11:03 am

Dade wrote:
Mon Jul 27, 2020 9:52 am
Yes, v2.4 was developed with CUDA 10 and v2.5 is developed with CUDA 11 (required by Optix v7.1).
This makes sense, however, at the time of writing this, the latest Quadro drivers for Windows 7 and Windows 8.1 (including server versions) is version 440, which supports only CUDA 10.2 :!: Will the same fix of replacing NVRTC work with LuxCore 2.5? If not, does installing the CUDA 11 toolkit update the system CUDA version? If not, I can simply use OpenCL rendering until an update is released by NVIDIA :D
B.Y.O.B. wrote:
Mon Jul 27, 2020 10:11 am
I have added a note about the required CUDA version to the "new in v2.4" page.
Good idea, thank you!
HP Z620: 2x E5-2695v2, 192GB RAM, Quadro M6000 24GB

User avatar
Dade
Developer
Posts: 4496
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: CUDA_ERROR_INVALID_PTX

Post by Dade » Mon Jul 27, 2020 11:21 am

rrubberr wrote:
Mon Jul 27, 2020 11:03 am
Will the same fix of replacing NVRTC work with LuxCore 2.5?
It should.
Support LuxCoreRender project with salts and bounties

Post Reply