[Mlir-commits] [mlir] [ROCDL] Added `rocdl.cvt.scale.pk8` ops (PR #161411)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Oct 1 07:15:25 PDT 2025


================
@@ -1010,13 +1011,30 @@ foreach smallT = [
         attr-dict $src `,` $scale `[` $scaleSel `]` `:` type($res)
       }];
     }
+
+    // Down-scaling
+    def ROCDL_CvtScaleF32Pk8 # smallT.nameForOp # largeT.nameForOp # Op :
+        ROCDL_ConcreteNonMemIntrOp<"cvt.scalef32.pk8." # smallT.name # "." # largeT.name,
----------------
ravil-mobile wrote:

I believe it is correct. The syntax of the op is: ROCDL_Cvf<suffix>.<target dtype>.<source dtype>

Here is an example: https://github.com/llvm/llvm-project/blob/a05e004b285af92f9bcef12d5ab5537c36002c13/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td#L999-L1000

This upcast the source given in low precision dtype to a high precision one

https://github.com/llvm/llvm-project/pull/161411


More information about the Mlir-commits mailing list