Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Precompiled header

Daniel_D
Novice
1,879 Views

Hi,

 

I try to use DPC++ for my solution (Windows11/VS2022 - latest update). I noticed that it takes extrem long to compile the complete solution. My guess is that it is because the compiler does not use precompiled headers - there is no option in the project settings to enable it (other than for MSVC and ICX).

 

Intel C++ 2023:

Daniel_D_0-1681547957666.png

 

Intel DPC++ 2023 - no Precompiled Headers:

Daniel_D_1-1681548008900.png

 

 

Is there any way to improve the compiler-performance of DPC++?

 

Thanks,

Daniel

0 Kudos
4 Replies
SeshaP_Intel
Moderator
1,827 Views

Hi,


Thank you for posting in Intel Communities.


Could you please try adding the /Yu flag in the command line options in Visual Studio properties which tells the compiler to use a precompiled header file?

Please refer to the below link for more details.

https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2023-1/yu.html


Please let us know if you still face any issues.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Daniel_D
Novice
1,814 Views

Hi Pendyala,

 

thanks for your fast reply. I added /Yu with the filename of the pch and see now this error:

5> error: Assume convergent functions was disabled in PCH file but is currently ena

bled
5> error: PCH file was compiled for the target 'x86_64-pc-windows-msvc19.35.32217' but the current translation unit is being compiled for target 'spir64-unknown-unknown'
5> 2 errors generated.
5> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel(R) oneAPI DPC++ Compiler 2023\Toolset.targets(192,5): error MSB6006: "icx-cl.exe" exited with code 1.

 

Any idea what I'm doing wrong?

 

Thanks,

Daniel

0 Kudos
SeshaP_Intel
Moderator
1,765 Views

Hi,


We were able to reproduce your issue. We are working on this internally.

We will get back to you soon.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
SeshaP_Intel
Moderator
1,658 Views

Hi,


Sorry to let you know, the error you are seeing is a bug that has existed since the initial release of the oneAPI product, we have informed the development team about it.

At present, we do not have any workarounds. We are not sure of ETA. We will let you know once the bug is fixed. 

Regarding the Precompiled Headers option in VS DPC++ project, we can also add the option in project properties once the issue is fixed in the compiler.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Reply