Skip to content

Commit

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

* correct affine2row::packed

---------

Co-authored-by: Haicheng Wu <haichengw@nvidia.com>
  • Loading branch information
sjfeng1999 and hwu36 authored Mar 29, 2023
1 parent 15d9d31 commit bc36122
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 bc36122

Please sign in to comment.