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

[SYCL][CUDA] Fix flaky interop task test #17161

Closed
wants to merge 1 commit into from

Conversation

npmiller
Copy link
Contributor

In host tasks, Q.wait() doesn't wait on interop asynchronous work, it simply waits on the lambba being executed.

So for correct execution the CUDA stream must be waited on inside of the lambda.

This made the test flaky because in some cases the copies had been completed before being checked, and in some cases they hadn't, this extra wait fixes that.

Fixes #17026

In host tasks, `Q.wait()` doesn't wait on interop asynchronous work, it
simply waits on the lambba being executed.

So for correct execution the CUDA stream must be waited on inside of the
lambda.

This made the test flaky because in some cases the copies had been
completed before being checked, and in some cases they hadn't, this
extra wait fixes that.
@npmiller
Copy link
Contributor Author

Actually looking at this again all the CUDA calls are synchronous so it shouldn't need an extra sync, it might still help but it's likely not the root cause of the issue

@npmiller npmiller closed this Feb 27, 2025
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.

HostInteropTask/interop-task-cuda-buffer-migrate.cpp fails flakily on unrelated changes
2 participants