Skip to content

Commit 5520ce1

Browse files
committed
update comments
1 parent 775d039 commit 5520ce1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,21 +320,22 @@ LogicalResult TensorDescType::verify(
320320
// ---------------------------------------------------------------------
321321
// Case 1: Regular loads/stores.
322322
// ---------------------------------------------------------------------
323-
// Distributed vector shape must be:
324-
// [chunk_size / lane_data_size, lane_data_size]
325-
// If the tensor descriptor shape is 1D, first dimension is ignored (set to 1).
326-
// [lane_data_size]
323+
// The following conditions must be met:
324+
// * tensor_desc[0] == lane_layout[0]
325+
// Distributed vector is a 1D vector with shape:
326+
// [chunk_size]
327327
// ---------------------------------------------------------------------
328328
// Case 2: Block loads/stores
329329
// ---------------------------------------------------------------------
330330
// Additional definitions:
331331
// tensor_size = tensor_desc[0] * .. * tensor_desc[r-1] * array_length
332332
// n_distribution_units = tensor_size / distribution_unit_size
333+
// fragment_size = n_distribution_units * lane_data_size
333334
// Given above definitions, the following conditions must be met:
334335
// * tensor_desc[0] % (lane_layout[0] × lane_data[0]) == 0
335336
// * tensor_desc[1] % (lane_layout[1] × lane_data[1]) == 0
336-
// Distributed vector shape must be:
337-
// [n_distribution_units, lane_data_size]
337+
// Distributed vector is a 1D vector with shape:
338+
// [fragment_size]
338339
FailureOr<VectorType> TensorDescType::getDistributedVectorType() {
339340
auto layout = llvm::dyn_cast_if_present<LayoutAttr>(getLayout());
340341
// It only works for subgroup level layout, which only has lane_layout

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ LogicalResult LoadNdOp::verify() {
295295
}
296296

297297
// Check SIMD mode.
298-
// adjusted tensor descriptor shape tracks the expected shape of the result.
299298
auto tdescShape = getShapeOf(tdescTy);
300299
auto valueShape = getShapeOf(valueTy);
301300

0 commit comments

Comments
 (0)