-
Notifications
You must be signed in to change notification settings - Fork 117
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] Remove reinstation of context #983
Conversation
intel/llvm CI here intel/llvm#11617 |
e4e0491
to
8a453f8
Compare
This does more than "Remove reinstation of context", the lifetime of |
This is fine imo. There is no operation needed in the destructor and the |
I see, that's fine by me. One thing that I wonder about is the whole notion of |
I agree that the |
Yeah. I'm not married to this patch, and had kind of forgotten about it. Feel free to use it, or throw it away for something better. If you want me to rename it here, I can also do that |
I think it's no longer worth renaming the |
If the names makes more sense in Cuda and we're sticking to it in here to make things align, than I'm find with it. |
@kbenzie do you think we can make this |
60b81c0
to
ceb15d4
Compare
Same as intel/llvm#4442 but for HIP. A lot of the conversation in the linked PR isn't relevant since we now use the primary context in both HIP and CUDA.
The main reason for this change is that we don't need to reinstate the context at every
ScopedContext
destruction, since any operation that relies on having a native context set uses aScopedContext
, and doesn't rely on any sort of implicit context stack. Making this change allows us to potentially remove a single HIP API call from eachScopedContext
use.