Updates and Bug fixes to CUTLASS 3.3 (#1232)
This commit is contained in:
@@ -449,6 +449,30 @@ recast_layout(Swizzle<B,M,S> const& swizzle)
|
||||
// Other operations
|
||||
//
|
||||
|
||||
template <int B, int M, int S, class Offset, class LayoutB, class Shape, class Stride>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
auto
|
||||
max_common_layout(ComposedLayout<Swizzle<B,M,S>,Offset,LayoutB> const& a,
|
||||
Layout<Shape,Stride> const& b)
|
||||
{
|
||||
auto common = max_common_layout(a.layout_b(), b);
|
||||
auto base = Int<(1 << M)>{};
|
||||
if constexpr (base < size(common)) {
|
||||
return common.compose(base); // Truncate common to size base
|
||||
} else {
|
||||
return common;
|
||||
}
|
||||
}
|
||||
|
||||
template <class Shape, class Stride, int B, int M, int S, class Offset, class LayoutB>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
auto
|
||||
max_common_layout(Layout<Shape,Stride> const& a,
|
||||
ComposedLayout<Swizzle<B,M,S>,Offset,LayoutB> const& b)
|
||||
{
|
||||
return max_common_layout(b, a);
|
||||
}
|
||||
|
||||
template <int B, int M, int S, class Offset, class LayoutB, class Shape, class Stride>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
auto
|
||||
|
||||
Reference in New Issue
Block a user