Community
cancel
Showing results for 
Search instead for 
Did you mean: 
H__Kamil
Beginner
250 Views

Performance problem with sycl math functions

Hi,

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? 

Best regards,
Kamil

Tags (1)
0 Kudos
7 Replies
GouthamK_Intel
Moderator
250 Views

Hi Kamil,

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.

OS Version:

Device

oneAPI Basekit Version

If possible, please provide the source code and steps to reproduce how you are analyzing the performance. 

 

Thanks

Goutham

H__Kamil
Beginner
250 Views

Hi,

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)

GouthamK_Intel
Moderator
250 Views

Hi Kamil,

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.

 

Thanks

Goutham

H__Kamil
Beginner
250 Views

Hi,

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

Best regards,
Kamil

H__Kamil
Beginner
250 Views

Hi,


do you have any ideas how to solve my problems ? :)


Kamil

226 Views

Hi Kamil,

Can you check the performance with Beta08?

 

Regards,

Subarna


GouthamK_Intel
Moderator
4 Views

Hi Kamil,

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,

Goutham


Reply