EnzymeAD / EnzymeAD/Reactant.jl

Broadcasting Operations: invalid MLIR generated

Open
#333 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
370
Forks
74
Avg merge
18h 47m
Merged PRs (30d)
30

Description

I don't know if that kind of invalid generation is interesting to fix.
```
using Reactant
Reactant.set_default_backend("cpu")
x = Reactant.ConcreteRArray(randn(Float64, 2, 2))
@code_hlo x .- x .+ x
```

```
module {
func.func @main(%arg0: tensor<2x2xf64>, %arg1: tensor<2x2xf64>) -> tensor<2x2xf64> {
%0 = stablehlo.transpose %arg0, dims = [1, 0] : (tensor<2x2xf64>) -> tensor<2x2xf64>
%1 = stablehlo.transpose %arg1, dims = [1, 0] : (tensor<2x2xf64>) -> tensor<2x2xf64>
%2 = stablehlo.add %0, %1 : tensor<2x2xf64>
%3 = stablehlo.transpose %2, dims = [1, 0] : (tensor<2x2xf64>) -> tensor<2x2xf64>
return %3 : tensor<2x2xf64>
}
}
```

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.