[Mlir-commits] [mlir] [MLIR][XeGPU] Return element count from uarch for scatter ops (PR #206704)

Jianhui Li llvmlistbot at llvm.org
Sat Oct 17 22:13:36 PDT 2026


================
@@ -208,17 +208,21 @@ struct ScatterIoInstructionInterface : public Instruction {
     return B->getInstructionKind() == Kind;
   }
 
-  virtual int32_t getMaxLaneAccessSizeBytes() const = 0;
+  virtual int32_t getMaxLaneAccessSizeElements(int32_t elemBitwidth) const = 0;
   virtual ~ScatterIoInstructionInterface() = default;
 };
 struct LoadGatherInstruction
     : public ScatterIoInstructionInterface<InstructionKind::LoadGather> {
-  int32_t getMaxLaneAccessSizeBytes() const override { return 16; }
+  int32_t getMaxLaneAccessSizeElements(int32_t elemBitwidth) const override {
+    return 16 / (elemBitwidth / 8);
----------------
Jianhui-Li wrote:

If eleBitwidth is 4, then div-by-zero?

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


More information about the Mlir-commits mailing list