Repository navigation
Adjusted priority of python lib in cli import - #3082
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Python import path priority for the AMD SMI CLI to better support multi-ROCm installations. The change ensures that the local ROCm path is checked first when importing the amdsmi Python library, rather than defaulting to system-wide installed packages.
Changes:
- Modified
sys.path.append()tosys.path.insert(0, ...)to prioritize local ROCm path over system-wide Python packages
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
dmitrii-galantsev
force-pushed
the
amdsmi_adjust_pythonlib_priortiy
branch
from
February 5, 2026 23:37
544c60b to
1b42c75
Compare
dmitrii-galantsev
approved these changes
Feb 5, 2026
gabrpham
approved these changes
Feb 13, 2026
amd-josnarlo
pushed a commit
that referenced
this pull request
Feb 23, 2026
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
marifamd
added a commit
that referenced
this pull request
Jul 23, 2026
- the packaging rework made the CLI import site-packages first and only fall back to share/amd_smi, reversing the priority from #3082 - on a multi-version ROCm host the CLI must load the amdsmi library it shipped with, not another version's copy earlier on sys.path - resolve share/amd_smi (ROCM_PATH or CLI-relative) before importing, and fall back to site-packages only when no share copy exists Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
marifamd
added a commit
that referenced
this pull request
Jul 24, 2026
- the packaging rework made the CLI import site-packages first and only fall back to share/amd_smi, reversing the priority from #3082 - on a multi-version ROCm host the CLI must load the amdsmi library it shipped with, not another version's copy earlier on sys.path - resolve share/amd_smi (ROCM_PATH or CLI-relative) before importing, and fall back to site-packages only when no share copy exists Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
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.
Default to local ROCm pathways for multi-ROCm installations
update-alternatives