@@ -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 ]
338339FailureOr<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
0 commit comments