[Mlir-commits] [mlir] [mlir][amdgpu] Define an amdgpu.scaling_mfma	wrapper (PR #137498)
    Krzysztof Drewniak 
    llvmlistbot at llvm.org
       
    Wed Apr 30 13:27:12 PDT 2025
    
    
  
================
@@ -528,6 +529,25 @@ static Value convertMFMAVectorOperand(ConversionPatternRewriter &rewriter,
   return input;
 }
 
+/// Converts the scaled MFMA operands, `scalesA` and `scalesB`, from MLIR AMDGPU
+/// dialect convention to ROCDL and LLVM AMDGPU intrinsics convention.
+///
+/// Specifically:
+/// 1. If `input` is a i8 value, zero extend it to i32
+/// 2. If `input` is a vector of length 4 and type i8, cast it to i32
+///
+/// Note that the type of `input` has already been LLVM type converted:
+/// therefore 8-bit and smaller floats are represented as their corresponding
+/// `iN` integers.
+static Value castScaledMFMAVectorOperand(ConversionPatternRewriter &rewriter,
----------------
krzysz00 wrote:
`castMFMAScaleOperand` maybe?
https://github.com/llvm/llvm-project/pull/137498
    
    
More information about the Mlir-commits
mailing list