EnzymeAD / EnzymeAD/Enzyme-JAX
fuse `lapack.orgqr` + `stablehlo.dot_general` into `lapack.ormqr`
- Dominant language
- MLIR
- Stars
- 131
- Forks
- 53
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 193
Description
`lapack.ormqr` implements an algorithm for direct application of the Q matrix into another matrix given the PackedQR format (i.e. the result of `lapack.geqrf` op)
```mlir
%0 = enzymexla.lapack.orgqr %A, %tau : ...
%1 = stablehlo.dot_general %0, %X : ...
```
should be fused into
```mlir
%0 = stablehlo.transpose %X // we need X to be a matrix (if already is, it will be optimized away)
%1 = enzymexla.lapack.ormqr %0, %X : ...
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the transformation entry point that handles enzymexla.lapack.orgqr followed by stablehlo.dot_general, then trace how enzymexla.lapack.ormqr is represented. Use the MLIR examples in the issue as the expected pattern, including transpose handling, and verify that the original operation sequence is replaced by the fused form.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100