Updates for CUTLASS 3.5.0 (#1468)
This commit is contained in:
@@ -92,59 +92,6 @@ struct Copy_Traits<AutoVectorizingCopyWithAssumedAlignment<MaxVecBits>>
|
||||
using RefLayout = SrcLayout;
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Utility for exploding pointers, arrays, or tensors into Operation::copy
|
||||
template <class Operation,
|
||||
class PtrSrc, int... Is,
|
||||
class PtrDst, int... Id>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
void
|
||||
copy_explode_index(PtrSrc&& s, int_sequence<Is...>,
|
||||
PtrDst&& d, int_sequence<Id...>)
|
||||
{
|
||||
return Operation::copy(s[Is]..., d[Id]...);
|
||||
}
|
||||
|
||||
// Utility for exploding tuples into ::copy
|
||||
template <class Operation,
|
||||
class TupleArg, int... I>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
void
|
||||
copy_explode(TupleArg&& t, int_sequence<I...>)
|
||||
{
|
||||
return Operation::copy(get<I>(static_cast<TupleArg&&>(t))...);
|
||||
}
|
||||
|
||||
template <class Operation,
|
||||
class TupleSrc, int... Is,
|
||||
class TupleDst, int... Id>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
void
|
||||
copy_explode(TupleSrc&& s, int_sequence<Is...>,
|
||||
TupleDst&& d, int_sequence<Id...>)
|
||||
{
|
||||
return Operation::copy(get<Is>(static_cast<TupleSrc&&>(s))...,
|
||||
get<Id>(static_cast<TupleDst&&>(d))...);
|
||||
}
|
||||
|
||||
template <class Operation,
|
||||
class TupleAux, int... Ia,
|
||||
class TupleSrc, int... Is,
|
||||
class TupleDst, int... Id>
|
||||
CUTE_HOST_DEVICE constexpr
|
||||
void
|
||||
copy_explode(TupleAux&& a, int_sequence<Ia...>,
|
||||
TupleSrc&& s, int_sequence<Is...>,
|
||||
TupleDst&& d, int_sequence<Id...>)
|
||||
{
|
||||
return Operation::copy(get<Ia>(static_cast<TupleAux&&>(a))...,
|
||||
get<Is>(static_cast<TupleSrc&&>(s))...,
|
||||
get<Id>(static_cast<TupleDst&&>(d))...);
|
||||
}
|
||||
|
||||
} // end namespace detail
|
||||
|
||||
//
|
||||
// Generic copy_unpack for common argument-based Copy_Traits
|
||||
//
|
||||
@@ -177,8 +124,9 @@ copy_unpack(Copy_Traits<CopyOp,Args...> const&,
|
||||
CUTE_STATIC_ASSERT_V(size(rD) == Int<RegNumDst>{},
|
||||
"Copy_Traits: dst failed to vectorize into registers. Layout is incompatible with this CopyOp.");
|
||||
|
||||
detail::copy_explode_index<CopyOp>(rS, make_int_sequence<RegNumSrc>{},
|
||||
rD, make_int_sequence<RegNumDst>{});
|
||||
detail::explode(detail::CallCOPY<CopyOp>{},
|
||||
rS, make_int_sequence<RegNumSrc>{},
|
||||
rD, make_int_sequence<RegNumDst>{});
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user