jax icon indicating copy to clipboard operation
jax copied to clipboard

Mosaic failed to compile TPU kernel: Target does not support this comparison

Open liudangyi opened this issue 1 year ago • 2 comments

XlaRuntimeError: INTERNAL: Mosaic failed to compile TPU kernel: Target does not support this comparison

The MLIR operation involved:
  %13060 = "arith.cmpf"(%11789, %283) <{fastmath = #arith.fastmath<none>, predicate = 1 : i64}> : (vector<8x128x2xbf16>, vector<8x128x2xbf16>) -> vector<8x128x2xi1>
... additional diagnostics were skipped.

The error is triggered by calling this line in a pallas kernel.

My TPU is v5p. When using v6e, there's no such error.

liudangyi avatar Jul 10 '25 00:07 liudangyi

After I remove the offending line, I got another unsupported error from this line

The MLIR operation involved:
  %18946 = "math.roundeven"(%13835) <{fastmath = #arith.fastmath<none>}> : (vector<8x128x2xbf16>) -> vector<8x128x2xbf16>

@apaszke because I cannot assign issues.

liudangyi avatar Jul 10 '25 00:07 liudangyi

I believe bf16 cmpf on v5p is supported now.

yueshengys avatar Apr 21 '26 19:04 yueshengys