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

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

liu_wei67
Beginner
352 Views

hi:

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

thanks

0 Kudos
4 Replies
NoorjahanSk_Intel
Moderator
300 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-an...

 

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-pr...

 


>>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.

 

 

NoorjahanSk_Intel
Moderator
258 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


liu_wei67
Beginner
248 Views
NoorjahanSk_Intel
Moderator
245 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.


Reply