Hi,
i cant get a simple program running on my gpu (HD4670). (Code should be attached.) It runs on the cpu. On the gpu i get an exception from clWaitForEvents with error code -14. I installed the newest driver, here is fglrxinfo output:
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 4600 Series
OpenGL version string: 3.3.10362 Compatibility Profile Context
I tried it with different sdk's. It runs on 2.1 and 2.2 (both cpu and gpu). On 2.3 it runs only on cpu.
#define __CL_ENABLE_EXCEPTIONS #include <CL/cl.hpp> #include <iostream> #include <vector> #include <string> std::string kernel = "__kernel void test() { }"; int main(int argc, char* argv[]) { std::vector<cl::Platform> platforms; cl::Platform::get(&platforms); cl_context_properties cps[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)platforms[0](), 0 }; cl::Context context(CL_DEVICE_TYPE_GPU, cps); std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>(); cl::Program::Sources source(1, std::make_pair(kernel.c_str(), kernel.length())); cl::Program program(context, source); program.build(devices); cl::Kernel kernel(program, "test"); cl::CommandQueue queue(context, devices[0]); cl::KernelFunctor func = kernel.bind(queue, cl::NDRange(32), cl::NDRange(1)); try { func().wait(); } catch (const cl::Error& err) { std::cerr << err.what() << ' ' << err.err() << std::endl; } return 0; }
The Radeon 4XXXs have very limited OpenCL support ( for instance, they can manage one one buffer, no image support, etc... )
If you paste your kernel in SKA and you see N/A for the Radeon 4XXXs then you might have problems.
What's your kernel source, pls? Are you using images or more than one global buffer???
Well the kernel is in the source, it's the most simple kernel
std::string kernel = "__kernel void test() { }";
Try adding a single __global float* foo parameter and set it to NULL when launching the kernel. I've seen problems in the past when running kernels that have no arguments, but I can't remember if that was Brook+ or whathaveyou.
I tried it on windows with 2.3 sdk and get the same error. Adding a dummy parameter solves the problem, but it's not really a solution. I have other kernels which are more complicated and they have parameters and everything and i get the same error.
I got my hands on a HD5670 and the code works fine with it. So it must be some compatibility issue, like pulec noted. I hope someone will look into this.
nooploop,
This has been fixed. Thanks for reporting.
Originally posted by: nooploop I tried it on windows with 2.3 sdk and get the same error. Adding a dummy parameter solves the problem, but it's not really a solution. I have other kernels which are more complicated and they have parameters and everything and i get the same error.
Could you please give the test case for this issue?