Hi,
It appears that the __popcll intrinsic is not working in Optix 7.4. It’s easy enough to reproduce, in the optixHello sample change the raygen program to this:
extern "C"
__global__ void __raygen__draw_solid_color()
{
if (__popcll(params.image_width) != 1) // image_width is 512, so popc should be 1.
return;
uint3 launch_index = optixGetLaunchIndex();
RayGenData* rtData = (RayGenData*)optixGetSbtDataPointer();
params.image[launch_index.y * params.image_width + launch_index.x] =
make_color( make_float3( rtData->r, rtData->g, rtData->b ) );
}
The result image is black except for the bottom row, which is a bit odd, suggests it is working on some optix threads but not others.
It’s a bit tricky to avoid, as the optimizer will replace code with the popc intrinsic when it can, e.g. this function gets replace by a single popc instruction in the PTX and so also fails:
inline __device__ int my_popcll(unsigned long long int x)
{
int count = 0;
while (x)
{
x &= x - 1;
++count;
}
return count;
}
The release notes mentioned to watch for possible warning messages about unimplemented intrinsics, although there does not appear to be any warnings in my log.