Repository navigation
docs(rocprofiler-compute): install analyze dependencies with the compute-analyze extra - #11928
Conversation
dcebb8d to
4b98330
Compare
…ute-analyze extra Analyze mode needs Python packages that profile mode does not, and the only documented way to install them was a requirements file inside a ROCm installation. TheRock now publishes those pins as the rocm-profiler[compute-analyze] extra, so document that as the pip path and keep the requirements file for package manager and tarball installs. Add analyze --verify-deps so users can check an environment without having a workload to analyze, and point the dependency failure message at the install docs, which carry the install command, rather than at the requirements file, which lists the pins but not how to install them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4b98330 to
bfeda81
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Dependency verification can falsely succeed without a manifest, and CLI behavior lacks coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Adds standalone analyze dependency verification and documents installation via the compute-analyze extra or requirements file.
Changes:
- Adds
analyze --verify-depswithout requiring a workload path. - Updates dependency failure guidance with an installation link.
- Documents pip and packaged-ROCm installation paths.
- Adds parser coverage for the new flag.
Moderate findings remain:
src/rocprof-compute:179may report success when no dependency manifest exists.- Add CLI-level tests covering success, failure, exit codes, and the documentation link.
| File | Description |
|---|---|
projects/rocprofiler-compute/tests/unit/test_argparser.py |
Tests the new flag parsing. |
projects/rocprofiler-compute/src/rocprof-compute |
Implements dependency verification and messaging. |
projects/rocprofiler-compute/src/rocprof_compute_base.py |
Exposes parsed arguments. |
projects/rocprofiler-compute/src/argparser.py |
Defines --verify-deps. |
projects/rocprofiler-compute/docs/install/quickstart.rst |
Updates quickstart installation guidance. |
projects/rocprofiler-compute/docs/install/core-install.rst |
Documents analyze dependency installation paths. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
habajpai-amd
left a comment
There was a problem hiding this comment.
Reviewed and agree with Copilot’s existing comment. I also verified that rocm profiler[compute-analyze] resolves the expected dependencies from the latest TheRock nightly. No additional comments from my side.
… missing - verify_deps() returned quietly when neither candidate requirements.txt existed, so --verify-deps reported success on an environment it never checked. It now errors out and names both paths it searched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Fixed copilot comment |
…elog - Records the `rocm-profiler[compute-analyze]` extra and `analyze --verify-deps` under Added for 3.10.0 (#11928). Co-Authored-By: Claude Opus 5
…ute-analyze extra (#11928) ## Motivation Analyze mode needs Python packages that profile mode does not. There was no way to check whether an environment had them without also having a workload to analyze, because the existing check only ran on the way into an analysis. The failure message also pointed at the requirements file, which lists the pins but not how to install them. ### Validated using latest nightly ``` python3 -m venv ~/.venvs/rocprof-compute-analyze source ~/.venvs/rocprof-compute-analyze/bin/activate pip install --extra-index-url https://nightly.repo.amd.com/rocm/whl-next/ "rocm-profiler[compute-analyze]==10.2.0a20260922" ``` The rocprof-compute along with its python dependencies are installed in the venv - so no more manually pip installing the requirements.txt ## Technical Details - `rocprof-compute analyze --verify-deps` runs the existing `verify_deps()` check and exits: zero when every pin is installed at the required version, non-zero otherwise. `-p` stays optional, so the flag works as a standalone environment check. - The failure message now points at the install docs, following the doc-link constant style already used in `utils_profile.py` and `profiler_base.py`. - Docs gain an `analyze-deps` section in `core-install.rst` covering both install paths: the `rocm-profiler[compute-analyze]` extra for pip users and the requirements file for packaged ROCm installations. The quickstart step links there instead of repeating it, matching how that page already defers to `core-install` for detail. - The extra is new in TheRock (ROCm/TheRock#7002), which is what makes the pip path documentable. ## Issue Tracking JIRA ID: AIPROFCOMP-788 ## Test Plan Ran `analyze --verify-deps` from the source tree in two environments: one with the requirements installed and one bare virtual environment. Added unit tests for the flag's default and for it parsing without `-p`, then ran the argparser suite and ruff. ## Test Result With the dependencies present the flag reports success and exits zero. In the bare environment it lists each missing package, prints the docs link, and exits one. The argparser unit tests pass and ruff is clean. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…elog - Records the `rocm-profiler[compute-analyze]` extra and `analyze --verify-deps` under Added for 3.10.0 (#11928). Co-Authored-By: Claude Opus 5
…ute-analyze extra (#11928) ## Motivation Analyze mode needs Python packages that profile mode does not. There was no way to check whether an environment had them without also having a workload to analyze, because the existing check only ran on the way into an analysis. The failure message also pointed at the requirements file, which lists the pins but not how to install them. ### Validated using latest nightly ``` python3 -m venv ~/.venvs/rocprof-compute-analyze source ~/.venvs/rocprof-compute-analyze/bin/activate pip install --extra-index-url https://nightly.repo.amd.com/rocm/whl-next/ "rocm-profiler[compute-analyze]==10.2.0a20260922" ``` The rocprof-compute along with its python dependencies are installed in the venv - so no more manually pip installing the requirements.txt ## Technical Details - `rocprof-compute analyze --verify-deps` runs the existing `verify_deps()` check and exits: zero when every pin is installed at the required version, non-zero otherwise. `-p` stays optional, so the flag works as a standalone environment check. - The failure message now points at the install docs, following the doc-link constant style already used in `utils_profile.py` and `profiler_base.py`. - Docs gain an `analyze-deps` section in `core-install.rst` covering both install paths: the `rocm-profiler[compute-analyze]` extra for pip users and the requirements file for packaged ROCm installations. The quickstart step links there instead of repeating it, matching how that page already defers to `core-install` for detail. - The extra is new in TheRock (ROCm/TheRock#7002), which is what makes the pip path documentable. ## Issue Tracking JIRA ID: AIPROFCOMP-788 ## Test Plan Ran `analyze --verify-deps` from the source tree in two environments: one with the requirements installed and one bare virtual environment. Added unit tests for the flag's default and for it parsing without `-p`, then ran the argparser suite and ruff. ## Test Result With the dependencies present the flag reports success and exits zero. In the bare environment it lists each missing package, prints the docs link, and exits one. The argparser unit tests pass and ruff is clean. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…elog - Records the `rocm-profiler[compute-analyze]` extra and `analyze --verify-deps` under Added for 3.10.0 (#11928). Co-Authored-By: Claude Opus 5
…rify-deps` (#8752) ## Motivation The compute-analyze test step runs `rocprof-compute analyze --help`. argparse exits on `--help` before the dependency check runs, and the modules imported up to that point are stdlib-only. So the step passes even if the extra declares no dependencies. ## Related Issues ISSUE ID: #7003 JIRA ID: AIPROFCOMP-788 ## Technical Details - `rocprof-compute analyze --verify-deps` (added in ROCm/rocm-systems#11928, already in the rocm-systems pin) checks every package in rocprofiler-compute's `requirements.txt` for presence and pinned version, then exits non-zero on any mismatch. - The `rocm-profiler` template's `setup.py` in TheRock builds the extra from that same `requirements.txt`, so the test now checks the extra against its source of truth. ## Test Plan - [ ] The "Test rocprof-compute analyze" step passes in CI. ## Test Result - [ ] The "Test rocprof-compute analyze" step passes in CI. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Motivation
Analyze mode needs Python packages that profile mode does not. There was no way
to check whether an environment had them without also having a workload to
analyze, because the existing check only ran on the way into an analysis.
The failure message also pointed at the requirements file, which lists the pins
but not how to install them.
Validated using latest nightly
The rocprof-compute along with its python dependencies are installed in the venv - so no more manually pip installing the requirements.txt
Technical Details
rocprof-compute analyze --verify-depsruns the existingverify_deps()checkand exits: zero when every pin is installed at the required version, non-zero
otherwise.
-pstays optional, so the flag works as a standalone environmentcheck.
constant style already used in
utils_profile.pyandprofiler_base.py.analyze-depssection incore-install.rstcovering both installpaths: the
rocm-profiler[compute-analyze]extra for pip users and therequirements file for packaged ROCm installations. The quickstart step links
there instead of repeating it, matching how that page already defers to
core-installfor detail.path documentable.
Issue Tracking
JIRA ID: AIPROFCOMP-788
Test Plan
Ran
analyze --verify-depsfrom the source tree in two environments: one withthe requirements installed and one bare virtual environment. Added unit tests for
the flag's default and for it parsing without
-p, then ran the argparser suiteand ruff.
Test Result
With the dependencies present the flag reports success and exits zero. In the
bare environment it lists each missing package, prints the docs link, and exits
one. The argparser unit tests pass and ruff is clean.
Submission Checklist