The ptx code works on two other computers, but on a slightly different setup and Optix version it crashes.
The cuda error is:
terminating due to uncaught exception of type CudaException: CUDA error on synchronize with error 'an illegal memory access was encountered'
Here is the cuda code:
uint p0_1 = (F32_asuint(((&ctrl_pt_3)->t_1)));
uint p1_1 = (F32_asuint(((&ctrl_pt_3)->dirac_0.x)));
uint p2_1 = (F32_asuint(((&ctrl_pt_3)->dirac_0.y)));
uint p3_1 = (F32_asuint(((&ctrl_pt_3)->dirac_0.z)));
uint p4_1 = (F32_asuint(((&ctrl_pt_3)->dirac_0.w)));
uint tri_1 = (F32_asuint(((U32_asfloat((last_tri_1))))));
float _temp1_1 = {};
uint p6_1 = (F32_asuint((_temp1_1)));
float _temp2_1 = {};
uint p7_1 = (F32_asuint((_temp2_1)));
optixTrace(
(globalParams_0->traversable_0),
(origin_0),
(direction_1),
((F32_abs((prev_t_1)))),
(globalParams_0->tmax_0),
0.0f, // rayTime
OptixVisibilityMask( 255 ),
OPTIX_RAY_FLAG_NONE,
0, // SBT offset
0, // SBT stride
0, // missSBTIndex
(p0_1), (p1_1), (p2_1), (p3_1), (p4_1), (tri_1), (p6_1), (p7_1)); // payload
I have AB tested removing the code right before the optixTrace to see if the segfault occurs there, but it does not seem to.
I did notice this strange asm code that the cuda code is generating.
call(%r72,%r73,%r74,%r75,%r76,%r77,%r78,%r79,%r80,%r81,%r82,%r83,%r84,%r85,%r86,%r87,%r88,%r89,%r90,%r91,%r92,%r93,%r94,%r95,%r96,%r97,%r98,%r99,%r100,%r101,%r102,%r103),_optix_trace_typed_32,(%r239,%rd142,%f30,%f31,%f32,%f1,%f2,%f3,%f292,%f701,%f702,%r105,%r239,%r239,%r239,%r239,%r110,%r111,%r252,%r251,%r250,%r249,%r254,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239,%r239);
I’ve tried commenting out the closest hit, anyhit, and miss programs, and I still get the error. Maybe the issue could be that the pointers to memory for the GAS are NULL? Would that only show up when I call optixTrace?