Skip to content

docs(rocprofiler-compute): install analyze dependencies with the compute-analyze extra - #11928

Merged
vedithal-amd merged 2 commits into
rocprofiler-compute-developfrom
users/vedithal-amd/analyze-verify-deps
Sep 22, 2026
Merged

vedithal-amd merged 2 commits into
rocprofiler-compute-developfrom
users/vedithal-amd/analyze-verify-deps

Conversation

@vedithal-amd

@vedithal-amd vedithal-amd commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

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 (fix(rocprofiler-compute): Gate rocprof-compute analyze deps behind an opt-in compute-analyze extra 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

@github-actions github-actions Bot added documentation Improvements or additions to documentation project: rocprofiler-compute labels Sep 21, 2026
@vedithal-amd
vedithal-amd force-pushed the users/vedithal-amd/analyze-verify-deps branch 2 times, most recently from dcebb8d to 4b98330 Compare September 21, 2026 14:52
@vedithal-amd
vedithal-amd marked this pull request as ready for review September 21, 2026 14:53
@vedithal-amd
vedithal-amd requested review from a team and prbasyal-amd as code owners September 21, 2026 14:53
Copilot AI lite review requested due to automatic review settings September 21, 2026 14:53
@vedithal-amd vedithal-amd changed the title feat(rocprofiler-compute): add analyze --verify-deps docs(rocprofiler-compute): install analyze dependencies with the compute-analyze extra Sep 21, 2026
…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>

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.

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 Medium severity

Open (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-deps without 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:179 may 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 habajpai-amd 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.

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>
@vedithal-amd

Copy link
Copy Markdown
Contributor Author

Fixed copilot comment

@vedithal-amd
vedithal-amd merged commit d58db7f into rocprofiler-compute-develop Sep 22, 2026
26 checks passed
@vedithal-amd
vedithal-amd deleted the users/vedithal-amd/analyze-verify-deps branch September 22, 2026 15:54
vedithal-amd added a commit that referenced this pull request Sep 23, 2026
…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
vedithal-amd added a commit that referenced this pull request Sep 27, 2026
…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>
vedithal-amd added a commit that referenced this pull request Sep 27, 2026
…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
vedithal-amd added a commit that referenced this pull request Sep 28, 2026
…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>
vedithal-amd added a commit that referenced this pull request Sep 28, 2026
…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
vedithal-amd added a commit to ROCm/TheRock that referenced this pull request Oct 5, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants