Skip to content

refactor(tensilelite): move package to lowercase namespace - #12150

Merged
talumbau merged 36 commits into
developfrom
users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat
Oct 9, 2026
Merged

talumbau merged 36 commits into
developfrom
users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat

Conversation

@Alex-Vasile

@Alex-Vasile Alex-Vasile commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID : AIHPBLAS-3989

DO NOT REVERT. Any breakages caused by this PR should be fixed forward due to the difficulty associated in getting this through CI before another merge conflict arises.

Motivation

The Python implementation is called TensileLite but is stored and imported as Tensile. This PR performs the physical package move while keeping existing Python callers operational through a temporary compatibility namespace.

Technical Details

  • Move the complete Tensile/ implementation and test tree to tensilelite/.
  • Make tensilelite the canonical package and activate the one-way Tensile → tensilelite shim.
  • Update package discovery, source manifests, CMake code-generation paths, test discovery, coverage paths, and required resource locations.
  • Keep tests, legacy launchers, and external Python consumers on Tensile imports for migration in later PRs.
  • Depends on 03-inactive-compat-bridge.

Test Plan

Verify source and wheel imports through both namespace spellings, package resources, python -m, legacy launchers, and representative unit tests.

Test Result

  • Compatibility wheel check passed: Tensile.resources and tensilelite.resources resolve to one module object with lowercase canonical metadata.
  • Focused package/import validation passed on the compatibility stack.
  • Automated GitHub checks pass.

Submission Checklist

Risk level

High (4/5): this moves the complete Python package and changes build and packaging paths, while the temporary shim preserves the old import interface.

@therock-pr-bot

therock-pr-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

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

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

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

Pre-commit check failed

⛔ pre-commit failed

Please run locally:

  • python -m pip install pre-commit
  • pre-commit install
  • pre-commit run --all-files --show-diff-on-failure

This repo uses .pre-commit-config.yaml.

@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/03-inactive-compat-bridge branch from 47ee03b to d0dad98 Compare September 16, 2026 16:18
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch 2 times, most recently from 1699173 to 41e5abe Compare September 16, 2026 16:53
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/03-inactive-compat-bridge branch from d0dad98 to 1dbde8c Compare September 16, 2026 16:53
@Alex-Vasile
Alex-Vasile removed this pull request from stack #12163 September 16, 2026 16:53
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch from 41e5abe to e361913 Compare September 16, 2026 17:46
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/03-inactive-compat-bridge branch from 1dbde8c to ef85183 Compare September 16, 2026 17:46
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch from e361913 to a761a29 Compare September 16, 2026 18:40
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/03-inactive-compat-bridge branch from ef85183 to 9c14e13 Compare September 16, 2026 18:40
talumbau pushed a commit that referenced this pull request Sep 17, 2026
JIRA ID : AIHPBLAS-3989

## Motivation

