After some refactoring of my OptiX 7.0 program, i keep getting the error: “an illegal memory access was encountered” when calling optixLaunch.
I have tried creating a pipeline with an empty raygen program, and the error persits, so i know it is not some error in my CUDA code.
I have spent quite some time already to try and debug this, but i just cant seem to make the error go away.
Running cuda-memcheck gives the following error:
========= Host API memory access error at host access to 0x7f6885e09cf8 of size 1164 bytes
========= Invalid range on access by cudaMemcopy source.
========= Saved host backtrace up to driver entry point at error
========= Host Frame:/usr/lib/x86_64-linux-gnu/libcuda.so.1 (cuMemcpyDtoDAsync_v2 + 0x219) [0x293d59]
========= Host Frame:/usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.440.26 [0x14b2bb]
========= Host Frame:/usr/lib/x86_64-linux-gnu/libnvidia-rtcore.so.440.26 [0x14bd0d]
========= Host Frame:/usr/lib/x86_64-linux-gnu/libnvoptix.so.1 [0x167998]
========= Host Frame:/usr/lib/x86_64-linux-gnu/libnvoptix.so.1 [0x72c875]
========= Host Frame:godray.8447d32d/godray [0x13f00]
========= Host Frame:godray.8447d32d/godray [0xfabb]
========= Host Frame:/lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main + 0xe7) [0x21b97]
========= Host Frame:godray.8447d32d/godray [0x1068a]
To my understanding, as i am launching with an empty raygen program, the error must be with either the pipeline or the SBT i am passing as to the optixLaunch call. But i am having a lot of trouble locating what the error is exactly.
How should i best proceed to debug the error, and what could potentially be the cause?