我尝试在OpenCL内核中使用双精度扩展,但它无法构建。(Cloo.BuildProgramFailureComputeException)
下面是我的代码:
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扩展是可行的。有什么想法吗?
发布于 2011-07-19 00:01:10
要调试这类问题,您应该做的第一件事就是使用clGetProgramBuildInfo和CL_PROGRAM_BUILD_LOG获取构建日志。在那里,您应该可以看到有关该问题的一些信息。你也尝试过cl_amd_fp64吗?
https://stackoverflow.com/questions/6731580
复制相似问题