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

Open
wants to merge 39 commits into
base: sycl
Choose a base branch
from

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
@steffenlarsen
Copy link
Contributor

steffenlarsen commented Jul 28, 2025

@ianayl - I think you forgot to push the changes relating to my comments. No biggie, but I unresolved them just to act as a reminder to get them pushed. 😉

Seems to just be my browser not updating, for some reason. Disregard this comment!

@ianayl ianayl temporarily deployed to WindowsCILock July 29, 2025 15:45 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 29, 2025 16:42 — with GitHub Actions Inactive
@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!

Co-authored-by: Pablo Reble <pablo@reble.org>
@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

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