- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am testing the code on different devices. I tested on CPU, IntelGPU, GPGPU.
Can't run the code on GPGPU. May I know what is the problem?
My test code is as follows.
int main() { std::array<int, SIZE> myArray; for (int i = 0; i<SIZE; ++i) myArray = i; printf("Value at start: myArray[42] is %d.\n",myArray[42]); { cl::sycl::queue myQ( gpu_selector{} ); /* use defaults today; parameters possible - future topic */ std::cout << "Selected device: " << myQ.get_device().get_info<info::device::name>() << "\n"; std::cout << "-> Device vendor: " << myQ.get_device().get_info<info::device::vendor>() << "\n"; cl::sycl::range<1> mySize{SIZE}; cl::sycl::buffer<int, 1> bufferA(myArray.data(), mySize); myQ.submit([&](cl::sycl::handler &myHandle) { auto deviceAccessorA = bufferA.get_access<cl::sycl::access::mode::read_write>(myHandle); myHandle.parallel_for<class uniqueID>(mySize,[=](cl::sycl::id<1> index) { deviceAccessorA[index] *= 2; }); }); } printf("Value at finish: myArray[42] is %d.\n",myArray[42]); }
The running outputs are as follows for different devices.
Value at start: myArray[42] is 42. Selected device: Quadro P4000 -> Device vendor: NVIDIA Corporation Value at finish: myArray[42] is 42. coie@coie-HP-Z440-Workstation:~/Data/coie/Softwares/oneAPI/dpc++/module01$ make all dpcpp -O3 -std=c++14 -g -fsycl-unnamed-lambda doubler.cpp -o doubler coie@coie-HP-Z440-Workstation:~/Data/coie/Softwares/oneAPI/dpc++/module01$ ./doubler Value at start: myArray[42] is 42. Selected device: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz -> Device vendor: Intel(R) Corporation Value at finish: myArray[42] is 84. coie@coie-HP-Z440-Workstation:~/Data/coie/Softwares/oneAPI/dpc++/module01$ make all dpcpp -O3 -std=c++14 -g -fsycl-unnamed-lambda doubler.cpp -o doubler coie@coie-HP-Z440-Workstation:~/Data/coie/Softwares/oneAPI/dpc++/module01$ ./doubler Value at start: myArray[42] is 42. Selected device: Intel(R) FPGA Emulation Device -> Device vendor: Intel(R) Corporation Value at finish: myArray[42] is 84.
- Tags:
- Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CodePlay has announced they're working on an open source module that allows you to run oneAPI/Data Parallel C++ codes on NVIDIA GPUs. From the announcement:
Software developers will be able to use this implementation with Intel's® oneAPI framework to target Nvidia GPUs using any SYCL code, without any porting or special tricks required.
Here is the full news brief. Targeting early 2020, it seems like. If interested, I recommend you subscribe to their news announcements. I'll also try to post here once I have more details.
~Gergana
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you can see in the neighbor topic (842261), Nvidia GPUs are not supported yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You are trying to run the code on NVIDIA GPU which is not supported at this stage, so after running the queue it's giving the result produced on the host. DPC++ code generates SPIRV IR which is not compatible with Nvidia GPUs. On the other hand for NVIDIA GPU we need PTX as an intermediate file.
Let us know if this resolves your Issue.
-Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Currently OneAPi does not support nVidia GPU, does anyone know when it might appear ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CodePlay has announced they're working on an open source module that allows you to run oneAPI/Data Parallel C++ codes on NVIDIA GPUs. From the announcement:
Software developers will be able to use this implementation with Intel's® oneAPI framework to target Nvidia GPUs using any SYCL code, without any porting or special tricks required.
Here is the full news brief. Targeting early 2020, it seems like. If interested, I recommend you subscribe to their news announcements. I'll also try to post here once I have more details.
~Gergana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. Good suggestion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page