Skip to content

build(tensilelite): align requirements-test.txt limits with tox.ini and pyproject.toml - #12319

Merged
talumbau merged 1 commit into
users/scotttodd/tensilelite-test-requirementsfrom
users/talumbau/tensilelite-test-requirements-consistency
Sep 18, 2026
Merged

talumbau merged 1 commit into
users/scotttodd/tensilelite-test-requirementsfrom
users/talumbau/tensilelite-test-requirements-consistency

Conversation

@talumbau

@talumbau talumbau commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

JIRA ID : N/A

Targets #11396 rather than develop — merge into that branch to pick these up.

Motivation

#11396 adds tensilelite/requirements-test.txt. Moving the list out of TheRock and next to the tests is a clear improvement, and the CMake install rule is correct as written (including the absence of OPTIONAL, which is what makes a bad path fail loudly rather than be skipped).

The concern is only the version limits. requirements-test.txt is the fifth place under tensilelite/ that declares Python dependencies:

File Read by
requirements.txt install.sh:47, tox.ini:20,124,165, MANIFEST.in
requirements-dev.txt utilities/geko/README.md:268 setup step
pyproject.toml [project].dependencies uv.lock, and tox's sdist install (no skipsdist)
pyproject.toml [dependency-groups].dev uv sync
tox.ini:16-26 inline deps every tox env

They agree today. Nothing checks that they keep agreeing. requirements-test.txt is the only one of the five that hard-pins, so it is the one that drifts first — and nothing in CI would report it.

Technical Details

Relax the four hard pins to the limits already stated elsewhere in the tree:

Package Before After Source of the limit
pytest ==9.0.3 >=5.4.1 tox.ini:21, pyproject.toml:105
PyYAML ==6.0.2 (none) requirements.txt
packaging ==25.0 (none) requirements.txt, pyproject.toml:77
syrupy ==5.3.2 (none) tox.ini:24, pyproject.toml:108

On pytest

To be precise about what the problem is and is not: the newest pytest is 9.1.1, and >=5.4.1 is a floor rather than a pin, so tox -e unit already resolves to pytest 9 today. This is not a case of two lanes running two different majors.

The problem is that ==9.0.3 freezes one lane while every other lane floats. They start together and separate over time.

The >=5.4.1 floor is itself stale — it traces to the pytest 5.3.3 defect note at tox.ini:12-14, which is years old. It does need raising. The right place to raise it is pyproject.toml, using PEP 735 include-group nesting so a single declaration propagates, rather than a new version arriving by hand in a fifth file.

On the other three

PyYAML, packaging and syrupy float everywhere else in the repo, so the least damaging thing is to let them float here too until this is settled through pyproject.toml. This is consistency rather than risk: packaging has exactly one use in the package (Tensile/Common/Parallel.py:38), and PyYAML 6.x is interface-stable.

syrupy deserves a footnote. There are 101 .ambr snapshot files under Tensile/Tests, so the syrupy version and those files are coupled and a pin has a real purpose. But a pin in one file of three does not help — it makes the artifact lane and the tox lane read the same snapshots with different engines. One value in all three files is the actual fix, and that is larger than this PR.

Kept unchanged

  • pytest-timeout==2.4.0 — tox.ini:23 already states the same value.
  • msgpack>=1.0.0, joblib>=1.4.0, numpy>=1.26.0, filelock>=3.0.0 — a floor does not contradict a bare requirement, so these add information without creating a second source of truth.
  • projects/hipblaslt/CMakeLists.txt — no change.
  • Line order — unchanged, to keep the diff readable.

requirements-dev.txt

One line added: -r ./requirements-test.txt.

This links the new file into the set instead of leaving it as a fifth parallel list, and it closes a gap that exists today: requirements-dev.txt ships no test runner at all, so anyone following the geko README setup step (utilities/geko/README.md:268) ends up without pytest.

-r paths resolve against the directory of the file that contains them, so this line is safe from any working directory. requirements-test.txt itself gains no -r line, so it remains standalone for CI and for shipped artifacts, which do not clone the source repo.

Note this does not yet remove the overlap between requirements.txt and requirements-test.txt — seven packages are still declared in both. See the follow-ups.

Test Plan

