Intel® oneAPI Base Toolkit
Support for core tools and libraries to build and deploy high-performance data-centric applications

oneAPI DPC++ vs C++ 2021

Daniel_D
Beginner
1,019 Views

Hi,
I have a question in which cases I should use oneAPI vs. C++ 2010 compiler. I understand that the classical Intel C++ 2021 compiler does not support GPU/FPCA targets, but is it save to say that I oneAPI DPC++ compiler offers everything that the classical C++ 2021 offers and more? So it is save always to use the oneAPI DPC compiler? Or are there any other points to consider which compiler to choose?

Thanks,
Daniel

0 Kudos
7 Replies
RahulV_intel
Moderator
998 Views

Hi,

 

Intel C++ compilers:

ICC (Linux), ICL (Windows) are classic Intel C/C++ Compilers. Whereas, ICX is an Intel nextgen compiler based on Clang /LLVM technology along with Intel proprietary optimizations and code generation.

 

  • You may use ICC for performance on CPU targets.
  • ICX enables OpenMP TARGET offload to Intel GPU targets.

 

Intel DPC++ compiler:

DPC++ compiler driver supports single-source cross-architecture compilation that can target CPUs, GPUs, FPGAs, and other accelerators. It is based on Clang/LLVM technology.

 

In short, if you are looking for performance on CPU targets, ICC/ICPC compiler would be an ideal choice. For OpenMP GPU offload support, you may rely on ICX/ICPX compiler. For single-source heterogenous cross-compilation (that can target CPUs, GPUs, FPGAs, etc), DPC++ is the best choice.

 

Thanks,

Rahul

 

empty
Novice
792 Views

Hi, I want to know the icx/icpx was opened source? The github version: https://github.com/intel/llvm.   It looks like just for DPC++. I have tried to install it and do not found icx/icpx.  

 

You said the underlying compiler dpcpp is ICX. We know that dpcpp and  icx/icpx all based on Clang /LLVM. So dpcpp and icx/icpx should in one source code project in my mind.

 

Did I misunderstand something?

 

 
RahulV_intel
Moderator
981 Views

Hi,


Could you let us know if your query is resolved?


Thanks,

Rahul


Daniel_D
Beginner
978 Views

Hi Rahul,

 

sorry for my late reply,

this is what I want to get. I develop an application that uses a nVidia GPU for the 'heavy' work. My plan is now to use the GPU that is build into some of the Intel CPUs for some lighter calculation that cannot put onto the CUDA device.

I use VS2019 on Windows 10 as my IDE and see these compiler from Intel:

Intel C++ 19.1
Intel C++ 19.2
Intel C++ 2021
Intel oneAPI DPC++

So I understand that the 19.x compilers are the old ICC/ICL, the 2021 is the ICX that supports Intel GPU (what I want) and DPC++ for 'heavy' GPU, FPGA etc.

 

Is that correct - I go with Intel 2021 to get the work done either with the Intel CPU or the GPU build into the Intel CPU? Would that fallback to CPU code if my application runs on a AMD?

 

Thanks,

Daniel

 

RahulV_intel
Moderator
965 Views

Hi,


>>So I understand that the 19.x compilers are the old ICC/ICL, the 2021 is the ICX that supports Intel GPU (what I want) and DPC++ for 'heavy' GPU, FPGA etc.


That's right, 19.x version compilers are the Intel classic compilers (icc/icl). ICX compiler versions begin with 2021.x.


ICX and ICC Classic use different compiler drivers. The ICC Classic drivers are icc (C compiler), icpc (C++ compiler), and icl(Windows). The ICX drivers are icx (C compiler) and icpx (C++ compiler).


ICX is the base compiler for the Intel oneAPI Data-Parallel C++ Compiler and its new driver, dpcpp. 


>>Is that correct - I go with Intel 2021 to get the work done either with the Intel CPU or the GPU build into the Intel CPU? 


For this case, you may either use the ICX compiler (with additional flags) or the DPC++ compiler driver because the underlying compiler for DPC++ is essentially ICX. DPC++ compiler driver doesn't require any additional compilation flags for Data-parallel C++ applications.


In summary,

  • For Data-Parallel C++ applications: The underlying compiler is ICX and the driver is dpcpp. 
  • For Standard C++ applications: Intel recommends using the ICC Classic production compiler and the icc/icpc/icl driver.


>>My plan is now to use the GPU that is build into some of the Intel CPUs for some lighter calculation that cannot put onto the CUDA device.


Please note that oneAPI toolkits do not support Nvidia devices. However, the GitHub version does.


DPC++ hardware requirements:

https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements...


Github version:

https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md



Thanks,

Rahul


RahulV_intel
Moderator
928 Views

Hi,


Do you have any updates on this?


Thanks,

Rahul


RahulV_intel
Moderator
906 Views

Hi,


I have not heard back from you, so I will go ahead and close this thread from my end. Intel will no longer monitor this thread. Feel free to post a new query if you require further assistance from Intel.


Regards,

Rahul


Reply