Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UR][OPENCL] Eliminate usage of regex in opencl #1039

Merged

Conversation

omarahmed1111
Copy link
Contributor

Usage of regex was downgrading the performance of opencl adapter strongly. Using Intel PIN tool, querying the total number of instructions using a custom pin tool, it reported that the affective number of instructions that was executed from inside libpi_opencl.so to run simple-sycl-app was 269469 which is an order of magnitude higher than any other adapter. Analyzing this, most of these instructions was generated from the regex library. This was also definetly have a strong effect on the runtime performance of sycl-opencl applications.

The changes in this PR will decrease the effective number of instructions executed in opencl adapter to ~12000 which is a reasonable number comparing it to other adapters (all are in the range of 10000 - ~20000).

@omarahmed1111
Copy link
Contributor Author

Intel/llvm testing here

@omarahmed1111 omarahmed1111 force-pushed the eliminate-usage-of-regex-in-opencl branch from 891ae49 to 2af233a Compare November 8, 2023 12:39
source/adapters/opencl/common.hpp Outdated Show resolved Hide resolved
source/adapters/opencl/kernel.cpp Show resolved Hide resolved
@omarahmed1111 omarahmed1111 force-pushed the eliminate-usage-of-regex-in-opencl branch from 2af233a to 02e8f48 Compare November 8, 2023 15:33
@omarahmed1111 omarahmed1111 force-pushed the eliminate-usage-of-regex-in-opencl branch from 02e8f48 to 63dfb35 Compare November 8, 2023 15:35
Copy link
Contributor

@fabiomestre fabiomestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kbenzie kbenzie merged commit 0250c64 into oneapi-src:adapters Nov 24, 2023
48 checks passed
kbenzie added a commit that referenced this pull request Nov 28, 2023
…in-opencl

[UR][OPENCL] Eliminate usage of regex in opencl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants