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

[Clang] Link ITT libraries in device code by default #16094

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

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Nov 14, 2024

Fixes: CMPLRLLVM-63157

Problem
Consider the following case:

clang++ -fsycl -c testFile.cpp -o obj1.o
clang++ -fsycl -c testFile2.cpp -o obj2.o -fsycl-instrument-device-code
clang++ -fsycl obj1.o obj2.o -o test.exe

// test.exe fails with:
JIT session error: Symbols not found: [ __itt_offload_wi_finish_wrapper, __itt_offload_wi_start_wrapper ]

This issue was observed while using MKL static libraries built with -fsycl-instrument-device-code with the latest compiler that does not link ITT annotations by default.

With this change, we link in ITT libraries by default to stays ABI compliant with the previous release. During device code linking, if the device code is not instrumented with ITT annotations, this library will be omitted. Note that, even with this change, we are not instrumenting device code with ITT annotations by default.

@uditagarwal97
Copy link
Contributor Author

@jbrodman FYI.

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.

2 participants