Skip to content

[Clang][Driver] Disable ITT annotations in device code by default #14910

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

Merged
merged 9 commits into from
Oct 30, 2024

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Aug 1, 2024

ITT annotations bloats the device code while offering limited benefit to the end user. That's why, this PR disables ITT annotations by default.
After this change, to enable ITT annotations, we would have to use -fsycl-instrument-device-code CLI option.

@uditagarwal97 uditagarwal97 self-assigned this Aug 1, 2024
@uditagarwal97 uditagarwal97 marked this pull request as ready for review August 1, 2024 23:04
@uditagarwal97 uditagarwal97 requested a review from a team as a code owner August 1, 2024 23:04
@uditagarwal97 uditagarwal97 requested a review from mdtoguchi August 1, 2024 23:04
@bader
Copy link
Contributor

bader commented Aug 1, 2024

ITT annotations bloats the device code while offering limited benefit to the end user.

@uditagarwal97, can you expand on that? My understanding that external tools like Intel Inspector rely on these annotations. Did you coordinate this change with oneAPI tools teams?

@uditagarwal97 uditagarwal97 marked this pull request as draft August 2, 2024 00:16
@bashbaug
Copy link
Contributor

Note, the ITT annotation functions are currently marked optnone and hence require the the SPIR-V OptNone function control bit, which not all SPIR-V consumers support. This means that disabling the ITT annotations by default will also result in more portable SPIR-V modules by default.

I agree with this change making the ITT annotations opt-in (for users that want this functionality), rather than opt-out.

@uditagarwal97 uditagarwal97 changed the title [Clang][Driver] Disable ITT annotations by default [Clang][Driver] Disable ITT annotations in device code by default Oct 2, 2024
@uditagarwal97 uditagarwal97 changed the title [Clang][Driver] Disable ITT annotations in device code by default [Clang][Driver][ABI-Break] Disable ITT annotations in device code by default Oct 28, 2024
@uditagarwal97 uditagarwal97 added the abi-break change that's breaking abi and waiting for the next window to be able to merge label Oct 28, 2024
@uditagarwal97 uditagarwal97 marked this pull request as ready for review October 28, 2024 17:20
@uditagarwal97 uditagarwal97 changed the title [Clang][Driver][ABI-Break] Disable ITT annotations in device code by default [Clang][Driver] Disable ITT annotations in device code by default Oct 28, 2024
@uditagarwal97 uditagarwal97 removed the abi-break change that's breaking abi and waiting for the next window to be able to merge label Oct 28, 2024
@uditagarwal97
Copy link
Contributor Author

Removed this change from -fpreview-breaking-changes after internal discussion

@Andy51
Copy link

Andy51 commented Oct 29, 2024

Looks good from VTune POV. ITT generally does not work for XPU kernels and even if the target device is CPU the execution is done through OpenCL so it would not have worked anyway.

Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

Just some comments on test updates - nothing blocking.

@uditagarwal97
Copy link
Contributor Author

Just some comments on test updates - nothing blocking.

Fixed in 65a6a64

Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

Thanks - LGTM

@uditagarwal97
Copy link
Contributor Author

@intel/llvm-gatekeepers the PR is ready to be merged.

@bader bader merged commit 20775ab into sycl Oct 30, 2024
13 checks passed
@bader bader deleted the udit/itt_annot branch October 30, 2024 00:19
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.

5 participants