Skip to content

[FIX][TIRx] Constant-fold copy slice extents - #20067

Merged
spectrometerHBH merged 1 commit into
apache:mainfrom
jinhongyii:upstream/tirx-copy-slice-extent
Jul 29, 2026
Merged

[FIX][TIRx] Constant-fold copy slice extents#20067
spectrometerHBH merged 1 commit into
apache:mainfrom
jinhongyii:upstream/tirx-copy-slice-extent

Conversation

@jinhongyii

@jinhongyii jinhongyii commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Motivation and context

Copy regions can retain constant-valued expressions after variable substitution. Converting those expressions directly to Python integers rejects valid slices even though their extents are statically known.

Changes

  • Simplify swizzled-region extents before converting them to Python integers.
  • Continue rejecting genuinely symbolic extents.
  • Add a hardware-independent regression to the existing layout test suite.

Testing

  • python -m pytest tests/python/tirx/test_layout.py
  • Changed-files pre-commit checks

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copy regions can retain constant-valued expressions after variable substitution. Simplify swizzled-region extents before converting them to Python integers, while preserving rejection of genuinely symbolic extents.

Add a hardware-independent regression test for an unfolded constant slice extent.
@jinhongyii
jinhongyii force-pushed the upstream/tirx-copy-slice-extent branch from 94fee76 to 8076cb5 Compare July 29, 2026 05:03
@spectrometerHBH
spectrometerHBH merged commit 115029b into apache:main Jul 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants