@@ -39,6 +39,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "cute/layout.hpp"
|
||||
|
||||
#include "cutlass/cutlass.h"
|
||||
#include "cutlass/fast_math.h"
|
||||
#include "cutlass/matrix_coord.h"
|
||||
@@ -143,6 +145,15 @@ public:
|
||||
LongIndex capacity(MatrixCoord const &extent) const {
|
||||
return LongIndex(extent.row()) * LongIndex(stride_[0]);
|
||||
}
|
||||
|
||||
CUTLASS_HOST_DEVICE
|
||||
cute::Layout<cute::Shape<int, int>, cute::Stride<int64_t, cute::Int<1> > >
|
||||
to_cute_layout(MatrixCoord const &extent) const {
|
||||
return cute::Layout<cute::Shape<int, int>, cute::Stride<int64_t, cute::Int<1> > >{
|
||||
{extent[0], extent[1]},
|
||||
{stride(0), cute::Int<1>{}}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/// Mapping function for column-major matrices.
|
||||
@@ -236,6 +247,15 @@ public:
|
||||
LongIndex capacity(MatrixCoord const &extent) const {
|
||||
return LongIndex(extent.column()) * LongIndex(stride_[0]);
|
||||
}
|
||||
|
||||
CUTLASS_HOST_DEVICE
|
||||
cute::Layout<cute::Shape<int, int>, cute::Stride< cute::Int<1>, int64_t> >
|
||||
to_cute_layout(MatrixCoord const &extent) const {
|
||||
return cute::Layout<cute::Shape<int, int>, cute::Stride<cute::Int<1>, int64_t> >{
|
||||
{extent[0], extent[1]},
|
||||
{cute::Int<1>{}, stride(0)}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/// Mapping function for interleaved matrices. Matrix is structured
|
||||
|
||||
Reference in New Issue
Block a user