Skip to content

fix multi gpu setup#63

Merged
meistdan merged 1 commit intoGPUOpen-LibrariesAndSDKs:mainfrom
humanx98:dev/fix-multi-gpu
Apr 15, 2026
Merged

fix multi gpu setup#63
meistdan merged 1 commit intoGPUOpen-LibrariesAndSDKs:mainfrom
humanx98:dev/fix-multi-gpu

Conversation

@humanx98
Copy link
Copy Markdown
Contributor

This PR fixes two issues that prevent HIPRT from working correctly on multi-GPU setups:

  1. An Orochi bug. A minimal fix is included here to make the root cause obvious, but the preferred upstream fix is the one from ioroDevice issue on multigpu system Orochi#135, which removes bit-field usage.
  2. An issue in the rtip31Support check. The Compiler constructor is executed before the device is assigned, so the support check happens too early.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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::Context construction and explicitly initialize the compiler afterwards.
  • Replace Compiler’s constructor-time RTIP support probe with an explicit Compiler::init() call performed by Context.
  • 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.

Comment thread hiprt/impl/Context.cpp
Comment thread contrib/Orochi/Orochi/Orochi.cpp
Comment thread hiprt/impl/Compiler.cpp
Comment thread hiprt/impl/Context.cpp
@meistdan
Copy link
Copy Markdown
Collaborator

Thank you. It looks good.

@meistdan meistdan merged commit e3c01fc into GPUOpen-LibrariesAndSDKs:main Apr 15, 2026
4 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.

3 participants