You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StableHLO spec for cbrt specifies that it should support complex numbers but when I try to run it, it crashes with the following error:
terminate called after throwing an instance of 'xla::XlaRuntimeError'
what(): UNKNOWN: <unknown>:0: error: Expected element type in shape to be floating for cbrt operation; got C128.:
<unknown>:0: note: see current operation: "func.return"(%0) : (tensor<4xcomplex<f64>>) -> ()
You can forget about the transposes since we use them to accommodate Julia's column-major layout to MLIR's row-major layout and are later optimized away.
The text was updated successfully, but these errors were encountered:
mofeing
changed the title
stablehlo.cbrt crashes with complex numbers when StableHLO says it should support itstablehlo.cbrt crashes with complex numbers when StableHLO spec supports it
Nov 19, 2024
case HloOpcode::kCbrt: // Complex cbrt is not implemented in either of the
@GleasonK do you know why stablehlo allows complex type? Do we have some wrong documentation about what types are supported somewhere in XLA?
The fix to shape inference (i.e. check for what is actually supported) was done in this PR: #18438
I hesitated adding a complex variant of cbrt back in the day because the principal and real valued roots disagreed when the input was real. That said, we should just spec it as the principal root:
from EnzymeAD/Reactant.jl#291
CC @wsmoses
StableHLO spec for
cbrt
specifies that it should support complex numbers but when I try to run it, it crashes with the following error:MWE
The MLIR code for the MWE is the following:
You can forget about the
transpose
s since we use them to accommodate Julia's column-major layout to MLIR's row-major layout and are later optimized away.The text was updated successfully, but these errors were encountered: