[Mlir-commits] [mlir] [MLIR][XeGPU] Add truncf and dpas_mx ops (PR #180059)
Sang Ik Lee
llvmlistbot at llvm.org
Thu Feb 12 10:20:05 PST 2026
================
@@ -1719,4 +1719,142 @@ def XeGPU_StoreMatrixOp: XeGPU_Op<"store_matrix", [MemoryEffects<[MemWrite]>,
let hasVerifier = 1;
}
+def XeGPU_TruncfOp
+ : XeGPU_Op<"truncf", [AllRanksMatch<["source", "result"]>,
+ AllShapesMatch<["source", "result"]>, Pure]> {
+ let summary = "It performs floating point truncation from higher precision "
+ "to lower precision.";
+
+ let description =
+ [{The `xegpu.truncf` operation truncates floating point values from a higher
+ precision type to a lower precision type.
+ Converts `f16` and `bf16` to microscaling float types.
+ Rounding mode defaults to round to nearest even.
----------------
silee2 wrote:
Will add an attribute for rounding mode once another rounding mode is added.
Since default attribute values can be set in builder are not printed, adding an attribute now does not have noticeable user impact anyway.
https://github.com/llvm/llvm-project/pull/180059
More information about the Mlir-commits
mailing list