No behavioural change to any code path. Nothing reads requirements-test.txt yet — TheRock currently uses its own build_tools/github_actions/test_executable_scripts/requirements-test-tensilelite.txt (ROCm/TheRock#7728) — so this only affects the contents of the installed test artifact.

Checks: the existing #11396 CI, which exercises the install(FILES ...) rule via HIPBLASLT_INSTALL_TENSILELITE_TEST_ARTIFACTS (ROCm/TheRock:math-libs/BLAS/CMakeLists.txt:172 sets it from THEROCK_BUILD_TESTING).

Test Result

Pending CI on this branch. Worth knowing when reading the green checks: the contents of the file are unvalidated by CI on either branch until TheRock installs from it. The Test tensilelite job uses the runner's ambient pytest.

Submission Checklist

Risk level

None. Four version limits relaxed to values already declared elsewhere in the tree, plus one -r line. No code, no build logic, no CMake changes.

Follow-ups (not in this PR)

  1. Remove the remaining overlap between requirements.txt and requirements-test.txt (seven packages), keeping requirements-test.txt standalone.
  2. Remove ./rocisa from requirements-dev.txt. It is a CWD-relative path (see the workaround comment at utilities/geko/tox.ini:47) and it produces a different install than invoke rocisa — no ROCM_PATH, no ROCISA_INCLUDE_BUILD_INFO=ON, non-editable, with build isolation. Needs a matching geko README update.
  3. Make pyproject.toml the single source of truth for versions, with PEP 735 nesting so one declaration propagates, and a check that reports drift. This is what the TODO in the file refers to.

🤖 Generated with Claude Code

…nd pyproject.toml

requirements-test.txt is the fifth place in tensilelite/ that declares Python
dependencies, after requirements.txt, requirements-dev.txt, pyproject.toml
([project].dependencies and [dependency-groups].dev), and the inline deps in
tox.ini. Today they agree; nothing checks that they keep agreeing.

The hard pins are the part that can diverge silently, so relax them to the
limits already stated elsewhere:

  pytest==9.0.3 -> pytest>=5.4.1   (tox.ini:21, pyproject.toml:105)
  PyYAML==6.0.2 -> PyYAML          (requirements.txt)
  packaging==25.0 -> packaging     (requirements.txt, pyproject.toml:77)
  syrupy==5.3.2 -> syrupy          (tox.ini:24, pyproject.toml:108)

pytest is the one that matters: 9.x is a major release, and the artifact test
lane would have run it while `tox -e unit` resolved pytest>=5.4.1 to something
else. Two lanes, two majors, no validation of 9.x against this suite.

pytest-timeout==2.4.0 is kept because tox.ini:23 states the same value, and the
four >= floors are kept because a floor does not contradict a bare requirement.

Also add `-r ./requirements-test.txt` to requirements-dev.txt. That makes the
new file part of the set rather than a fifth parallel copy, and it fixes an
existing gap: requirements-dev.txt ships no test runner at all, so the geko
README setup step (utilities/geko/README.md:268) currently leaves developers
without pytest.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@                              Coverage Diff                               @@
##           users/scotttodd/tensilelite-test-requirements   #12319   +/-   ##
==============================================================================
  Coverage                                          70.60%   70.60%           
==============================================================================
  Files                                               2799     2799           
  Lines                                             458957   458957           
  Branches                                           67480    67480           
==============================================================================
  Hits                                              324029   324029           
  Misses                                            111633   111633           
  Partials                                           23295    23295           
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 46.40% <ø> (ø)
TensileLite-Unit 76.10% <ø> (ø)
hipBLAS 90.62% <ø> (ø) Carriedforward from c61bd2a
hipBLASLt 35.23% <ø> (ø) Carriedforward from c61bd2a
hipCUB 82.68% <ø> (ø) Carriedforward from c61bd2a
hipDNN 86.83% <ø> (ø) Carriedforward from c61bd2a
hipFFT 43.77% <ø> (ø) Carriedforward from c61bd2a
hipRAND 76.12% <ø> (ø) Carriedforward from c61bd2a
hipSOLVER 69.03% <ø> (ø) Carriedforward from c61bd2a
hipSPARSE 86.99% <ø> (ø) Carriedforward from c61bd2a
rocBLAS 48.26% <ø> (ø) Carriedforward from c61bd2a
rocFFT 52.11% <ø> (ø) Carriedforward from c61bd2a
rocRAND 56.91% <ø> (ø) Carriedforward from c61bd2a
rocSOLVER 77.32% <ø> (ø) Carriedforward from c61bd2a
rocSPARSE 74.60% <ø> (ø) Carriedforward from c61bd2a
rocThrust 91.60% <ø> (ø) Carriedforward from c61bd2a

*This pull request uses carry forward flags. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@talumbau
talumbau merged commit a96f709 into users/scotttodd/tensilelite-test-requirements Sep 18, 2026
178 of 194 checks passed
@talumbau
talumbau deleted the users/talumbau/tensilelite-test-requirements-consistency branch September 18, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants