2011-07-18 33 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?