Repository navigation
revert(amdsmi): revert the Python packaging rework (#7913, #7914) - #9339
Merged
Merged
Conversation
Reverts the manylinux wheel CI job (#7913) and the Python packaging rework (#7914): flat loader, dist-packages install, and wheel build. Restores the pre-rework loader in amdsmi_wrapper.py / tools/generator.py, the pip-based DEBIAN/RPM install scriptlets, and setup.py.in; removes pin_shebang.cmake, tools/disable_system_fallback.py, and tests/python/test_abi_compat.py. Accounts for changes that landed on develop after the rework merged: - Keeps the libamd_smi.so.27 SONAME and its CHANGELOG entry from the 27.0.0 version bump. The restored loader hardcoded the SONAME, so the literal is bumped from .so.26 to .so.27 in both generator.py and the regenerated wrapper to match AMDSMI_LIB_VERSION_MAJOR. - Keeps the ras --cper --json no-entries fix (#8819) and its CHANGELOG entry; only the rework's own CHANGELOG entry is removed. Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
The pre-rework loader hardcodes the system-fallback SONAME. After the revert restores it, bump the literal from libamd_smi.so.26 to libamd_smi.so.27 in the generator template and the regenerated wrapper so it matches AMDSMI_LIB_VERSION_MAJOR (bumped to 27 on develop after the rework merged). Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
WBobby
approved these changes
Jul 27, 2026
WBobby
left a comment
Collaborator
There was a problem hiding this comment.
Need to revert to fix TheRock bump ROCm/TheRock#6897
…lure The CI summary scanned amd-smi command logs for the substring "Error code:" and marked the command failed. Under --loglevel debug the CLI prints that string for unsupported-feature paths (e.g. a missing vclk reading), so metric was reported as a non-fatal failure on hardware that ran the command successfully. Match only a same-line "Error code: <rc>" (space + digit), which is what the workflow appends on a real non-zero exit; the CLI wraps its status code onto the next line, so it no longer trips the scanner. Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
lamikr
pushed a commit
that referenced
this pull request
Jul 28, 2026
Relands the manylinux wheel CI job (#7913) and the Python packaging rework (#7914) after they were reverted in #9339, together with the follow-up amd-smi CLI shebang fixes so the rework and its corrections land as one change. Packaging rework (reintroduced): - Install the amdsmi module into the system python's site-packages via install(DIRECTORY) instead of pip + a .pth file; drop the pip plumbing and python3-pip/setuptools/wheel deps from the DEBIAN/RPM scriptlets. - Replace the ROCm-path-walking resolver in amdsmi_wrapper.py (and tools/generator.py, regenerated in lockstep) with a flat loader: AMDSMI_LIB_OVERRIDE, a bundled libamd_smi_python.so, then the system libamd_smi.so; a _MissingLibrary sentinel keeps import tolerant. - Add BUILD_PYTHON_WHEEL (default OFF): build a SONAME-isolated libamd_smi_python.so and a wheel that disables the loader's system fallback. - Stage the module under share/amd_smi for ROCM_PATH consumers and TheRock. - Add test_abi_compat.py and the manylinux wheel CI job. CLI shebang fixes: - Use a portable "#!/usr/bin/env python3" shebang for the amd-smi CLI so it runs on relocatable installs with no /usr/bin/python3 (TheRock containers) and on wheel runners where /usr/bin/python3 lacks the amdsmi module. - Stop pinning the CLI shebang to a fixed interpreter: remove pin_shebang.cmake and the AMDSMI_CLI_SHEBANG_INTERP derivation. The pinned absolute path became a hard RPM "Requires:" (e.g. /usr/libexec/platform-python3.6) that RHEL10 and SLES16 could not satisfy; the RPM now depends only on python(abi). - Resolve the env-form shebang in the install-verify harness instead of running "/usr/bin/env -c". Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
marifamd
added a commit
that referenced
this pull request
Aug 8, 2026
Relands the manylinux wheel CI job (#7913) and the Python packaging rework (#7914) after they were reverted in #9339, together with the follow-up amd-smi CLI shebang fixes so the rework and its corrections land as one change. Packaging rework (reintroduced): - Install the amdsmi module into the system python's site-packages via install(DIRECTORY) instead of pip + a .pth file; drop the pip plumbing and python3-pip/setuptools/wheel deps from the DEBIAN/RPM scriptlets. - Replace the ROCm-path-walking resolver in amdsmi_wrapper.py (and tools/generator.py, regenerated in lockstep) with a flat loader: AMDSMI_LIB_OVERRIDE, a bundled libamd_smi_python.so, then the system libamd_smi.so; a _MissingLibrary sentinel keeps import tolerant. - Add BUILD_PYTHON_WHEEL (default OFF): build a SONAME-isolated libamd_smi_python.so and a wheel that disables the loader's system fallback. - Stage the module under share/amd_smi for ROCM_PATH consumers and TheRock. - Add test_abi_compat.py and the manylinux wheel CI job. CLI shebang fixes: - Use a portable "#!/usr/bin/env python3" shebang for the amd-smi CLI so it runs on relocatable installs with no /usr/bin/python3 (TheRock containers) and on wheel runners where /usr/bin/python3 lacks the amdsmi module. - Stop pinning the CLI shebang to a fixed interpreter: remove pin_shebang.cmake and the AMDSMI_CLI_SHEBANG_INTERP derivation. The pinned absolute path became a hard RPM "Requires:" (e.g. /usr/libexec/platform-python3.6) that RHEL10 and SLES16 could not satisfy; the RPM now depends only on python(abi). - Resolve the env-form shebang in the install-verify harness instead of running "/usr/bin/env -c". 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.
Reverts PR: #7914 , #7913
Description
Reverts the AMD SMI Python packaging rework: the manylinux wheel CI job (#7913) and the packaging rework (#7914, flat loader, dist-packages install, wheel build).
The revert accounts for changes that landed on
developafter the rework merged:libamd_smi.so.27SONAME and its CHANGELOG entry from the 27.0.0 version bump. The restored pre-rework loader hardcodes the SONAME, so the literal is bumped from.so.26to.so.27intools/generator.py(the template) and the regeneratedamdsmi_wrapper.pyto matchAMDSMI_LIB_VERSION_MAJOR.ras --cper --jsonno-entries fix (fix(amdsmi): emit valid JSON for ras --cper --json with no entries #8819) and its CHANGELOG entry; only the rework's own CHANGELOG entry is removed.Restores the pre-rework loader, the pip-based DEBIAN/RPM install scriptlets, and
setup.py.in; removespin_shebang.cmake,tools/disable_system_fallback.py, andtests/python/test_abi_compat.py.Verification
make -j: 0 errors,libamd_smi.so.27andamdsmitstbuiltamdsmi_wrapper.pyimports and loadslibamd_smi.so.27JIRA ID
ROCM-3941