Without Nsight there are no errors as each CUDA and OptiX API is wrapped with error checking code. I tried reducing the AS to contain only a single object (made up of triangles) and removed vertex indexing as well, but had no luck.
Profiling the optixTriangle sample from the OptiX SDK works, whereas optixMeshViewer does not: a few seconds after resumiung profiling, Nsight disconnects and switches to an empty screen with the Projects dialog open. This behaviour of disconnecting is the same on half the launches of my app.
The setup is
- Nsight Compute 2021.2 on Windows 10
- CUDA 11.4 and OptiX 7.3 on Amazon Linux
End of Nsight API trace of app:
...
:,494,optixQueryFunctionTable,,OPTIX_SUCCESS(0),"(47, 0, 0x0, 0x0, 0x85b8c0, 304)",,,,
:,495,optixDeviceContextCreate,,OPTIX_SUCCESS(0),"(0x0, {0x000000000040AA20,0x0000000000000000,4,OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_OFF}, 0x7ffedb008d38{0x24c2580})",,,,
,496,optixAccelComputeMemoryUsage,,OPTIX_ERROR_INVALID_VALUE(7001),"(0x24c2580, {OPTIX_BUILD_FLAG_NONE,OPTIX_BUILD_OPERATION_BUILD,{0,0,0,0}}, {OPTIX_BUILD_INPUT_TYPE_TRIANGLES,{0x0000000004503900,8194,OPTIX_VERTEX_FORMAT_FLOAT3,0,0x7f9877418200,16384,OPTIX_INDICES_FORMAT_UNSIGNED_INT3,0,0x0,0x00007FFEDB009010,1,0x0,0,0,0}}, 1, {4237856,0,4})",,,,
Excerpt of Nsight API trace of optixTriangle:
...
:,113,optixQueryFunctionTable,,OPTIX_SUCCESS(0),"(47, 0, 0x0, 0x0, 0x6946a0, 304)",,,,
:,114,optixDeviceContextCreate,,OPTIX_SUCCESS(0),"(0x0, {0x0000000000409230,0x0000000000000000,4,OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_OFF}, 0x7ffd4dc10f18{0x223c9d0})",,,,
:,115,cudaMalloc,,cudaSuccess(0),"(0x7ffd4dc10f90{0x7f0ec7c00000}, 36)",,,,
:,116,cuMemAlloc_v2,,CUDA_SUCCESS(0),"(0x7ffd4dc10f90{0x7f0ec7c00000}, 36)",,,,
:,117,cudaMemcpy,,cudaSuccess(0),"(0x7f0ec7c00000, 0x7ffd4dc110a0, 36, cudaMemcpyHostToDevice(1))",,,,
:,118,cuMemcpyHtoD_v2,,CUDA_SUCCESS(0),"(0x7f0ec7c00000, 0x7ffd4dc110a0, 36)",,,,
:,119,optixAccelComputeMemoryUsage,,OPTIX_SUCCESS(0),"(0x223c9d0, {OPTIX_BUILD_FLAG_NONE,OPTIX_BUILD_OPERATION_BUILD,{0,0,0,0}}, {OPTIX_BUILD_INPUT_TYPE_TRIANGLES,{0x00007FFD4DC10F90,3,OPTIX_VERTEX_FORMAT_FLOAT3,0,0x0,0,OPTIX_INDICES_FORMAT_NONE,0,0x0,0x00007FFD4DC10F68,1,0x0,0,0,0}}, 1, {2432,640,0})",,,,
...
Kind regards, Jürgen.