EnzymeAD / EnzymeAD/Enzyme-JAX
Propagate Constants into Body of Operations
- Dominant language
- MLIR
- Stars
- 131
- Forks
- 53
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 193
Description
see
```
module {
func.func @main(%arg0: tensor<64x3xf32>, %arg1: tensor<45x1xi32>, %arg2: tensor<45x3xf32>) -> (tensor<64x3xf32>, tensor<45x1xi32>) {
%cst = stablehlo.constant dense<0.000000e+00> : tensor<64x3xf32>
%c = stablehlo.constant dense<0> : tensor<45x1xi32>
%0 = "stablehlo.scatter"(%cst, %arg1, %arg2) <{indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter, unique_indices = false}> ({
^bb0(%arg3: tensor, %arg4: tensor):
%1 = stablehlo.add %arg3, %arg4 : tensor
stablehlo.return %1 : tensor
}) : (tensor<64x3xf32>, tensor<45x1xi32>, tensor<45x3xf32>) -> tensor<64x3xf32>
return %0, %c : tensor<64x3xf32>, tensor<45x1xi32>
}
}
```
cc @avik-pal from https://github.com/EnzymeAD/Enzyme-JAX/pull/316/files#diff-64736ed56dc6dee528feea567b5f53131040242c0c9fe336706bda72a9600ed2
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.