Skip to content

build(rocm-smi): add ROCM_SMI_DISABLE gate to skip build - #9227

Merged
gabrpham merged 3 commits into
developfrom
users/marifamd/rocm-smi-disable
Jul 29, 2026
Merged

gabrpham merged 3 commits into
developfrom
users/marifamd/rocm-smi-disable

Conversation

@marifamd

Copy link
Copy Markdown
Contributor

Motivation

ROCm SMI is deprecated in favor of AMD SMI. Composite builds such as TheRock need a supported way to skip building the library entirely without patching its sources.

Technical Details

Build gate (projects/rocm-smi-lib/CMakeLists.txt):

  • Honor ROCM_SMI_DISABLE as either an environment variable or a CMake cache variable
  • When set, emit a deprecation warning and return() before any target is declared, so nothing is built or installed

Docs (projects/rocm-smi-lib/docs/install/install.rst):

  • Document the ROCM_SMI_DISABLE=True opt-out for both env and -D usage

Changelog (projects/rocm-smi-lib/CHANGELOG.md):

  • Note the new build gate

Issue Tracking

JIRA ID: ROCM-996

Test Plan

  • cmake -DROCM_SMI_DISABLE=True .. — configures to a no-op, no artifacts
  • ROCM_SMI_DISABLE=True cmake .. — same via environment variable
  • cmake .. (unset) — normal configure proceeds

Test Result

All three cases behave as expected: the flag short-circuits the build; unset builds normally.

Submission Checklist

rocm-smi-lib is deprecated in favor of AMD SMI. Setting ROCM_SMI_DISABLE=True (environment or CMake cache variable) short-circuits configure so nothing is built or installed. Composite builds such as TheRock set this to drop the library from the ROCm stack.

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
@marifamd
marifamd requested review from a team as code owners July 24, 2026 18:35
@github-actions github-actions Bot added documentation Improvements or additions to documentation project: rocm-smi-lib labels Jul 24, 2026
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
🌿 Branch Name ✅ Pass —
📝 PR Title/Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@marifamd
marifamd marked this pull request as draft July 28, 2026 15:30
@marifamd

Copy link
Copy Markdown
Contributor Author

hard dependency on: ROCm/rocm-libraries#4386

marifamd added 2 commits July 29, 2026 02:50
- Move the ROCM_SMI_DISABLE changelog entry to a new 7.15.0 section
- Note in the docs index, README, and install guide that ROCm SMI is no longer included in TheRock builds as of 7.15 and can still be built from source

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
@gabrpham
gabrpham marked this pull request as ready for review July 29, 2026 23:28
Copilot AI review requested due to automatic review settings July 29, 2026 23:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

The change is a low-risk, early CMake configuration short-circuit with corresponding documentation/changelog updates.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Adds a supported opt-out to short-circuit rocm-smi-lib configuration/build when consumers (e.g., TheRock composite builds) want to exclude the deprecated library without patching sources.

Changes:

  • Add ROCM_SMI_DISABLE (env var or CMake cache var) to early-exit the project before any targets/install rules are declared.
  • Document the opt-out behavior in the installation guide and highlight TheRock exclusion in top-level docs/README.
  • Add a changelog entry describing the new build gate.
File summaries
File Description
projects/rocm-smi-lib/CMakeLists.txt Adds a ROCM_SMI_DISABLE configuration gate that returns early to skip defining build/install targets.
projects/rocm-smi-lib/docs/install/install.rst Documents disabling the build via env var or -DROCM_SMI_DISABLE=....
projects/rocm-smi-lib/docs/index.rst Notes deprecation context and TheRock exclusion, pointing readers to install docs / AMD SMI.
projects/rocm-smi-lib/README.md Adds a maintenance/deprecation note about TheRock builds and links to install docs.
projects/rocm-smi-lib/CHANGELOG.md Records the new build gate for ROCm 10.0.0.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Low

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@gabrpham
gabrpham merged commit d22b864 into develop Jul 29, 2026
24 of 26 checks passed
@gabrpham
gabrpham deleted the users/marifamd/rocm-smi-disable branch July 29, 2026 23:32
systems-assistant Bot pushed a commit to ROCm/rocm_smi_lib that referenced this pull request Jul 29, 2026
 (#9227)

## Motivation

ROCm SMI is deprecated in favor of AMD SMI. Composite builds such as
TheRock need a supported way to skip building the library entirely
without patching its sources.

## Technical Details

**Build gate** (`projects/rocm-smi-lib/CMakeLists.txt`):
- Honor `ROCM_SMI_DISABLE` as either an environment variable or a CMake
cache variable
- When set, emit a deprecation warning and `return()` before any target
is declared, so nothing is built or installed

**Docs** (`projects/rocm-smi-lib/docs/install/install.rst`):
- Document the `ROCM_SMI_DISABLE=True` opt-out for both env and `-D`
usage

**Changelog** (`projects/rocm-smi-lib/CHANGELOG.md`):
- Note the new build gate

## Issue Tracking

JIRA ID: ROCM-996

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
[rocm-systems] ROCm/rocm-systems#9227 (commit d22b864)
gabrpham added a commit to ROCm/TheRock that referenced this pull request Aug 31, 2026
## Motivation

ROCm SMI is deprecated in favor of AMD SMI. Stop building it as part of
the ROCm stack.

## Technical Details

**Subproject build** (`base/CMakeLists.txt`):
- Pass `-DROCM_SMI_DISABLE=True` to the `rocm_smi_lib` subproject so it
configures to a no-op and installs nothing

## Issue Tracking

JIRA ID: ROCM-966

## Dependency

Requires the consumer-side gate in rocm-systems: ROCm/rocm-systems#9227.
Merge that first, otherwise the flag is ignored.

---------

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: gabrpham <Gabriel.Pham@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation organization: ROCm project: rocm-smi-lib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants