2011-07-18 38 views
0

我尝试在我的OpenCL内核中使用双精度扩展,但它不会生成。 (Cloo.BuildProgramFailureComputeException)Cloo中的OpenCL扩展

这里是我的代码:

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); 

我检查了我的硬件支持双精度和它的作用。但是,使用cl_amd_printf扩展工作。有任何想法吗?

回答

0

你应该做调试这类问题的第一件事是让建使用clGetProgramBuildInfo与CL_PROGRAM_BUILD_LOG日志。你应该看到关于这个问题的一些信息。你是否也尝试过使用cl_amd_fp64?