EnzymeAD / EnzymeAD/Enzyme-JAX

HLO Canonicalizations Todo list

Open
#54 31 comments 0 reactions 0 assignees View on GitHub
Dominant language
MLIR
Stars
131
Forks
53
Avg merge
1d 10h
Merged PRs (30d)
193

Description

To mark which ones we see worth doing, are doing / need to do

cc @ivanradanov @ftynse

- [x] iota reshape (becomes single iota)
```
%195 = stablehlo.iota dim = 0 : tensor<1024xi32>
%196 = stablehlo.reshape %195 : (tensor<1024xi32>) -> tensor<1x1x1024xi32>
```

- [x] reshape of pad (becomes diff pad)
```
%175 = stablehlo.pad %174, %148, low = [0, 0, 1024, 0, 0], high = [0, 0, 0, 0, 0], interior = [0, 0, 0, 0, 0] : (tensor<1x3x1024x1x1xf32>, tensor) -> tensor<1x3x2048x1x1xf32>
%176 = stablehlo.reshape %175 : (tensor<1x3x2048x1x1xf32>) -> tensor<1x3x2048xf32>

```

- [x] mul of pad with 0 (becomes pad of mul) https://github.com/EnzymeAD/Enzyme-JAX/commit/44026d4ab0b6353bc13869311b4536c9ff6c4b75
```
%175 = stablehlo.pad %174, %constant_0, low = [0, 0, 1024], high = [0, 0, 0], interior = [0, 0, 0] : (tensor<1x3x1024xf32>, tensor) -> tensor<1x3x2048xf32>
%177 = stablehlo.multiply %176, %112 : tensor<1x3x2048xf32>
```

- [x] broadcast of pad (becomes pad of broadcast)
```
%175 = stablehlo.pad %174, %constant_0, low = [0, 0, 1024], high = [0, 0, 0], interior = [0, 0, 0] : (tensor<1x3x1024xf32>, tensor) -> tensor<1x3x2048xf32>
%189 = stablehlo.broadcast_in_dim %177, dims = [0, 2, 4] : (tensor<1x3x2048xf32>) -> tensor<1x1x3x1024x2048xf32>
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.