-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Which component has the problem?
CUTLASS C++
Bug Report
Describe the bug
The packed() static method in AffineRank2RowMajor class incorrectly calculates strides for row-major matrix layout. Both AffineRank2RowMajor::packed() and AffineRank2ColumnMajor::packed() methods currently return the same parameters (1, extent.row()), which is only correct for column-major layout.
Steps/Code to reproduce bug
// Row-major version (INCORRECT)
static AffineRank2RowMajor packed(MatrixCoord const &extent) {
return AffineRank2RowMajor(1, extent.row()); // Wrong parameters
}
// Column-major version (CORRECT)
static AffineRank2ColumnMajor packed(MatrixCoord const &extent) {
return AffineRank2ColumnMajor(1, extent.row()); // Correct for column-major
}
Expected behavior
// Fixed row-major implementation
static AffineRank2RowMajor packed(MatrixCoord const &extent) {
return AffineRank2RowMajor(extent.column(), 1); // stride_row = num_cols
}
// Column-major remains correct
static AffineRank2ColumnMajor packed(MatrixCoord const &extent) {
return AffineRank2ColumnMajor(1, extent.row()); // stride_col = num_rows
}