EnzymeAD / EnzymeAD/Reactant.jl
`Ops.cbrt` crashes for complex number but spec says it supports them
- Dominant language
- Julia
- Stars
- 370
- Forks
- 74
- Avg merge
- 18h 47m
- Merged PRs (30d)
- 30
Description
The test is the following:
```julia
x = ConcreteRArray([1.0 + 2.0im, 8.0 + 16.0im, 27.0 + 54.0im, 64.0 + 128.0im])
@test Array(x) .^ (1//3) ≈ @jit Ops.cbrt(x)
```
and yields the following error: https://github.com/EnzymeAD/Reactant.jl/actions/runs/11915696798/job/33206565483?pr=267#step:9:812
```
terminate called after throwing an instance of 'xla::XlaRuntimeError'
what(): UNKNOWN: :0: error: Expected element type in shape to be floating for cbrt operation; got C128.:
:0: note: see current operation: "func.return"(%0) : (tensor<4xcomplex>) -> ()
```
The [StableHLO spec](https://openxla.org/stablehlo/spec#cbrt) says it supports complex numbers

@wsmoses should we raise this to XLA repo?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.