Skip to content

perf(tensilelite): deselect common configs that opt out of every target architecture - #15280

Draft
Alex-Vasile wants to merge 1 commit into
users/alvasile/tl-speedup-29-test-artifacts-gzip-4from
users/alvasile/tl-speedup-30-deselect-opted-out-configs
Draft

Alex-Vasile wants to merge 1 commit into
users/alvasile/tl-speedup-29-test-artifacts-gzip-4from
users/alvasile/tl-speedup-30-deselect-opted-out-configs

Conversation

@Alex-Vasile

@Alex-Vasile Alex-Vasile commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID : AIHPBLAS-5256

Motivation

The TensileLite common tests are one pytest test per YAML config, parametrized over the GPU architectures being targeted. A config opts out of an architecture with a skip-<arch> mark. Those configs are still collected and sent to the pytest-xdist scheduler (pytest-xdist is the pytest plugin that runs tests in parallel worker processes), where they only report a skip. On gfx942 that is 563 of the 709 common tests. The default load scheduler sizes its first chunks from the full count, 44 tests per worker, so the 7 most expensive configs, adjacent in collection order, land on one worker.

Technical Details

Tests/common/conftest.py changes in 2 places:

  • pytest_generate_tests stores the architecture list it parametrized with in the pytest stash under a new _ARCHS_KEY, so architectures are detected once.
  • A new pytest_collection_modifyitems hook deselects every item under Tests/common whose marks include skip-<arch> for every target architecture. It reads the marks configMarks already attached and opens no files.

Reports now say N deselected for those configs instead of N skipped. Other skips are unchanged and still report as skips: multi-GPU comm configs, the StinkyTofu backend, disabled paths, and configs that skip only some of their target architectures. The set of tests that execute does not change. The diff is test infrastructure only.

Test Plan

Run from projects/hipblaslt/tensilelite:

  • tox -e py3 -- tensilelite/Tests -m common --collect-only lists the collected and deselected tests on the local GPU.
  • The same command with --build-only --gpu-targets gfx942 checks the count with an explicit target and no GPU detection.
  • pre-commit run --files tensilelite/Tests/common/conftest.py checks formatting and lint.

Test Result

Time saved: 48 s (-7.8%) of CI-like build-stage wall time, 612 s before against 564 s after, with pytest-xdist's default load scheduler. Measured on the original unsplit branch on the gfx942 (MI300X) host, 25 cores, --build-only --gpu-targets gfx942 -n 4 with the cache cleared, against the commit before it; 564 s is the mean of 2 runs (566 and 562 s), and the number of runs behind the 612 s is not recorded.

These results were recorded on the original unsplit branch with --collect-only -m "common and not skip-gfx94X":

  • --build-only --gpu-targets gfx942: 146 of 709 collected, 563 deselected. The kept set equals the tests that ran in an earlier CI-like build stage, and none of the 563 had run there.
  • --use-cache with a GPU detected: 146 of 709, the earlier run stage's set plus comm/gfx950/fused_a2a, which the multi-GPU check skips when one GPU is visible.
  • --gpu-targets "gfx942;gfx950": 269, the union of the gfx942 (146) and gfx950 (224) sets.
  • Collection time unchanged: 3.29-3.30 s (build) and 4.29-4.30 s (run).

No unit test is added for the hook.

Not yet run on this branch. Automated GitHub checks are pending.

Related

  • Work tracking: AIHPBLAS-5256

Device / Architecture Coverage

Host-only pytest collection change. No kernel generation, product code or GPU behavior changes, so passing PR checks are sufficient.

Submission Checklist

Risk level

Low (2/5): test-harness change that decides which common tests are scheduled; a wrong mark match would hide a runnable config, and the hook has no unit test of its own.

@Alex-Vasile Alex-Vasile added NoCI Don't run CI ci:skip Skip all CI builds/tests for this PR labels Nov 6, 2026
@Alex-Vasile
Alex-Vasile added this pull request to stack #15292 November 6, 2026 17:39
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/tl-speedup-30-deselect-opted-out-configs branch from 608703b to dcfc894 Compare November 6, 2026 18:24
@therock-pr-bot

therock-pr-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/hipblaslt/tensilelite/tensilelite/Tests/common/conftest.py; no test file found
🔎 pre-commit ❌ Fail Error: Check concluded with cancelled.
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ pre-commit

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

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

🙋 Wish to Override Policy?

@therock-pr-bot

therock-pr-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

…et architecture

Tests/common/conftest.py deselects at collection time every config whose marks skip all target architectures, so the xdist scheduler sees only runnable tests (on gfx942, 146 of 709). Reports say deselected instead of skipped; the executed set is unchanged.
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/tl-speedup-30-deselect-opted-out-configs branch from dcfc894 to 5a5a68f Compare November 6, 2026 18:45

This branch has not been deployed

No deployments
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.

1 participant