0

I try to use the double precision extension in my OpenCL kernel but it won't build. (Cloo.BuildProgramFailureComputeException)

Here's my code:

string kernel = @"
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
kernel void ImgWarp(
    global char* img1,
    global char* img2)
    { }"

ComputeContextPropertyList Properties = new ComputeContextPropertyList(ComputePlatform.Platforms[0]);
ComputeContext context = new ComputeContext(ComputeDeviceTypes.All, Properties, null, IntPtr.Zero);
ComputeProgram program = new ComputeProgram(context, kernel);
program.Build(null, null, null, IntPtr.Zero);

I checked that my hardware supports double precision and it does. However, using the cl_amd_printf extension works. Any ideas?

Charles
  • 50,943
  • 13
  • 104
  • 142
beta vulgaris
  • 433
  • 4
  • 13

1 Answers1

0

The first thing you should do to debug this kind of problems is to get build log using clGetProgramBuildInfo with CL_PROGRAM_BUILD_LOG. There you should see some information about the problem. Did you try with cl_amd_fp64 also?

Dr. Snoopy
  • 55,122
  • 7
  • 121
  • 140