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

[HIP] Use context to get active device #1437

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

hdelan
Copy link
Contributor

@hdelan hdelan commented Mar 13, 2024

An event made with a native handle will not have an initialized queue, which the event uses for ur_event_handle_t::getDevice(). So it is better to get the scoped context device through the context, which is always guaranteed to be initialized.

@hdelan
Copy link
Contributor Author

hdelan commented Mar 14, 2024

intel/llvm#13020

Copy link
Contributor

@MartinWehking MartinWehking left a comment

Choose a reason for hiding this comment

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

LGTM

@hdelan hdelan added the ready to merge Added to PR's which are ready to merge label Mar 18, 2024
@hdelan hdelan force-pushed the event-wait-with-good-context branch from 0223877 to 631e1c1 Compare March 20, 2024 09:36
Copy link
Contributor

@GeorgeWeb GeorgeWeb left a comment

Choose a reason for hiding this comment

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

Good spot!

@hdelan hdelan force-pushed the event-wait-with-good-context branch from 631e1c1 to 5ac438f Compare March 28, 2024 15:30
@kbenzie kbenzie added the hip HIP adapter specific issues label Apr 3, 2024
An event made with a native handle will not have an initialized queue. So it is better
to get the scoped context device through the context, which is always guaranteed to
be initialized.
@kbenzie kbenzie force-pushed the event-wait-with-good-context branch from 5ac438f to 35a6899 Compare April 12, 2024 14:39
@kbenzie kbenzie merged commit 55cf3ba into oneapi-src:main Apr 15, 2024
53 checks passed
steffenlarsen pushed a commit to intel/llvm that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hip HIP adapter specific issues ready to merge Added to PR's which are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants