- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is OpenCL available on the Intel OneAPI devcloud? I'd like to test running OpenCL on Intel GPUs.
Is there any documentation on how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Elliott,
Looks like the program is unable to find opencl.h header file.
clang ocl_vecadd.c -o ocl_vecadd -lOpenCL -lm -I/opt/intel/inteloneapi/compiler/latest/linux/include/sycl/ && ./ocl_vecadd
Add the -I include path during compilation(provided above).
Let me know if it helps.
--Rahul
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Elliott,
Your question is a bit ambiguous here. Are you looking to test DPC++/sycl programs on Intel iGPUs with OpenCL as backend? Or do you want to test native OpenCL programs on Intel iGPUs?
Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was hoping to test native OpenCL programs on Intel iGPUs. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
OpenCL dynamic library(libOpenCL.so) is available by default on Devcloud.
Here's the command to compile and run a sample:
clang ocl_vecadd.c -o ocl_vecadd -lOpenCL -lm && ./ocl_vecadd
Refer to the attached code, that selects Intel OpenCL HD graphics platform(iGPU device) for the program to run. You may wish to alter the code as per your need.
--Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rahul,
I seem to be having trouble finding the OpenCL header files. Do you know what's going wrong?
$ clang ocl_vecadd.c -o ocl_vecadd -lOpenCL -lm
ocl_vecadd.c:4:10: fatal error: 'CL/opencl.h' file not found
#include <CL/opencl.h>
^~~~~~~~~~~~~
1 error generated.
$ which clang
/glob/development-tools/versions/oneapi/beta07/inteloneapi/compiler/latest/linux/bin/clang
$ clang --version
Intel(R) oneAPI DPC++ Compiler 2021.1-beta07 (2020.5.0.0604)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /glob/development-tools/versions/oneapi/beta07/inteloneapi/compiler/latest/linux/bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Elliott,
Looks like the program is unable to find opencl.h header file.
clang ocl_vecadd.c -o ocl_vecadd -lOpenCL -lm -I/opt/intel/inteloneapi/compiler/latest/linux/include/sycl/ && ./ocl_vecadd
Add the -I include path during compilation(provided above).
Let me know if it helps.
--Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rahul,
I have similar doubts.
I am building an OpenCL application using AUTOTOOLS (Autoconf, Automake etc.).
After generating the configuration file, when I am running it as follows:
"./configure CPPFLAGS=-I/opt/intel/inteloneapi/compiler/latest/linux/include/sycl/"
on the head-node, then it can fetch OpenCL header files successfully.
But on any compute node (i.e. Arria 10 PAC Compilation and Programming - RTL AFU, OpenCL), it cannot fetch the required files as /opt/intel/ is an empty directory.
Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you let me know if I can close the thread from my end since you have accepted the solution?
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If there's any more documentation on how to use OpenCL on iGPUs in the devcloud environment, I'd appreciate it.
But yes, please go ahead and close this issue.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Elliott,
I'm a technical writer supporting OpenCL. We haven't created documentation specific to using OpenCL on iGPUs in the Intel DevCloud because the application's behavior there should be the same as you'd see it on your local system.
Our lead engineer for the project had this explanation: "The Intel DevCloud is a sandbox for checking out DPC++ and Intel oneAPI on new Intel hardware. There’s a section of the DevCloud that deals with FPGA only and it might be already set up for OpenCL. [The FPGA section includes the Intel® FPGA SDK for OpenCL™ Software Technology] On oneAPI, DevCloud OpenCL is not specifically supported, though it is installed by default. Additional packages might be required in order to make OpenCL work on FPGA. I’m not sure because we’re not testing for that."
He also had this advice: "From my brief experience I highly recommend switching to DPC++, if this is an option for you. DPC++ is much easier to use for FPGA apps than OpenCL."
He recommended these resources, available on the DevCloud:
- https://devcloud.intel.com/oneapi/documentation/get-started/base-toolkit/
- https://devcloud.intel.com/oneapi/documentation/learn/job-submission/
- https://devcloud.intel.com/oneapi/get-started/
- https://devcloud.intel.com/oneapi/learn/
He also said, "The get started document will guide someone through the process of compiling and executing DPC++ code on the FPGAs currently available in the public section of the DevCloud. The documentation in the learning section of the DevCloud dashboard will provide additional details about how to request more time (up to 24h) for a job as the default 6 hours might not be enough and how to automate the execution of the code after the completion of the build."
You can also find OpenCL documentation on the Intel Developers Zone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the confirmation. Intel will no longer monitor this thread. However, this thread will remain open for community discussion.
I will speak to the concerned team regarding the OpenCL documentation. Thanks for your input.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page