Skip to content

Commit

Permalink
[layout] Fix AffineRank2ColumnMajor::packed() (#879)
Browse files Browse the repository at this point in the history
* [layout] Fix AffineRank2ColumnMajor::packed()

* correct affine2row::packed

---------

Co-authored-by: Haicheng Wu <[email protected]>
  • Loading branch information
2 people authored and ttl10101 committed Feb 7, 2024
1 parent b2b17db commit 8877318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cutlass/layout/matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ struct AffineRank2ColumnMajor {
/// Helper returns a layout to a tightly packed tensor
CUTLASS_HOST_DEVICE
static AffineRank2ColumnMajor packed(MatrixCoord const &extent) {
return AffineRank2ColumnMajor(extent.column(), 1);
return AffineRank2ColumnMajor(1, extent.row());
}

/// Returns the offset of a coordinate in linear memory.
Expand Down Expand Up @@ -911,7 +911,7 @@ struct AffineRank2RowMajor {
/// Helper returns a layout to a tightly packed tensor
CUTLASS_HOST_DEVICE
static AffineRank2RowMajor packed(MatrixCoord const &extent) {
return AffineRank2RowMajor(extent.column(), 1);
return AffineRank2RowMajor(1, extent.row());
}

/// Returns the offset of a coordinate in linear memory.
Expand Down

0 comments on commit 8877318

Please sign in to comment.