mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-11 08:50:17 +00:00
Add tensor partition and generic copy for ck wrapper (#1108)
* Add tensor partition and generic copy for ck wrapper * Update changelog * Stylistic fixes * Change shape/strides logic to descriptor transforms * Fixes * Fix client example * Fix comments
This commit is contained in:
@@ -178,4 +178,15 @@ __host__ __device__ constexpr auto TupleDepth(const Tuple<Ts...>&)
|
||||
return math::max(TupleDepth<depth + 1>(Ts{})...);
|
||||
}
|
||||
|
||||
template <index_t from, index_t to, typename... Ts>
|
||||
__host__ __device__ constexpr auto TupleSlice(const Tuple<Ts...>& tuple)
|
||||
{
|
||||
return generate_tuple(
|
||||
[&](auto i) {
|
||||
using Idx = Number<from + i>;
|
||||
return tuple.At(Idx{});
|
||||
},
|
||||
Number<to - from>{});
|
||||
}
|
||||
|
||||
} // namespace ck
|
||||
|
||||
Reference in New Issue
Block a user