The pre-commit workflow computes changed paths to select sparse-checkout
directories and determine whether a project needs optional hook
dependencies. [PR
#12150](#12150) changes 1,484
files and produces a 148,368-byte path list. When the workflow copied
that list into the `CHANGED_FILES` environment variable, the Linux
runner could not start Bash and reported `Argument list too long`.

## Technical Details

- Write the sorted changed paths already computed by
`pre_commit_helper.py` to a temporary file under `RUNNER_TEMP`.
- Expose only the temporary file's pathname as a GitHub Actions step
output.
- Read that file when deciding whether a project needs optional
dependencies.
- Preserve the existing resolved three-dot diff base, checked Git
execution, timeout, and sparse-checkout behavior.
- Fail the project-detection step if the changed-files file cannot be
read instead of treating the project as unchanged.

## Test Plan

Exercise the helper with a changed-path list larger than Linux's
per-environment-entry limit, run the complete `.github/scripts` test
suite, run the repository pre-commit hooks for the changed files, and
check project detection against the actual 1,484-file namespace diff.

## Test Result

- Original failure: [pre-commit run
35121163236](https://github.com/ROCm/rocm-libraries/actions/runs/35121163236/job/104879231064)
failed before Bash started with `Argument list too long`.
- `python -m pytest .github/scripts/tests -q`: `136 passed`, `8
xfailed`, and `34 subtests passed`.
- Targeted repository pre-commit hooks passed for the helper, its tests,
and the workflow.
- The actual 1,484-path, 148,368-byte diff produced
`hipblaslt_changed=true` and `hipdnn_changed=false`; an unreadable file
exited with status `2`.
- Automated GitHub checks are pending for the updated commit.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.

## Risk level

Medium (3/5): this changes dependency detection in the repository's
pre-commit validation path. It does not change product or GPU behavior.
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/03-inactive-compat-bridge branch from 9c14e13 to bfee1f2 Compare September 17, 2026 18:21
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch 2 times, most recently from 95fbded to 2601ff2 Compare September 21, 2026 16:16
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/03-inactive-compat-bridge branch from bfee1f2 to 61e0393 Compare September 21, 2026 16:16

@newling newling 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.

Image LGTM, I assume you've checked that these files can be removed safely!

@Alex-Vasile
Alex-Vasile requested a review from newling September 21, 2026 16:41
@Alex-Vasile

Copy link
Copy Markdown
Contributor Author

Image LGTM, I assume you've checked that these files can be removed safely!

No. Let me rebase again. It's continual conflicts from rebases as develop keeps changing under me. One moment.

@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch from 2601ff2 to a493e67 Compare September 21, 2026 17:06
Move every active test and coverage path with the package tree, including files added on develop after the migration was authored. Keep moved source blobs byte-identical where no namespace edit is required, and align the pre-commit selector, test categories, and package metadata expectations with the lowercase location.
When an aliased package import loads canonical descendants, register those descendants under the alias before Python imports them again. This prevents a legacy submodule import from replacing an exported class on the shared canonical parent package.
@Alex-Vasile
Alex-Vasile force-pushed the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch from 8366658 to 468a2d4 Compare October 9, 2026 14:46
@talumbau
talumbau disabled auto-merge October 9, 2026 15:15
@talumbau
talumbau merged commit 11d0433 into develop Oct 9, 2026
61 of 72 checks passed
@talumbau
talumbau deleted the users/alvasile/AIHPBLAS-3989-namespace-split/04-move-and-enable-compat branch October 9, 2026 15:16
archana-ramalingam added a commit that referenced this pull request Oct 9, 2026
#12150 moved the TensileLite tree from Tensile/ to tensilelite/. Move this
branch's two new harness unit tests with it, point the rocjitsu job at
tensilelite/Tests/common/test_config.py in the installed tree, and rekey the
recorded test durations to the new test ids. The durations now take the
latest per-PR run's values (run 37913200805) over the older ones.

Co-Authored-By: Claude <noreply@anthropic.com>
talumbau pushed a commit that referenced this pull request Oct 9, 2026
JIRA ID : AIHPBLAS-3989

## Motivation

PR #12150 moved TensileLite's Python package to `tensilelite/`. Some CI
commands and source references still use the old `Tensile/` path.

## Technical Details

Update those paths in component CI, the snapshot guard workflow, tests,
and documentation.

## Test Result

The 29 changed-subtree tests and 44 snapshot-guard tests passed. The
snapshot guard also ran against this diff. Automated GitHub checks are
pending.

## Risk level

Low (2/5): path-only changes; CI selection and the snapshot check are
affected.
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

vuksan314 added a commit that referenced this pull request Oct 12, 2026
Develop's #12150 moved tensilelite/Tensile/ to tensilelite/tensilelite/; git's rename detection carries this branch's edits to Architectures.py, GSU.py, KernelWriterAssembly.py, MatrixInstruction.py and memory_gfx.h over to the new paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
talumbau pushed a commit that referenced this pull request Oct 14, 2026
…13278)

JIRA ID : AIHPBLAS-3989

## Motivation

#12150 moves the Python implementation from `Tensile` to `tensilelite`
while keeping `Tensile` importable through a temporary compatibility
package. New imports using the old name would add references that must
be removed before that package can go away.

## Technical Details

- Add a root pre-commit hook that checks newly added or modified import
statements in Python files under both package roots. It rejects absolute
imports beginning with `Tensile` or `tensilelite`, so internal modules
use package-relative imports.
- Check changed lines only, allowing existing imports to remain during
the migration. The checker ignores strings, comments, and files under
`Tests/`.
- Allow the one absolute import needed by `Tensile/__init__.py` to
install the compatibility alias. This exception will be removed in
[#12162](#12162) when that PR
removes the bridge.

This PR depends on
[#12150](#12150).

## Test Plan

Run the checker's Python unit tests, which exercise staged and PR-range
changes, both package roots, the bridge exception, and existing imports.
Run the repository's pre-commit checks in PR CI. GPU testing is
unnecessary because this change only examines Python source.

## Test Result

- Checker unit tests: 34 passed.
- `git diff --check`: passed.
- PR CI: pending.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.

## Risk level

Medium (3/5): the new check can reject TensileLite Python changes in
pre-commit CI. It does not change packaged code or GPU behavior.
tony-davis added a commit that referenced this pull request Oct 20, 2026
…d scripts (#13729)

Resolves #13727

## Summary

Adds a `github-ci-pr-quality` overlay on the `rocm-pr-quality` base
skill for changes under `.github/`. It tells authors and reviewers where
CI tests belong (extend an existing lane, not a new workflow per test),
how to size runners and checkout, how to treat shared state in `ci-env`,
and to read each affected project's TESTING.md before changing a lane or
gate. It also covers what a CI job checks out (the PR merge ref,
`refs/pull/<N>/merge`, so every lane tests the same tree) and requires
CI references to be updated when files move or are deleted. A matching
Copilot review instructions file loads it for `.github/**`. This is the
second of two PRs; it is stacked on the root AGENTS.md PR (#13728), so
its base is that branch until #13728 merges.

## Risk Assessment

1/5. Guidance for reviewers and AI assistants only. No workflow, script,
or build changes, and the guidance is advisory. One behavior change:
Copilot code review will start applying this guidance to PRs that touch
`.github/**`.

## Related

- Work tracking: #13727
- Depends on: #13728 (the root AGENTS.md PR, tracked in #13726)
- Cases it is designed to catch: #12185, #13623 (reverted in #13698),
and the stale paths left by #12150 (fixed in #13399)
- Review input: a skill-forge review of the PR-quality skills (findings
R2, R3, R4, R8, M4/R7 applied here; the helper findings M1, M2, M3, and
R5 are fixed in ROCm/TheRock#6653; the rest of the base-skill findings
are still open)
- Base skill: `skills/rocm-pr-quality/` in ROCm/TheRock

## Testing Summary

- `pre-commit` on the changed files passed. Every workflow, script,
action value, and path the skill cites was checked against
`origin/develop`.

## Testing Checklist

- [x] pre-commit on the changed files - Status: Passed
- [x] Cited paths and facts checked against `develop` - Status: Passed
- [ ] PR CI - GitHub PR checks - Status: Pending

## Flags / Guardrails

None. The guidance is advisory.

## Adjacent Tests Considered

None apply; no code changes.

## Technical Changes

- New `skills/github-ci-pr-quality/SKILL.md` with the TESTING.md
cross-read, five CI change classes, and test-placement, runner-sizing,
trigger-scope, tested-tree, and shared-state rules. Trigger scope
includes checks that path filters match real files and that moves and
deletes update CI in the same PR. It tightens stale-base and approvals,
adds a review checklist, three worked examples, and a completed
retrospective review of #12185 as a model of the required output.
- Review contract: the overlay keeps review read-only (pre-commit runs
in a throwaway checkout), and requires caller edits only for breaking
workflow interface changes.
- New `.github/instructions/github-ci-pr-quality.instructions.md`
(`applyTo: ".github/**"`).
- `AGENTS.md`: the planned catalog row now links to the skill, and the
new instructions file is listed.

## Risk Acceptance / Waivers

`W-DOC`: guidance only; no product or CI behavior changes.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

3 participants