-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][NATIVECPU] Avoid overwriting offload kind on Native CPU #12971
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
[SYCL][NATIVECPU] Avoid overwriting offload kind on Native CPU #12971
Conversation
clang/lib/Driver/Driver.cpp
Outdated
@@ -9091,7 +9091,8 @@ InputInfoList Driver::BuildJobsForActionNoCache( | |||
// in this instance | |||
Action::OffloadKind DependentOffloadKind; | |||
if (UI.DependentOffloadKind == Action::OFK_SYCL && | |||
TargetDeviceOffloadKind == Action::OFK_None) | |||
TargetDeviceOffloadKind == Action::OFK_None && | |||
!isSYCLNativeCPU(C.getDefaultToolChain().getTriple(), TC->getTriple())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a test that can be updated to track the kind consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have one, I'll add it to the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdtoguchi I've updated the lit test for native cpu, I'm still looking into the CI failures in the driver lit tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix looks good to me for now. We will revisit querying for Native CPU to improve it in one of the next PRs.
Hello @intel/llvm-gatekeepers, this looks ready to be merged, thank you |
For Native CPU, the host and the device triples are the same. This means that the cache entries for
BuildJobsForAction
are distinguished only by the offload kind (-host
or-sycl
). Since the offload kind is being overwritten when processingOffloadUnbundlingJobAction
, this lead to cache entries being overwritten on Native CPU, with corresponding build failures.