[Mlir-commits] [mlir] [MLIR][XeGPU] Update XeGPU create_tdesc, update_offset, load, store and prefetch. (PR #154653)
Chao Chen
llvmlistbot at llvm.org
Fri Aug 22 09:13:20 PDT 2025
================
@@ -124,22 +122,37 @@ isValidGatherScatterParams(Type maskTy, VectorType valueTy,
}
static LogicalResult
-isValidGatherScatterBufferParams(Type maskTy, VectorType valueTy,
- int64_t chunkSize,
+isValidGatherScatterBufferParams(Type offsetsTy, Type maskTy,
+ VectorType valueTy, int64_t chunkSize,
function_ref<InFlightDiagnostic()> emitError) {
- if (!valueTy)
- return emitError() << "Expecting a vector type result.";
+ auto maskVecTy = dyn_cast<VectorType>(maskTy);
+ auto offsetsVecTy = dyn_cast<VectorType>(offsetsTy);
+ if (!valueTy) {
+ if (chunkSize > 1)
+ return emitError() << "Expecting chunk size == 1 for scalar result";
+ if (maskVecTy || offsetsVecTy)
----------------
chencha3 wrote:
nit: maybe using `llvm::all_of` to check all of mask, value, and offsets are VectorType or ScalarType help to increase the code readability.
https://github.com/llvm/llvm-project/pull/154653
More information about the Mlir-commits
mailing list