fix multi gpu setup#63
Merged
meistdan merged 1 commit intoGPUOpen-LibrariesAndSDKs:mainfrom Apr 15, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses multi-GPU correctness issues by (1) fixing device encoding in the vendored Orochi layer and (2) deferring the RTIP 3.1 support probe until after a context/device is set, so the check runs against the intended GPU.
Changes:
- Set the created Orochi context as current during
hiprt::Contextconstruction and explicitly initialize the compiler afterwards. - Replace
Compiler’s constructor-time RTIP support probe with an explicitCompiler::init()call performed byContext. - Fix Orochi’s raw-device wrapping to avoid losing the device index when encoding API+device.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| hiprt/impl/Context.cpp | Sets current context during construction and triggers compiler initialization. |
| hiprt/impl/Compiler.h | Introduces init() and removes the explicit constructor declaration. |
| hiprt/impl/Compiler.cpp | Moves constructor logic into Compiler::init(). |
| contrib/Orochi/Orochi/Orochi.cpp | Fixes raw device packing by explicitly setting API and device fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
Thank you. It looks good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two issues that prevent HIPRT from working correctly on multi-GPU setups:
rtip31Supportcheck. TheCompilerconstructor is executed before the device is assigned, so the support check happens too early.