Skip to content

Commit ded9552

Browse files
committed
add comments
1 parent 7846955 commit ded9552

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def XeGPU_CreateNdDescOp: XeGPU_Op<"create_nd_tdesc", [Pure, ViewLikeOpInterface
189189
rank = getMixedSizes().size();
190190

191191
// The offsets are allowed to be empty. The Traits verification of OffsetSizeAndStrideOpInterface interface assumes offsets being present.
192-
// It is set to be MAX to indicate user not passed any value, instead of kDynamic which means offsets passed as value.
192+
// place-holder value MAX indicating user doesn't provide offsets, instead of kDynamic which means offsets passed as value.
193193
setConstOffsets(llvm::SmallVector<int64_t, 4>(rank, std::numeric_limits<int64_t>::max()));
194194

195195
attr = getConstOffsetsAttr();
@@ -204,7 +204,7 @@ def XeGPU_CreateNdDescOp: XeGPU_Op<"create_nd_tdesc", [Pure, ViewLikeOpInterface
204204
ArrayRef<int64_t> getStaticSizes() {
205205
/// To be compatible with OffsetSizeAndStrideOpInterface, which expects valid return value and perform checks
206206
static llvm::SmallVector<int64_t, 4> emptyShape;
207-
207+
208208
auto attr = getConstShapeAttr();
209209
if (attr)
210210
return attr;

mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ void printOptionalDynamicIndexList(OpAsmPrinter &printer, Operation *op,
334334
TypeRange valueTypes = TypeRange()) {
335335

336336
if (values.empty() && llvm::all_of(integers, [](int64_t i) {
337+
// place-holder value MAX indicating user doesn't provide offsets
337338
return i == std::numeric_limits<int64_t>::max();
338339
}))
339340
return;

0 commit comments

Comments
 (0)