Skip to content

[SYCL][Driver] Update fsycl-dump-device-code option name. #18605

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

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

Conversation

srividya-sundaram
Copy link
Contributor

Update -fsycl-dump-device-code option name to a more generic name like -fdump-device-code, so it can be used to save device code IR files for all offloading models, not just SYCL.

@srividya-sundaram srividya-sundaram marked this pull request as ready for review May 21, 2025 22:12
@srividya-sundaram srividya-sundaram requested a review from a team as a code owner May 21, 2025 22:12
@bader
Copy link
Contributor

bader commented May 21, 2025

How about changing "device" to "offload"? Final name: -fdump-offload-code.

@srividya-sundaram
Copy link
Contributor Author

How about changing "device" to "offload"? Final name: -fdump-offload-code.

Can we also drop "dump" from the naming and use "save" instead? -save-offload-code?

@@ -7297,7 +7297,7 @@ defm sycl_allow_device_image_dependencies: BoolOptionWithoutMarshalling<"f", "sy
PosFlag<SetTrue, [], [ClangOption], "Allow dependencies between device code images">,
NegFlag<SetFalse, [], [ClangOption], "Do not allow dependencies between device code images (default)">>;

def fsycl_dump_device_code_EQ : Joined<["-"], "fsycl-dump-device-code=">,
def fdump_device_code_EQ : Joined<["-"], "fdump-device-code=">,
Copy link
Contributor

Choose a reason for hiding this comment

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

To reduce the impact to users that are already using -fsycl-dump-device-code we should first deprecate this option and add -fdump-device-code. -fsycl-dump-device-code would then be an alias. This deprecation should also emit a diagnostic on what the preferred option name to use is. Usage would be something like what -fsycl-use-bitcode does.

@mdtoguchi
Copy link
Contributor

How about changing "device" to "offload"? Final name: -fdump-offload-code.

Can we also drop "dump" from the naming and use "save" instead? -save-offload-code?

We have other 'offload' type options (-foffload-fp32-prec-sqrt and -foffload-flto=arg for example), maybe flip it to match: -foffload-save-code

@srividya-sundaram
Copy link
Contributor Author

srividya-sundaram commented May 21, 2025

We have other 'offload' type options (-foffload-fp32-prec-sqrt and -foffload-flto=arg for example), maybe flip it to match: -foffload-save-code

I prefer -save-offload-code, similar to save-stats, save-temps.
This seems to describe the action we are trying to do, which is saving the offload code.

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.

3 participants