forked from nod-ai/iree-amd-aie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Canonicalizers for doubly strided ops such as npu.dma_cpy_nd (nod-ai#680
) Doubly strided ops have, for both source and target, and for all of offsets/sizes/strides, 2 fields: 1) a vector of **dynamic** Values 2) a vector of **static** integers For example it might be 1) dynamic = {v0} 2) static = {16, kDynamic, 32, 64} The size of **dynamic** is always exactly equal to the number of appearances of kDynamic in the **static** vector. This pass does the following: it checks if any of the Values in **dynamic** are actually MLIR constants, and if they are then it removes the Value from the dynamic vector and updates the corresponding index in **static**. So for example if `v0` above is actually ``` %v0 = arith.constant 6 : index ``` then this canonicalization updates dynamic/static to 1) dynamic = {} 2) static = {16, 6, 32, 64}
- Loading branch information
Showing
5 changed files
with
185 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.