Skip to content

[UR][SYCL] Implement USM prefetch from device to host in SYCL runtime and UR #19437

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 40 commits into from
Aug 14, 2025

Conversation

ianayl
Copy link
Contributor

@ianayl ianayl commented Jul 14, 2025

Add the ability to control USM prefetch direction (host-to-device, device-to-host) in the enqueue_function extension:

sycl::ext::oneapi::experimental {
    enum class prefetch_type { device, host };

    void prefetch(sycl::queue q, void* ptr, size_t numBytes,
                          prefetch_type type = prefetch_type::device);
    void prefetch(sycl::handler &h, void* ptr, size_t numBytes,
                          prefetch_type type = prefetch_type::device);
}

Note:

  • There is a test failure regarding a new ABI symbol: In order to not break the ABI, I added a new handler function to represent prefetch from device-to-host. Despite the precommit failures, this should not be an ABI-breaking change and thus be okay to merge. I modified the ABI symbols tests as a part of this PR.

@ianayl ianayl changed the title [UR][SYCL] Implement USM prefetch from device to host in SYCL runtime and UR [WIP][UR][SYCL] Implement USM prefetch from device to host in SYCL runtime and UR Jul 14, 2025
@ianayl ianayl temporarily deployed to WindowsCILock July 29, 2025 16:42 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 29, 2025 19:44 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 29, 2025 20:10 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 29, 2025 20:10 — with GitHub Actions Inactive
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@ianayl ianayl requested a review from reble July 30, 2025 15:12
@ianayl
Copy link
Contributor Author

ianayl commented Jul 30, 2025

Hi @intel/unified-runtime-reviewers, mind if I get a review? Thanks in advance!

@ianayl ianayl temporarily deployed to WindowsCILock July 30, 2025 16:49 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 30, 2025 17:14 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 30, 2025 17:14 — with GitHub Actions Inactive
@ianayl
Copy link
Contributor Author

ianayl commented Aug 1, 2025

There is a UR precommit failure for CUDA: it is unrelated to the changes here.

The same test fails on latest commit of sycl as of 08/01/2025 as well, see UR CUDA precommit run from PR #19686: https://github.com/intel/llvm/actions/runs/16684666037/job/47231876973?pr=19686

@ianayl
Copy link
Contributor Author

ianayl commented Aug 12, 2025

@intel/unified-runtime-reviewers Friendly ping

@ianayl
Copy link
Contributor Author

ianayl commented Aug 13, 2025

@intel/unified-runtime-reviewers-level-zero Friendly Ping

@ianayl
Copy link
Contributor Author

ianayl commented Aug 14, 2025

@intel/sycl-graphs-reviewers Could I get another review please? Thanks!

Copy link
Member

@adamfidel adamfidel left a comment

Choose a reason for hiding this comment

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

SYCL Graph e2e test looks good.

@ianayl
Copy link
Contributor Author

ianayl commented Aug 14, 2025

@intel/llvm-gatekeepers PR ready for merge, thanks!

@sarnex sarnex merged commit 84518c1 into intel:sycl Aug 14, 2025
35 of 36 checks passed
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.

8 participants