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*
603 Discussions

"loop not unrolled" warnings when using oneDPL

blinkfrog
New Contributor I
1,337 Views

Hello,

I am using the oneDPL library within the oneAPI 2024 base toolkit on a Windows system with Visual Studio. I've encountered a significant performance issue that appears to be indirectly caused by a large number of compiler warnings generated during the execution of the exclusive_scan operation on a CPU device, particularly when /O2 optimization is enabled.

 

Issue Description


Environment: Windows, Visual Studio, oneAPI 2024 base toolkit.
Operation: exclusive_scan in oneDPL.
Optimization Flag: /O2 optimization enabled.

Problem

Executing exclusive_scan generates a lot of warnings, which seem to be the primary factor in the drastic performance decrease. The repeated warning is:

`warning: parallel_backend_sycl.h:544:0: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering.`


Temporary Solution and Observations


Upon examining the file `Intel\oneAPI\dpl\2022.3\include\oneapi\dpl\pstl\hetero\dpcpp\parallel_backend_sycl.h`, I found the _ONEDPL_PRAGMA_UNROLL pragma at line #543. Commenting this line out stops these warnings and subsequently leads to a significant improvement in performance. This suggests that the performance issue is indirectly caused by the high volume of warnings rather than the unrolling process itself.

 

Inquiry


Is there an alternative approach to resolve this warning issue without directly altering the parallel_backend_sycl.h file? Are there known issues or updates regarding this behavior, or any workarounds you could recommend?

 

Attached is a VS project with reduced C++ file that reproduces this behavior, for your review and investigation.

 

Thank you for your assistance with this matter. I look forward to any guidance or updates you may provide.

0 Kudos
1 Solution
NoorjahanSk_Intel
Moderator
1,085 Views

Hi,

 

Thanks for your patience.

The issue raised by you has been targeted to be fixed in oneAPI 2024.1 version which will be released in the coming months. If the issue still persists with the new release, then you can start a new discussion for the community to investigate.

 

Please check the below Release notes for all the updates regarding the Intel oneAPI

https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-toolkit-release-notes.html

 

Please let us know if we can go ahead and close this case.

 

 

Thanks & Regards,

Noorjahan.

 

View solution in original post

5 Replies
blinkfrog
New Contributor I
1,324 Views

Additional information. It seems this depends on the set size, but with smaller buffers the warning message specifies line #522, so, in this case, it is needed to comment out the line #521.

0 Kudos
NoorjahanSk_Intel
Moderator
1,274 Views

Hi,


Thanks for posting in Intel Communities.

We are also able to reproduce the issue at our end. We have reported this issue to the concerned development team. They are looking into your issue.


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
1,086 Views

Hi,

 

Thanks for your patience.

The issue raised by you has been targeted to be fixed in oneAPI 2024.1 version which will be released in the coming months. If the issue still persists with the new release, then you can start a new discussion for the community to investigate.

 

Please check the below Release notes for all the updates regarding the Intel oneAPI

https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-toolkit-release-notes.html

 

Please let us know if we can go ahead and close this case.

 

 

Thanks & Regards,

Noorjahan.

 

blinkfrog
New Contributor I
1,069 Views
0 Kudos
NoorjahanSk_Intel
Moderator
1,037 Views

Hi,


Thanks for your confirmation.

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply