Error: PTX .version 7.0 does not support .target sm_86

Hey there,

I am trying to run a project on RTX Ampere. Before the hardware update it was running fine but now the error:

�[1;31m>>> FATAL : OptiXDrawable::drawImplementation() optix::Exception ErrorString: <Unknown error (Details: Function “RTresult _rtContextLaunch2D(RTcontext, unsigned int, RTsize, RTsize)” caught exception: Encountered a CUDA error: ptxas application ptx input, line 10; error : PTX .version 7.0 does not support .target sm_86
ptxas fatal : Ptx assembly aborted due to errors returned (218): Invalid ptx)> ErrorCode: <0XFFFFFFFF>
�[0m

was reported on serveral machines running with Ampere. Tried to debug with gdb but didnt get useful information out of it. optixTutorial from NVIDIA-OptiX-SDK-6.5.0-linux64/SDK-precompiled-samples/ is running fine. Searched also for ptx files with sm_86, but they seam all to be sm_30. Would be nice, to get some more ideas, what to try next. Thanks in advance.

Here are my system infomations:
System: OpenSUSE 15.2
GPU: RTX 3070

Build:
CUDA Version: 10.1
OptiX Version: 6.5
built using: -m64 --use_fast_math -arch=sm_30

Runtime:
NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2

That sounds strange.
While it is correct that the SM 8.6 version is not supported by the PTX ISA version 7.0 but requires PTX ISA version 7.1, this combination should not be generated by OptiX and would be bug, but I’ve not seen any bug report about such a behavior.

If all OptiX SDK 6.5.0 samples work on your configuration, but your project doesn’t, this would require a reproducer in failing state to investigate.

From application side, CUDA toolkit 10.1 cannot generate that SM 8.6 code. It doesn’t know about Ampere SM versions.

Note that CUDA toolkits 11.x cannot generate SM 3.0 code. If you update your development environment you’d need to change the SM target to at least SM 5.0 which is already deprecated and will throw warnings which can be suppressed.

One thing you could try is updating the display driver. There is one newer version available for Linux 64-bit than 460.32 which is 460.39

Updating the driver didn’t work. Here is a minimum reproducer. If either
output_buffer[launch_index] = make_float3(0.0f, 0.0f, 0.0f);
or
output_buffer0[launch_index] = make_float4(0.0f,0.0f, 0.0f, 0.0f);
in camer.cu is outcommented, it runs without a crash.
Might be, that we reduced it too much. If so please tell us what’s missing.
optix_reproducable.tgz (2.6 KB)

Looking at your reproducer I assume you intended that to be used inside the OptiX 6.5.0 SDK examples folder?
You’re using the FindOptiX.cmake and FindCUDA.cmake and refer to a “cuda” folder.
I’m not using Linux and couldn’t get that to generate a solution or compile out of the box.

Your reproducer is trying to set the RTX execution strategy to false and that shouldn’t be done at all anymore.
Does it work when not doing any of the code between glutInitialize() and createContext()?

(In production code, I would avoid writing to float3 output buffers. See these OptiX performance guidelines )

I’ve been able to run the reproducer you shared without errors on Ubuntu 18.04 with an Ampere GPU, OptiX 6.5.0, a 460.32.03 driver, and cuda 11.2 tools.

I had to comment the find_package lines in your CMakeLists.txt, and add a line to link the GLU library. I also had to change -arch=sm_30 to -arch=sm_60 because sm_30 is not a valid option for nvcc from the CUDA 11.2 toolkit.

I only just noticed you said CUDA 10.1 for your build environment and CUDA 11.2 runtime. Which version of nvcc are you running? Maybe you have some CUDA tools in your path that you aren’t expecting, or a mismatch between versions?


David.