Skip to content

[clang][SYCl] Transfer opt level to clang target options #18470

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

Draft
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

omarahmed1111
Copy link
Contributor

@omarahmed1111 omarahmed1111 commented May 14, 2025

Currently, without transferring the opt level to clang target options if we called:

clang -O3 -fsycl -fsycl-targets=nvptx64-nvidia-cuda a.cpp -o b

it will not transfer this -O3 to the clang command underneath that compiles the nvptx kernels:

clang -cc1 -triple nvptx64-nvidia-cuda ...

This PR would make it more consistent by explicitly transfer driver opt level called to CC1 args:

clang -cc1 -triple nvptx64-nvidia-cuda -O3 ...

The PR also make -O3 the default opt level.

@omarahmed1111 omarahmed1111 force-pushed the transfer-opt-level-to-clang-target-options branch from a9796d4 to 63f3e57 Compare May 14, 2025 16:31
@omarahmed1111 omarahmed1111 force-pushed the transfer-opt-level-to-clang-target-options branch from 63f3e57 to 81813a1 Compare May 14, 2025 16:33
@omarahmed1111 omarahmed1111 force-pushed the transfer-opt-level-to-clang-target-options branch from 81813a1 to 082f04b Compare May 14, 2025 16:35
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.

1 participant