I'm just trying to dive into OpenCL 2.0. I'm using an AMD R7 260X GPU with AMD APP SDK 3.0 (final) with most current driver (Crimson-something, 2348.4) on Win10-64 with 16GB RAM. Compiler is Visual Studio 2015.
First thing I did was querying some information on my system with clInfo. Output was as expected, especially the device OpenCL C Version:
Platform Name: AMD Accelerated Parallel Processing
Number of devices: 2
Device Type: CL_DEVICE_TYPE_GPU
Vendor ID: 1002h
Board name: AMD Radeon R7 200 Series
Platform ID: 00007FFE91EF0188
Name: Bonaire
Vendor: Advanced Micro Devices, Inc.
Device OpenCL C version: OpenCL C 2.0
Driver version: 2348.4
Profile: FULL_PROFILE
Version: OpenCL 2.0 AMD-APP (2348.4)
Next thing was playing around with some of the samples from AMD APP SDK. Quickly I noticed, an OpenCL 2.0 didn't execute properly. I stepped through the code and noticed a function, which is gathering device information with clGetDeviceInfo. At this point, the reported device OpenCL C version (see screenshot 1) differs from what I got from clInfo, and therefore, the samples, which requires OpenCL 2.0 don't execute.
What did I do wrong?
clGetDeviceInfo
Switching from target platform Win32 to x64 strangely resolved the problem for me. clGetDeviceInfo reports now OpenCL 2.0 capabilities for my GPU.
Related
I am trying to get started with some OpenCL coding.
I've installed the NVidia CUDA OpenCL on my computer and have managed to build a simple "Hello World!" application using Visual Studio 2017.
I have also installed the Intel OpenCL SDK (installation warned me that I needed to update my OpenCL drivers but the Intel update manager was telling me that everything was up to date, so I'm not sure whether this could be an issue).
Now whenever I query the OpenCL platforms on my PC lie so:
std::vector< cl::Platform > platformList;
cl::Platform::get(&platformList);
I only get back my nVidia openCL platform, with my GPU as the only device. I am not getting anything back for my CPU.
Can anyone help? Is it possible to perform both CPU and GPU OpenCL computations in the same project (In different OpenCL contexts? How would I go about doing this?
Seems that Intel GPU driver was not installed properly. You can install a CPU-only package instead:
https://software.intel.com/en-us/articles/opencl-drivers#latest_CPU_runtime
I am using Beignet to try out OpenCL on my notebook with a 4th gen i7 and integrated graphic accelerator, running Ubuntu 16.04
Upon running clinfo I only find 1 platform and 1 device, which is the graphic accelerator.
Should I not find also the CPU itself? As I have read that OpenCL allows to use the host as a normal device and run some kernels on it
Beignet does not include an ICD for Intel CPUs, it's only for the integrated GPU:
Beignet is an open source implementation of the OpenCL specification - a generic compute oriented API. This code base contains the code to run OpenCL programs on Intel GPUs which basically defines and implements the OpenCL host functions required to initialize the device, create the command queues, the kernels and the programs and run them on the GPU.
(from the official beignet webpage)
You need to install the intel ICD, since there appears to not be an open source OCL implementation for intel CPUs.
I've got an AMD FX-8350 CPU and a NVIDIA GeForce GTX 960 GPU on a PC with OpenSUSE Leap x86_64. I want to work with CUDA and OpenCL on it, so I first installed Cuda Toolkit 7.5. That worked fine.
Then, I installed AMD APP SDK 3.0, because I want to work OpenCL on the AMD CPU. That worked fine, it seems. $AMDAPPSDKROOT echoes /opt/AMDAPPSDK-3.0 and $LD_LIBRARY_PATH echoes /opt/AMDAPPSDK-3.0/lib/x86_64/.
After that, I compiled and ran a basic deviceQuery code (basically this one, but modified to show platform name) with the following command:
gcc -L$AMDAPPSDKROOT/lib/x86_64/ -I$AMDAPPSDKROOT/include anotherDeviceQuery.c -lOpenCL
The code compiles and executes, but the output only shows the NVIDIA GPU info.
Platform NVIDIA CUDA found.
1. Device: GeForce GTX 960
1.1 Hardware version: OpenCL 1.2 CUDA
1.2 Software version: 352.39
1.3 OpenCL C version: OpenCL C 1.2
1.4 Parallel compute units: 8
I can't seem to find any solution. What could the problem be?
According to this web page, your AMD CPU FX-8350 is not supported by the AMD APP SDK 3.0 (OpenCL 2.0).
All the devices listed there are either GPUs or CPUs with an integrated graphics core (APU). So, I would not expect that your CPU-only will be supported in the near future, because OpenCL is mainly designed to run kernel code on the faster GPU (part).
My laptop hardware information is as follows:
OS: Windows 7 Professional Service Pack 1
CPU: Intel(R) Core(TM) i7-3540M CPU # 3.00 GHz
RAM: 16,0 GB
Graphics: Intel(R) HD Graphics 4000
When I try to install Intel SDK for OpenCL Application 2014 setup, it gives the following error.
Would you please help me out in this problem ?
Thanks in advance..
The answer from Dithermaster is correct. I would add comment to that answer, but currently I cannot due to reputation score limitation. Your processor is 3rd Generation Intel® Core™ Processors with Intel® HD Graphics 4000, so you need to install corresponding driver. The latest one is 15.33.30.64.3958. The only concern is that sometimes laptop manufacturers provide their own customized version of the Gfx driver and prohibit installation of the generic one. In this case you might try to install OpenCL runtime for CPU only.
My advice is to follow the link and install a newer driver. The SDK doesn't include the latest driver anymore; they are installed separately. The SDK is the headers and whatnot that you need for development; the driver provides the runtime.
I've build a simple OpenCL based program (in C++) and tested in on Windows 8 system with AMD FirePro V4900 card. I was using AMD APP SDK.
When I copy my binaries to the other machine (Windows 8 with NVIDIA Quadro 4000 card) I get
"The procedure entry point clReleaseDevice couldn't be located in the dynamic linked library (exe of my program)". This second machine has the latest NVIDIA drivers and CUDA 5 installed.
Any ideas on what to I need to make it work with NVIDIA hardware?
Its an OpenCL 1.1 vs 1.2 version issue. Nvidia are STILL on OpenCL version 1.1. You have used AMD's OpenCL 1.2. To get and OpenCL app that works on both systems need to remove your clReleaseDevice API call and other 1.2 calls and recompile using the AMD SDK with the 1.1 version option.