Skip to content

[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

Merged
merged 19 commits into from
Mar 14, 2024

Conversation

PietroGhg
Copy link
Contributor

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 processing OffloadUnbundlingJobAction, this lead to cache entries being overwritten on Native CPU, with corresponding build failures.

@PietroGhg PietroGhg requested a review from a team as a code owner March 11, 2024 14:20
@@ -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()))
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@PietroGhg PietroGhg requested a review from a team as a code owner March 11, 2024 17:50
Copy link
Contributor

@uwedolinsky uwedolinsky left a 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.

@PietroGhg
Copy link
Contributor Author

Hello @intel/llvm-gatekeepers, this looks ready to be merged, thank you

@dm-vodopyanov dm-vodopyanov changed the title [SYCL][NATIVECPU]Avoid overwriting offload kind on Native CPU [SYCL][NATIVECPU] Avoid overwriting offload kind on Native CPU Mar 14, 2024
@dm-vodopyanov dm-vodopyanov merged commit 38bb281 into intel:sycl Mar 14, 2024
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.

4 participants