Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*
583 Discussions

how to test use oneapi dpc++/c++ compiler can help my applications to run faster

liu_wei67
Beginner
781 Views

hi:

i am a novice. can show me a simple demo and process?

thanks

0 Kudos
4 Replies
NoorjahanSk_Intel
Moderator
729 Views

Hi,

 

Thanks for reaching out to us.

 

DPCPP supports applications to run on heterogeneous processors to be written using standard ISO C++ with the host and kernel code for an application contained in the same source file.

 

Please refer to the below link for more details regarding the dpc++ compiler:
https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top.html

 

DPCPP makes use of GPU to run the application faster. It selects the default device present in your system.
You can get the devices present in the system using the below command


>sycl-ls


You can also specify the device type and backend on which you wanted to run your application using the below command


>SYCL_DEVICE_FILTER=opencl:cpu
>SYCL_DEVICE_FILTER=level_zero:gpu

 

Please refer to the below link for more details:


https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-programming-model/device-selection.html

 


>>can show me a simple demo and process?

We have tried a sample vector add program using the dpcpp compiler.


You can get the samples from the below link:
https://github.com/oneapi-src/oneAPI-samples.git

 

>git clone https://github.com/oneapi-src/oneAPI-samples.git


>cd oneAPI-samples/DirectProgramming/DPC++/DenseLinearAlgebra/vector-add/


>make


>./vector-add-buffers


Please find the below screenshot for more details.

NoorjahanSk_Intel_0-1641466399461.png

 

 

Thanks & Regards,

Noorjahan.

 

 

0 Kudos
NoorjahanSk_Intel
Moderator
687 Views

Hi,

We haven't heard back from you.

Has the information provided above helped? If yes, could you please confirm whether we can close this thread from our end?


Thanks & Regards,

Noorajahan


0 Kudos
liu_wei67
Beginner
677 Views
0 Kudos
NoorjahanSk_Intel
Moderator
674 Views

Hi,


>>thank you very much. 


Thanks for the confirmation!


As this issue has been resolved, we will no longer respond to this thread.

If you require any additional assistance from Intel, please start a new thread.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply