Unfortunately NVidia OpenCL compiler doesn’t give you error messages what’s wrong with your code, it only crashes :angry: Change your code to become syntax right. Define volumeSampler and compilation runs fine after that.
consider this kernel :
__kernel void render(__read_only image3d_t volume)
{
const volumeSampler = CLK_FILTER_NEAREST;
// read from 3D texture
float4 voxel = read_imagef(volume, volumeSampler, (float4)(1.0f,1.0f,1.0f,1.0f));
Unfortunately NVidia OpenCL compiler doesn’t give you error messages what’s wrong with your code, it only crashes :angry: Change your code to become syntax right. Define volumeSampler and compilation runs fine after that.
consider this kernel :
__kernel void render(__read_only image3d_t volume)
{
const volumeSampler = CLK_FILTER_NEAREST;
// read from 3D texture
float4 voxel = read_imagef(volume, volumeSampler, (float4)(1.0f,1.0f,1.0f,1.0f));
Sorry for misleading you about error messages from nvidia OpenCL compiler - register callback function at clBuildProgram and in that callback function call clGetProgramBuildInfo with CL_PROGRAM_BUILD_LOG . I must have been blinded, great function!
Try to read the CL_PROGRAM_BUILD_LOG first before you change your driver to older one.
Sorry for misleading you about error messages from nvidia OpenCL compiler - register callback function at clBuildProgram and in that callback function call clGetProgramBuildInfo with CL_PROGRAM_BUILD_LOG . I must have been blinded, great function!
Try to read the CL_PROGRAM_BUILD_LOG first before you change your driver to older one.
Strange you aren’t able to read the build log. Although I sometimes end with segmentation fault in clBuildProgram I always get that info, because the callback function is called in those cases as well.
Fine you found a workaround, but it is rather strange. I wish NVidia developers answer our questions. (AMD forums are much better and there are questions quickly solved.)
Strange you aren’t able to read the build log. Although I sometimes end with segmentation fault in clBuildProgram I always get that info, because the callback function is called in those cases as well.
Fine you found a workaround, but it is rather strange. I wish NVidia developers answer our questions. (AMD forums are much better and there are questions quickly solved.)
The NVIDIA OpenCL implementation has some serious bugs in it with image objects. I personally would consider the image extension ‘beta’ in all current drivers.