Please add some more information about your development environment:
OS version, installed GPU(s), VRAM amount, display driver version, OptiX (major.minor.micro) version, CUDA toolkit version (major.minor) used to generate the input PTX, host compiler version.
The CUDA toolkit version number would be crucial for any NVCC or NVRTC errors like this.
1.) If that is CUDA 11.3, please try with CUDA 11.1 which is the version with which OptiX 7.3 has been built. (See the OptiX Release Notes before setting up a development environment.)
I recall issues with CUDA 11.3 in that respect and previous OptiX 7 headers. Not sure if that has been fully solved.
2.) If CUDA 11.1 also failed, try building the OptiX 7.3 SDK examples with the CMake build flag
Do the OptiX SDK example fail at runtime when that is enabled?
If yes, then the OptiX headers are still incompatible and need to be changed.
3.) If that worked, then more information would be required about how you setup your NVRTC compiler options.
It has been quite some time since I used NVRTC (before OptiX 7) and there are multiple posts on this forum which explain potential issues like selecting the wrong C++ version. Please have a look though all of these OptiX forum search results for NVRTC
I’m not what sutil has to do with that problem. You mean you’re using
getPtxFromCuString() in there?
If you can’t get that code to work in your own application then I would also assume you used the wrong NVRTC compiler options.
You’d need the CUDA includes, the OptiX SDK includes and includes to all your own headers used inside OptiX device programs there plus some options selecting the correct architecture (64 bit only!).
Note that OptiX SDK build environment hardcodes some folder names into the sample executable which means they only work where they have been built (or you need to set two environment variables). That would be important to find the samples’ *.cu and include files.
Translating *.cu to *.ptx code should otherwise be straight forward. This is how I did it in the past: https://forums.developer.nvidia.com/t/optix-compile-error-in-ptxstring/70636/2
If you need an OptiX 7 framework which is not using sutil at all, then maybe have a look into my OptiX 7 examples
*.cmake files. https://github.com/NVIDIA/OptiX_Apps