I am developing the application which use math function like cos(), sin(), atan(), sqrt() etc. I noticed the performance problem with using function from cl::sycl namespace.The performance of my application is notable worse when I am using these functions in comparison to their equivalent C++ implementation in cmath header.
What can be a problem?
- General Support
Thanks for reaching out to us!
Could you please let us know on which device you are analyzing the performance (CPU/iGPU). Also, provide your system environment details So that we would be able to investigate more.
oneAPI Basekit Version:
If possible, please provide the source code and steps to reproduce how you are analyzing the performance.
currently, I am investigating the performance of CPU code. My goal is to write a single kernel for both CPU and iGPU. Currently, I am analyzing the code by debugging and measuring the execution time. I noticed the performance problem when replacing these functions for equivalent sycl implementation.
I am no able to provide the code since it contains a lot of lines of code. But, I will try to prepare some code for you.
OS Version: Ubuntu 18.04 LTS
Device: Intel Xeon E-2176G CPU
oneAPI: Intel oneAPI DPC++ Compiler 2021.1-beta06 (2020.4.0.0415)
Thanks for providing the environment details!
Along with the code, if possible could you also please share the steps to reproduce and more details on how you are analyzing the performance.
I send two version of the same code. It is a simple example of usage standard cos() function and equivalent its sycl implementation. In the first case, the code is executed in 14 sec (main1.cpp) while the second case takes 37 seconds (main2.cpp). In the code, i am measuring the performance of the code executed for subsequent of time steps.
The compilation flags: dpcpp -O3 -g -W -Wall -pedantic -fsycl-unnamed-lambda
Could you please install the latest version of Intel OneAPI i.e 2021.2 and check whether your issue persists?
If yes, please raise a new thread mentioning all the required details. We will surely help you there.
As we have not heard back from you, we are closing this thread here. Any further interaction in this thread will be considered community only.
Have a Good day!
Thanks & Regards,