Is generating .PTX file a must?

Is there a way to prevent the app from generating external .ptx file and integrate it into .exe itself, somehow?

For example:

I have my .exe and 3 dlls (glad, glfw3, sutil_7_sdk) from optix sdk samples and I’d like the .exe without the need to have the .ptx file with it. Is it possible?

Hi qbix1414o,

One possibility is to convert your ptx files to C++ strings, and store them in your source code such as .h files , which you can build with your exe. optixModuleCreateFromPTX needs PTX string and it doesn’t care where the string comes from.

HIH,

I’ll look into that, thanks.

One more thing. What if I wanted to change the name of the generated .ptx file? I’m digging through CMake files and I just can’t find it anywhere.

Ingo Wald’s tutorials use embedded c strings to store his ptx code
https://gitlab.com/ingowald/optix7course

The tool used is bin2c.exe and can be found in the Cuda distribution bin folder

Or you can get it here.
https://www.segger.com/free-utilities/bin2c/

This helps a ton. Thank you