From 88773181e8d6ce6032c4660d30abb3347a6cba59 Mon Sep 17 00:00:00 2001 From: Feng Shijie Date: Wed, 29 Mar 2023 23:59:48 +0800 Subject: [PATCH] [layout] Fix AffineRank2ColumnMajor::packed() (#879) * [layout] Fix AffineRank2ColumnMajor::packed() * correct affine2row::packed --------- Co-authored-by: Haicheng Wu --- include/cutlass/layout/matrix.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cutlass/layout/matrix.h b/include/cutlass/layout/matrix.h index fe7a8489..c9e9c31c 100644 --- a/include/cutlass/layout/matrix.h +++ b/include/cutlass/layout/matrix.h @@ -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. @@ -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.