Expand description
Layout manuplication for matmul and other linalg operations
§Rules for matmul
We Refer to Python array API for more information.
Please note that the following rule only applies to row-major.
| Id | A | B | C |
|---|---|---|---|
| 1. | N | N | |
| 2. | M, K | K, N | M, N |
| 3. | K | ..., K, N | ..., N |
| 4. | ..., M, K | K | ..., M |
| 5. | M, K | ..., K, N | ..., M, N |
| 6. | ..., M, K | K, N | ..., M, N |
| 7. | ..., M, K | ..., K, N | ..., M, N |
For col-major, only rule 1, 2, (part of) 3, (part of) 4 are valid.
Structs§
Enums§
- MatMul
Type - Rules of matmul.