cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

walkershaw
Journeyman III

CPU device openCL c version issue

hi all,

        I installed the latest AMD driver to support OpenCL  2.0. The samples work fine. However, when I check the clinfo, I found that my CPU device OpenCL C version is 1.2, while OpenCL 2.0 for my GPU.  Does anything go wrong or it is normal? 

        As OpenCL support SVM, so I expect CPU and GPU to have same global memory size, however in clinfo, they don't. Is this caused by different OpenCL C version?

0 Likes
1 Solution
dipak
Big Boss

Currently, AMD CPUs do not support OpenCL 2.0, so they are not listed as OpenCL 2.0 supported devices in the clinfo output.

View solution in original post

0 Likes
8 Replies
dipak
Big Boss

Currently, AMD CPUs do not support OpenCL 2.0, so they are not listed as OpenCL 2.0 supported devices in the clinfo output.

0 Likes

that's a pity. so my cpu can't access the memory created by clSVMAlloc, right?

0 Likes

Any SVM buffer created by clSVMAlloc are shared by the host and all devices in an OpenCL context that support shared virtual memory. Being the host, cpu can access that buffer.

0 Likes

thanks again.

0 Likes

Hi,

   Sorry to bother, but I met some problem in using clSVMAlloc. My context includes a GPU, and I allocate a SVM buffer with the context by using clSVMAlloc. However, CPU can't access the buffer in the host code, it returns segmentation fault. The interesting thing is that if i create the context with CPU instead of GPU, everything is fine, and the host can access the SVM buffer. Can you help me out? It drives me crazy. Thanks.

0 Likes

Try clEnqueueSVMMap before updating on host. Moreover, you may check the SVM samples from APP SDK to see whether they are working or not. If they work, please try to compare your code with the sample ones to figure out the possible problem. If nothing helps, please provide your code and mention the setup details.

Regards,

0 Likes

Thanks, I just forgot to use map and unmap. BTW, I use the pointer returned by clSVMAlloc to create cl_mem object so that the buffer is also shared. However, the cpu device seems to be  able to access the cl_mem object, too.  The cpu device isn't updated to opencl 2.0, so it can't use SVM feature, why nothing goes wrong? Thanks.

0 Likes

Could you please explain the code flow in more detail especially about the device selection, context creation and SVM allocation and sharing? Also, what is the setup - dGPU or APU ?

Regards,

0 Likes