-
Notifications
You must be signed in to change notification settings - Fork 116
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
[CUDA][HIP] Associate queue with device in context #1992
[CUDA][HIP] Associate queue with device in context #1992
Conversation
This is a weird case and maybe we need to consider what the expectation from the UR API is. In the L0 adapter it just picks the first device in the platform, not even caring if it is actually in the context. |
I think that's a good idea. I am inclined to think that we shouldn't allow the
That seems bad. |
Could we separate the discussion about multi-device context from this single-device context fix? This PR brings back the (relatively uncontroversial) behaviour broken recently and we have a customer waiting for this fix. |
Good idea. Sorry I have been sleeping on this one. I'll make an issue about this question and then hopefully we can merge this. |
Ping @steffenlarsen are you happy to continue discussion about this entry point in the linked issue? If so are you happy with this as a quick-fix change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let's do it!
Making a native queue doesn't require hDevice to be non null, but this associates the queue with a null device, even if hContext contains valid devices. This fixes the behaviour for a single device context, making the queue be associated with the only device in the context. But there is a question mark over whether this entry point makes sense for a multi device UR context. Should we be able to construct a queue with a native queue without knowing what the UR device associated with the queue is? Probably not.
2b95c9f
to
15408ff
Compare
Making a native queue doesn't require hDevice to be non null, but this associates the queue with a null device, even if hContext contains valid devices.
This fixes the behaviour for a single device context, making the queue be associated with the only device in the context. But there is a question mark over whether this entry point makes sense for a multi device UR context. Should we be able to construct a queue with a native queue without knowing what the UR device associated with the queue is? Probably not.