OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1722 Discussions

Image2D not working correctly on GPU

Adam_S_2
Beginner
448 Views

Hi,

I encountered that strange behavior on geforce gt540m (openCL 1.1). I am using c++ api and everything is working correctly on i3 2310m (also tried on i7 and Nvidia Quadro 4000m). But when I want to use GPU it crashes on Image2D costructor (it gets through #if defined(CL_VERSION_1_2) in cl.hpp). I tried to make a workaround by using C API's both clCreateImage2D and clCreateImage and then using Image2D constructor but still no luck. Again when I use CPU everything is working. Any ideas what could be wrong?

0 Kudos
2 Replies
Raghupathi_M_Intel
448 Views

Not sure if I understood you correctly. Is it failing both on NVidia GPU and Intel's? But works on the CPU? Can you provide a reproducer?

0 Kudos
Adam_S_2
Beginner
448 Views

It works on Intel platform (with CL_DEVICE_TYPE_CPU passed while creating context using Intel platform), but it doesn't work on Nvidia platform (with CL_DEVICE_TYPE_GPU passed while creating context using Nvidia platform). Everything works with C api so I will switch to that but it still bugs me why it doesn't work with C++ api.

0 Kudos
Reply