Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tosa Changes Integration #524

Draft
wants to merge 40 commits into
base: bump_to_e2402615
Choose a base branch
from

Conversation

jorickert
Copy link

@jorickert jorickert commented Mar 20, 2025

CommandLine Error: Option 'non-global-value-max-name-size' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
  • Final update of all branches
  • Final test of all components

josel-amd and others added 30 commits February 14, 2025 15:04
…monotonic_slice_params""

This reverts commit 018230a.
`computeStaticLoopSizes()` is functionally identical to `getStaticLoopRanges()`.
Replace all uses of `computeStaticLoopSizes()` by `getStaticLoopRanges()` and remove the former.
[AutoBump] Merge with fixes of 3494ee9 (Nov 01) (Needs downstream fixes) (8)
Fix problem where the shape of the insert shape was calculated incorrectly
… are executed before constraints are called, but this is not always the case, as operations can be reordered in PDLInterp if there is no dependency between them.

For example:
Pdll pattern:
```
 let someOp = op<someDialect.SomeOp>(input: Value<inputTy: Type) {axis = inputAxis: Attr } -> (resTypes: TypeRange);
 let someResult = someConstraint(inputAxis);
```

If SomeOp requires axis to have a valid value, it is easy to (wrongly) assume that someConstraint always gets called with a not-null inputAxis. This is not correct.

The linearized PDLInterp (pseudo-code) could be the following:
```
%0 = pdl_interp.get_attribute "axis" of %arg0
%1 = pdl_interp.apply_constraint “someConstraint”(%0)
pdl_interp.is_not_null(%0)
pdl_interp.check_operation_name of %arg0 is "someDialect.SomeOp"
```

Note that here someConstraint can be called with a null attribute.

This commit changes the prioritization of predicates, so that constraints are run after other predicates.
```
%0 = pdl_interp.get_attribute "axis" of %arg0
pdl_interp.is_not_null(%0)
pdl_interp.check_operation_name of %arg0 is "someDialect.SomeOp"
%1 = pdl_interp.apply_constraint “someConstraint”(%0)
```
This ensures that null or operation name checks are run before constraints. This is closer to the mental model when writing PDLL patterns and should make it less likely to run into bugs caused by assuming implicit checks for not null.
pdl_interp: Sort constraints to end of predicate list.
Do not print unnecessary newlines if attributes are elided
[FXML-5704] Compute affine expression bounds
Ensure 0 <= x mod N < N semantics
Add tosa.cast folding for unsigned integers
[AutoBump] Merge with ceeb08b (Nov 18) (9)
[AutoBump] Merge with 258a5d4 (Nov 20) (11)
[AutoBump] Merge with fixes of 68a3908 (Nov 18) (10)
jorickert and others added 7 commits March 13, 2025 11:24
[AutoBump] Merge with fixes of beff2ba (Nov 22) (14)
[TOSA] Extend folding/canonicalization for concat, tile and slice.
[AutoBump] Merge with fixes of cbc7802 (Nov 20) (12) Needs downstream changes
[AutoBump] Merge with 56eb559 (Nov 26) (15)
[AutoBump] Merge with 776476c (Nov 22) (13)
….bump_integration

Required various changes to tosa.tile canonicalization/folding
@jorickert jorickert mentioned this pull request Mar 21, 2025
1 task
@jorickert jorickert requested a review from mgehre-amd March 25, 2025 15:48
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.

4 participants