Skip to content

[BLAS] Remove queue from host_task_internal API #678

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 2 commits into from
May 20, 2025

Conversation

EwanC
Copy link
Contributor

@EwanC EwanC commented May 16, 2025

A sycl::queue object is passed to the host_task_internal function as a parameter and used when interacting with a object CublasScopedContextHandler. However, the interop_handle parameter that is also passed to this entry-point and CublasScopedContextHandler constructor is already able to get this information via interop_handle::get_native_queue().

This patch removes the superfluous queue parameters and changes the CublasScopedContextHandler:get_stream() implementation to use the interop_handle method instead. The unused get_context() and wait_stream methods are also removed from CublasScopedContextHandler

@EwanC EwanC marked this pull request as ready for review May 16, 2025 11:49
@EwanC EwanC requested a review from a team as a code owner May 16, 2025 11:49
A `sycl::queue` object is passed to the `host_task_internal` function
as a parameter and used when interacting with a object
`CublasScopedContextHandler`. However, the `interop_handle` parameter
that is also passed to this entry-point and `CublasScopedContextHandler`
constructor is already able to get this information via
`interop_handle::get_native_queue()`.

This patch removes the superfluous queue parameters and changes the
`CublasScopedContextHandler:get_stream()` implementation to use
the `interop_handle` method instead. The unused `get_context()` method
is also removed.
@EwanC EwanC force-pushed the remove_cublas_native_queue branch from 57004e5 to 6014f17 Compare May 16, 2025 12:10
Copy link
Contributor

@Rbiessy Rbiessy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@rafbiels rafbiels left a comment

Choose a reason for hiding this comment

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

Nice, I like this change! Could you do the same for the AdaptiveCpp code path? I can help with testing if needed, let me know.

@Rbiessy Rbiessy requested a review from a team May 20, 2025 12:28
Copy link
Contributor

@andrewtbarker andrewtbarker left a comment

Choose a reason for hiding this comment

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

This is a nice simplification, thanks for the changes.

@Rbiessy Rbiessy merged commit f09d6cb into uxlfoundation:develop May 20, 2025
10 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.

4 participants