/*************************************************************************************************** * Copyright (c) 2023 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * **************************************************************************************************/ #pragma once #include #include #include #include #include #include #include namespace cute { template <> struct Copy_Traits { // Logical thread id to thread idx (one-thread) using ThrID = Layout<_1>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout>; // Reference map from (thr,val) to bit using RefLayout = SrcLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (one-thread) using ThrID = Layout<_1>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout>; // Reference map from (thr,val) to bit using RefLayout = SrcLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,_128>, Stride, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout,Shape <_8, _2, _2, _2>>, Stride,Stride<_1,_128,_64,_1024>>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,_128>, Stride, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout,Shape <_8, _2, _2, _4>>, Stride,Stride<_1,_128,_64,_1024>>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,_128>, Stride, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout, Stride<_32, _1>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,_128>, Stride, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout, Stride<_32, _1>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,_128>, Stride, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout>, Stride<_32,Stride< _1,_1024>>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,_128>, Stride, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout>, Stride<_32,Stride< _1,_1024>>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout, Stride<_128, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout>, Stride<_32,Stride< _1,_1024>>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout, Stride<_128, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout>, Stride<_32,Stride< _1,_1024>>>; // Reference map from (thr,val) to bit using RefLayout = DstLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,Shape <_8, _2, _2>>, Stride,Stride<_1,_128,_64>>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout,_128>, Stride, _1>>; // Reference map from (thr,val) to bit using RefLayout = SrcLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,Shape <_8, _2, _2, _2>>, Stride,Stride<_1,_128,_64,_1024>>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout,_128>, Stride, _1>>; // Reference map from (thr,val) to bit using RefLayout = SrcLayout; }; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout,Shape <_8, _2, _2, _4>>, Stride,Stride<_1,_128,_64,_1024>>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout, Stride<_128, _1>>; // Reference map from (thr,val) to bit using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// // // TMEM Traits and Utilities // //////////////////////////////////////////////////////////////////////////////////////////////////// template struct Copy_Atom; /** Generate a TiledCopy from a CopyAtom and a TMEM tensor * Example: * Tensor gmem_tensor = ... // (M,N,...) * Tensor tmem_tensor = ... // (M,N,...) * auto tiled_tmem_load = make_tmem_copy(TMEM_LOAD_Operation, tmem_tensor); * auto thr_tmem_load = tiled_tmem_load.get_slice(thread_idx); * * Tensor tDtC = thr_tmem_load.partition_S(tmem_tensor); // (TMEM_LOAD,TMEM_LOAD_M,TMEM_LOAD_N,...) * Tensor tDgC = thr_tmem_load.partition_D(gmem_tensor); // (TMEM_LOAD,TMEM_LOAD_M,TMEM_LOAD_N,...) * Tensor tDrC = make_tensor(shape(tDgD)); // (TMEM_LOAD,TMEM_LOAD_M,TMEM_LOAD_N,...) * * copy(tiled_tmem_load, tDtC, tDrC); // tmem -> rmem * copy(tDrC, tDgC); // rmem -> gmem */ template CUTE_HOST_DEVICE constexpr auto make_tmem_copy(Copy_Atom const& atom, Tensor const& tmem) { static_assert(is_tmem::value, "Expected TMEM tensor."); using T = typename TEngine::value_type; using Traits = typename Copy_Atom::Traits; static_assert(sizeof_bits_v == sizeof_bits_v, "Expected a CopyAtom with the same type-width as the Tensor."); // atom thr idx -> tmem addr 4warps where each warp points to the same position within it's own subpartition auto atom_t_layout = Layout, Stride<_0, decltype(Int<32>{} * TMEM::DP{})>>{}; // atom val idx -> tmem addr Cast the CopyOp's value ids to the proper data width auto atom_v_layout = coalesce(upcast::value>(typename Traits::ValID{})); return make_cotiled_copy(atom, make_layout(atom_t_layout, atom_v_layout), tmem.layout()); } template CUTE_HOST_DEVICE constexpr auto make_tmem_copy(CopyOp const&, Tensor const& tmem) { return make_tmem_copy(Copy_Atom{}, tmem); } /** Generate a TV_Tiler from a TMEM tensor * Example: * Tensor gmem_tensor = ... // (M,N,...) * Tensor tmem_tensor = ... // (M,N,...) * auto tmem_tiler = make_tmem_warp_partitioner(tmem_tensor); * auto warp_tiler = tmem_tiler.get_slice(warp_idx); * * Tensor tWtC = warp_tiler.partition(tmem_tensor); // (WARP_M,WARP_N,...) * Tensor tWgC = warp_tiler.partition(gmem_tensor); // (WARP_M,WARP_N,...) */ template CUTE_HOST_DEVICE constexpr auto make_tmem_warp_partitioner(Tensor const& tmem) { static_assert(is_tmem::value, "Expected TMEM tensor."); using T = typename TEngine::value_type; // warp idx -> tmem addr This is the T in the Layout_TV auto atom_t_layout = Layout<_4, decltype(Int<32>{} * TMEM::DP{})>{}; // tmem coord -> tmem addr auto tmem_layout = tmem.layout(); // tmem addr -> tmem coord Append 1:0 so off-the-ends get the stride-0 auto inv_tmem_layout = make_layout(left_inverse(tmem_layout), Layout<_1,_0>{}); // wid -> tmem_coord auto layout_t_tmem = composition(inv_tmem_layout, atom_t_layout); // // Tiler -- Find the active elements in the TMEM tensor and generate a tiler to extract them // // Convert to the awkward by-mode tiler to preserve the modes of the tiled TMEM auto flat_tmem_shape = product_each(shape(tmem_layout)); auto flat_tmem_zeros = repeat(Int<0>{}); auto tiler = transform(make_seq{}, [&](auto i) { return filter(composition(make_layout(flat_tmem_shape, replace(flat_tmem_zeros, Int<1>{})), layout_t_tmem)); }); // // Layout_TV -- Find the (tid,vid) -> tile coord transformation // // Apply the tiler to a reference and transform the codomain // tile_coord -> tmem_coord auto tile2tmem = composition(make_layout(flat_tmem_shape), tiler); // wid -> tile_coord auto layout_tv = composition(left_inverse(tile2tmem), layout_t_tmem); return make_tiler_impl(layout_tv, tiler); } namespace SM100::TMEM::LOAD { // // Specialized copy_unpack implementation for SM100::TMEM::LOAD instructions // template CUTE_HOST_DEVICE constexpr void copy_unpack(Copy_Traits const& traits, Tensor const& src, Tensor & dst) { static_assert(is_tmem::value, "Expected TMEM src."); static_assert(is_rmem::value, "Expected RMEM dst."); using SrcType = typename TS::value_type; CUTE_STATIC_ASSERT_V((coalesce(layout(src)) == coalesce(upcast::value>(typename Copy_Traits::ValID{}))), "Expected src to have the specific TMEM layout required by CopyOp."); uint32_t tmem_addr = raw_pointer_cast(src.data()); using RegTypeDst = typename remove_extent::type; Tensor rD = recast(dst); constexpr int RegNumDst = extent::value; CUTE_STATIC_ASSERT_V(size(rD) == Int{}, "In CopyAtom, dst layout doesn't vectorize into registers. This dst layout is incompatible with this CopyOp."); // thread idx <=> DP lane assert. // ASSERT TMEM_LOAD thread attemping to access DP lane within sub-partition. #if defined(__CUDA_ARCH__) && !defined(NDEBUG) assert(((uint32_t(threadIdx.x) / 32) % 4) == (((tmem_addr >> 16) / 32) % 4)); #endif detail::explode(CopyOp::copy, &tmem_addr, seq<0>{}, rD, make_seq{}); } } // end namespace SM100::TMEM::LOAD namespace SM100::TMEM::STORE { // // Specialized copy_unpack implementation for SM100::TMEM::STORE instructions // template CUTE_HOST_DEVICE constexpr void copy_unpack(Copy_Traits const& traits, Tensor const& src, Tensor & dst) { static_assert(is_rmem::value, "Expected RMEM src."); static_assert(is_tmem::value, "Expected TMEM dst."); using RegTypeSrc = typename remove_extent::type; Tensor rS = recast(src); constexpr int RegNumSrc = extent::value; CUTE_STATIC_ASSERT_V(size(rS) == Int{}, "In CopyAtom, src layout doesn't vectorize into registers. This src layout is incompatible with this tiled copy."); using DstType = typename TD::value_type; CUTE_STATIC_ASSERT_V((coalesce(layout(dst)) == coalesce(upcast::value>(typename Copy_Traits::ValID{}))), "Expected dst to have the specific TMEM layout required by CopyOp."); uint32_t tmem_addr = raw_pointer_cast(dst.data()); // thread idx <=> DP lane assert. // ASSERT TMEM_LOAD thread attemping to access DP lane within sub-partition. #if defined(__CUDA_ARCH__) && !defined(NDEBUG) assert(((uint32_t(threadIdx.x) / 32) % 4) == (((tmem_addr >> 16) / 32) % 4)); #endif detail::explode(CopyOp::copy, rS, make_seq{}, &tmem_addr, seq<0>{}); } } // end namespace SM100::TMEM::STORE //////////////////////////////////////////////////////////////////////////////////////////////////// // // TMEM_LOAD Copy Traits // //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b1x; template <> struct Copy_Traits { // Logical thread id to thread idx (warp) using ThrID = Layout<_32>; // Logical bit id to bit idx (address) using ValID = Layout, Stride< _1,TMEM::DP_b>>; // Map from (src-thr,src-val) to bit using SrcLayout = Layout, Stride< _0, _1>>; // Map from (dst-thr,dst-val) to bit using DstLayout = Layout,Shape <_64, _2>>, Stride,Stride< _1,_2048>>>; // Reference map from (thr,val) to bit using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b1x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2>>, Stride,Stride< _1,_2048>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b2x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _2>>, Stride,Stride< _1,_4096,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b2x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _2>>, Stride,Stride< _1,_4096,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b4x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _4>>, Stride,Stride< _1,_8192,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b4x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _4>>, Stride,Stride< _1,_8192,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b8x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _8>>, Stride,Stride< _1,_16384,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b8x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _8>>, Stride,Stride< _1,_16384,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b16x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _16>>, Stride,Stride< _1,_32768,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b16x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _16>>, Stride,Stride< _1,_32768,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b32x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _32>>, Stride,Stride< _1,_65536,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp256b32x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_64, _2, _32>>, Stride,Stride< _1,_65536,_256>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b1x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2>>, Stride,Stride< _1,_1024>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b1x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2>>, Stride,Stride< _1,_1024>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b2x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _2>>, Stride,Stride< _1,_2048,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b2x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _2>>, Stride,Stride< _1,_2048,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b4x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _4>>, Stride,Stride< _1,_4096,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b4x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _4>>, Stride,Stride< _1,_4096,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b8x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _8>>, Stride,Stride< _1,_8192,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b8x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _8>>, Stride,Stride< _1,_8192,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b16x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _16>>, Stride,Stride< _1,_16384,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b16x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _16>>, Stride,Stride< _1,_16384,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b32x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _32>>, Stride,Stride< _1,_32768,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b32x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _32>>, Stride,Stride< _1,_32768,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b64x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _64>>, Stride,Stride< _1,_65536,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp128b64x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2, _64>>, Stride,Stride< _1,_65536,_128>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b1x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_32>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b1x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_32>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b2x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b2x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _2>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b4x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _4>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b4x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _4>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b8x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _8>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b8x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32, _8>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b16x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_16>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b16x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_16>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b32x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_32>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b32x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_32>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b64x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_64>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b64x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_64>>, Stride,Stride< _1,_64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b128x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_128>>, Stride,Stride< _1, _64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp64b128x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,Shape <_32,_128>>, Stride,Stride< _1, _64>>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b1x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_32>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b1x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_32>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b2x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_64>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b2x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_64>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b4x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_128>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b4x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_128>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b8x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_256>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b8x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_256>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b16x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_512>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b16x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_512>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b32x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_1024>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b32x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_1024>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b64x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_2048>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b64x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_2048>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b128x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_4096>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_16dp32b128x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _16>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout,_4096>, Stride, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b1x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_32, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b1x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_32, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b2x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_64, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b2x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_64, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b4x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_128, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b4x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_128, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b8x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_256, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b8x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_256, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b16x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_512, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b16x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_512, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b32x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_1024, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b32x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_1024, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b64x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_2048, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b64x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_2048, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b128x; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, Stride< _1,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_4096, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::LOAD::SM100_TMEM_LOAD_32dp32b128x_16b; template <> struct Copy_Traits { using ThrID = Layout<_32>; using ValID = Layout, _32>, Stride,TMEM::DP_b>>; using SrcLayout = Layout, Stride< _0, _1>>; using DstLayout = Layout, Stride<_4096, _1>>; using RefLayout = SrcLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // // TMEM_STORE Copy Traits // //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b1x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b1x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b2x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b2x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b4x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b4x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b8x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b8x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b16x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b16x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b32x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp256b32x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b1x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b1x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b2x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b2x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b4x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b4x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b8x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b8x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b16x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b16x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b32x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b32x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b64x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp128b64x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b1x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b1x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b2x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b2x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b4x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b4x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b8x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b8x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b16x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b16x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b32x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b32x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b64x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b64x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b128x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp64b128x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b1x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b1x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b2x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b2x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b4x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b4x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b8x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b8x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b16x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b16x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b32x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b32x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b64x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b64x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b128x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_16dp32b128x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b1x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b1x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b2x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b2x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b4x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b4x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b8x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b8x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b16x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b16x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b32x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b32x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b64x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b64x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b128x; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::STORE::SM100_TMEM_STORE_32dp32b128x_16b; template <> struct Copy_Traits { using ThrID = typename Copy_Traits::ThrID; using ValID = typename Copy_Traits::ValID; using SrcLayout = typename Copy_Traits::DstLayout; using DstLayout = typename Copy_Traits::SrcLayout; using RefLayout = typename Copy_Traits::RefLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// namespace TMEM { //////////////////////////////////////////////////////////////////////////////////////////////////// // Given a 1x tmem copy op, returns the widest repeated variant that divides the specified bits in the N-mode template CUTE_HOST_DEVICE constexpr auto op_repeater() { if constexpr (cute::is_same_v) { if constexpr (bits_n % (256 * 32) == 0) { return SM100_TMEM_LOAD_16dp256b32x{}; } else if constexpr (bits_n % (256 * 16) == 0) { return SM100_TMEM_LOAD_16dp256b16x{}; } else if constexpr (bits_n % (256 * 8) == 0) { return SM100_TMEM_LOAD_16dp256b8x{}; } else if constexpr (bits_n % (256 * 4) == 0) { return SM100_TMEM_LOAD_16dp256b4x{}; } else if constexpr (bits_n % (256 * 2) == 0) { return SM100_TMEM_LOAD_16dp256b2x{}; } else if constexpr (bits_n % (256 * 1) == 0) { return SM100_TMEM_LOAD_16dp256b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (256 * 32) == 0) { return SM100_TMEM_LOAD_16dp256b32x_16b{}; } else if constexpr (bits_n % (256 * 16) == 0) { return SM100_TMEM_LOAD_16dp256b16x_16b{}; } else if constexpr (bits_n % (256 * 8) == 0) { return SM100_TMEM_LOAD_16dp256b8x_16b{}; } else if constexpr (bits_n % (256 * 4) == 0) { return SM100_TMEM_LOAD_16dp256b4x_16b{}; } else if constexpr (bits_n % (256 * 2) == 0) { return SM100_TMEM_LOAD_16dp256b2x_16b{}; } else if constexpr (bits_n % (256 * 1) == 0) { return SM100_TMEM_LOAD_16dp256b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (128 * 64) == 0) { return SM100_TMEM_LOAD_16dp128b64x{}; } else if constexpr (bits_n % (128 * 32) == 0) { return SM100_TMEM_LOAD_16dp128b32x{}; } else if constexpr (bits_n % (128 * 16) == 0) { return SM100_TMEM_LOAD_16dp128b16x{}; } else if constexpr (bits_n % (128 * 8) == 0) { return SM100_TMEM_LOAD_16dp128b8x{}; } else if constexpr (bits_n % (128 * 4) == 0) { return SM100_TMEM_LOAD_16dp128b4x{}; } else if constexpr (bits_n % (128 * 2) == 0) { return SM100_TMEM_LOAD_16dp128b2x{}; } else if constexpr (bits_n % (128 * 1) == 0) { return SM100_TMEM_LOAD_16dp128b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (128 * 64) == 0) { return SM100_TMEM_LOAD_16dp128b64x_16b{}; } else if constexpr (bits_n % (128 * 32) == 0) { return SM100_TMEM_LOAD_16dp128b32x_16b{}; } else if constexpr (bits_n % (128 * 16) == 0) { return SM100_TMEM_LOAD_16dp128b16x_16b{}; } else if constexpr (bits_n % (128 * 8) == 0) { return SM100_TMEM_LOAD_16dp128b8x_16b{}; } else if constexpr (bits_n % (128 * 4) == 0) { return SM100_TMEM_LOAD_16dp128b4x_16b{}; } else if constexpr (bits_n % (128 * 2) == 0) { return SM100_TMEM_LOAD_16dp128b2x_16b{}; } else if constexpr (bits_n % (128 * 1) == 0) { return SM100_TMEM_LOAD_16dp128b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_LOAD_16dp64b128x{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_LOAD_16dp64b64x{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_LOAD_16dp64b32x{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_LOAD_16dp64b16x{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_LOAD_16dp64b8x{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_LOAD_16dp64b4x{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_LOAD_16dp64b2x{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_LOAD_16dp64b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_LOAD_16dp64b128x_16b{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_LOAD_16dp64b64x_16b{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_LOAD_16dp64b32x_16b{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_LOAD_16dp64b16x_16b{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_LOAD_16dp64b8x_16b{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_LOAD_16dp64b4x_16b{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_LOAD_16dp64b2x_16b{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_LOAD_16dp64b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_LOAD_16dp32b128x{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_LOAD_16dp32b64x{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_LOAD_16dp32b32x{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_LOAD_16dp32b16x{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_LOAD_16dp32b8x{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_LOAD_16dp32b4x{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_LOAD_16dp32b2x{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_LOAD_16dp32b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_LOAD_16dp32b128x_16b{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_LOAD_16dp32b64x_16b{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_LOAD_16dp32b32x_16b{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_LOAD_16dp32b16x_16b{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_LOAD_16dp32b8x_16b{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_LOAD_16dp32b4x_16b{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_LOAD_16dp32b2x_16b{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_LOAD_16dp32b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (32 * 128) == 0) { return SM100_TMEM_LOAD_32dp32b128x{}; } else if constexpr (bits_n % (32 * 64) == 0) { return SM100_TMEM_LOAD_32dp32b64x{}; } else if constexpr (bits_n % (32 * 32) == 0) { return SM100_TMEM_LOAD_32dp32b32x{}; } else if constexpr (bits_n % (32 * 16) == 0) { return SM100_TMEM_LOAD_32dp32b16x{}; } else if constexpr (bits_n % (32 * 8) == 0) { return SM100_TMEM_LOAD_32dp32b8x{}; } else if constexpr (bits_n % (32 * 4) == 0) { return SM100_TMEM_LOAD_32dp32b4x{}; } else if constexpr (bits_n % (32 * 2) == 0) { return SM100_TMEM_LOAD_32dp32b2x{}; } else if constexpr (bits_n % (32 * 1) == 0) { return SM100_TMEM_LOAD_32dp32b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (32 * 128) == 0) { return SM100_TMEM_LOAD_32dp32b128x_16b{}; } else if constexpr (bits_n % (32 * 64) == 0) { return SM100_TMEM_LOAD_32dp32b64x_16b{}; } else if constexpr (bits_n % (32 * 32) == 0) { return SM100_TMEM_LOAD_32dp32b32x_16b{}; } else if constexpr (bits_n % (32 * 16) == 0) { return SM100_TMEM_LOAD_32dp32b16x_16b{}; } else if constexpr (bits_n % (32 * 8) == 0) { return SM100_TMEM_LOAD_32dp32b8x_16b{}; } else if constexpr (bits_n % (32 * 4) == 0) { return SM100_TMEM_LOAD_32dp32b4x_16b{}; } else if constexpr (bits_n % (32 * 2) == 0) { return SM100_TMEM_LOAD_32dp32b2x_16b{}; } else if constexpr (bits_n % (32 * 1) == 0) { return SM100_TMEM_LOAD_32dp32b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (256 * 32) == 0) { return SM100_TMEM_STORE_16dp256b32x{}; } else if constexpr (bits_n % (256 * 16) == 0) { return SM100_TMEM_STORE_16dp256b16x{}; } else if constexpr (bits_n % (256 * 8) == 0) { return SM100_TMEM_STORE_16dp256b8x{}; } else if constexpr (bits_n % (256 * 4) == 0) { return SM100_TMEM_STORE_16dp256b4x{}; } else if constexpr (bits_n % (256 * 2) == 0) { return SM100_TMEM_STORE_16dp256b2x{}; } else if constexpr (bits_n % (256 * 1) == 0) { return SM100_TMEM_STORE_16dp256b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (256 * 32) == 0) { return SM100_TMEM_STORE_16dp256b32x_16b{}; } else if constexpr (bits_n % (256 * 16) == 0) { return SM100_TMEM_STORE_16dp256b16x_16b{}; } else if constexpr (bits_n % (256 * 8) == 0) { return SM100_TMEM_STORE_16dp256b8x_16b{}; } else if constexpr (bits_n % (256 * 4) == 0) { return SM100_TMEM_STORE_16dp256b4x_16b{}; } else if constexpr (bits_n % (256 * 2) == 0) { return SM100_TMEM_STORE_16dp256b2x_16b{}; } else if constexpr (bits_n % (256 * 1) == 0) { return SM100_TMEM_STORE_16dp256b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (128 * 64) == 0) { return SM100_TMEM_STORE_16dp128b64x{}; } else if constexpr (bits_n % (128 * 32) == 0) { return SM100_TMEM_STORE_16dp128b32x{}; } else if constexpr (bits_n % (128 * 16) == 0) { return SM100_TMEM_STORE_16dp128b16x{}; } else if constexpr (bits_n % (128 * 8) == 0) { return SM100_TMEM_STORE_16dp128b8x{}; } else if constexpr (bits_n % (128 * 4) == 0) { return SM100_TMEM_STORE_16dp128b4x{}; } else if constexpr (bits_n % (128 * 2) == 0) { return SM100_TMEM_STORE_16dp128b2x{}; } else if constexpr (bits_n % (128 * 1) == 0) { return SM100_TMEM_STORE_16dp128b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (128 * 64) == 0) { return SM100_TMEM_STORE_16dp128b64x_16b{}; } else if constexpr (bits_n % (128 * 32) == 0) { return SM100_TMEM_STORE_16dp128b32x_16b{}; } else if constexpr (bits_n % (128 * 16) == 0) { return SM100_TMEM_STORE_16dp128b16x_16b{}; } else if constexpr (bits_n % (128 * 8) == 0) { return SM100_TMEM_STORE_16dp128b8x_16b{}; } else if constexpr (bits_n % (128 * 4) == 0) { return SM100_TMEM_STORE_16dp128b4x_16b{}; } else if constexpr (bits_n % (128 * 2) == 0) { return SM100_TMEM_STORE_16dp128b2x_16b{}; } else if constexpr (bits_n % (128 * 1) == 0) { return SM100_TMEM_STORE_16dp128b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_STORE_16dp64b128x{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_STORE_16dp64b64x{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_STORE_16dp64b32x{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_STORE_16dp64b16x{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_STORE_16dp64b8x{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_STORE_16dp64b4x{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_STORE_16dp64b2x{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_STORE_16dp64b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_STORE_16dp64b128x_16b{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_STORE_16dp64b64x_16b{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_STORE_16dp64b32x_16b{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_STORE_16dp64b16x_16b{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_STORE_16dp64b8x_16b{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_STORE_16dp64b4x_16b{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_STORE_16dp64b2x_16b{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_STORE_16dp64b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_STORE_16dp32b128x{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_STORE_16dp32b64x{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_STORE_16dp32b32x{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_STORE_16dp32b16x{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_STORE_16dp32b8x{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_STORE_16dp32b4x{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_STORE_16dp32b2x{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_STORE_16dp32b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (64 * 128) == 0) { return SM100_TMEM_STORE_16dp32b128x_16b{}; } else if constexpr (bits_n % (64 * 64) == 0) { return SM100_TMEM_STORE_16dp32b64x_16b{}; } else if constexpr (bits_n % (64 * 32) == 0) { return SM100_TMEM_STORE_16dp32b32x_16b{}; } else if constexpr (bits_n % (64 * 16) == 0) { return SM100_TMEM_STORE_16dp32b16x_16b{}; } else if constexpr (bits_n % (64 * 8) == 0) { return SM100_TMEM_STORE_16dp32b8x_16b{}; } else if constexpr (bits_n % (64 * 4) == 0) { return SM100_TMEM_STORE_16dp32b4x_16b{}; } else if constexpr (bits_n % (64 * 2) == 0) { return SM100_TMEM_STORE_16dp32b2x_16b{}; } else if constexpr (bits_n % (64 * 1) == 0) { return SM100_TMEM_STORE_16dp32b1x_16b{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (32 * 128) == 0) { return SM100_TMEM_STORE_32dp32b128x{}; } else if constexpr (bits_n % (32 * 64) == 0) { return SM100_TMEM_STORE_32dp32b64x{}; } else if constexpr (bits_n % (32 * 32) == 0) { return SM100_TMEM_STORE_32dp32b32x{}; } else if constexpr (bits_n % (32 * 16) == 0) { return SM100_TMEM_STORE_32dp32b16x{}; } else if constexpr (bits_n % (32 * 8) == 0) { return SM100_TMEM_STORE_32dp32b8x{}; } else if constexpr (bits_n % (32 * 4) == 0) { return SM100_TMEM_STORE_32dp32b4x{}; } else if constexpr (bits_n % (32 * 2) == 0) { return SM100_TMEM_STORE_32dp32b2x{}; } else if constexpr (bits_n % (32 * 1) == 0) { return SM100_TMEM_STORE_32dp32b1x{}; } } else if constexpr (cute::is_same_v) { if constexpr (bits_n % (32 * 128) == 0) { return SM100_TMEM_STORE_32dp32b128x_16b{}; } else if constexpr (bits_n % (32 * 64) == 0) { return SM100_TMEM_STORE_32dp32b64x_16b{}; } else if constexpr (bits_n % (32 * 32) == 0) { return SM100_TMEM_STORE_32dp32b32x_16b{}; } else if constexpr (bits_n % (32 * 16) == 0) { return SM100_TMEM_STORE_32dp32b16x_16b{}; } else if constexpr (bits_n % (32 * 8) == 0) { return SM100_TMEM_STORE_32dp32b8x_16b{}; } else if constexpr (bits_n % (32 * 4) == 0) { return SM100_TMEM_STORE_32dp32b4x_16b{}; } else if constexpr (bits_n % (32 * 2) == 0) { return SM100_TMEM_STORE_32dp32b2x_16b{}; } else if constexpr (bits_n % (32 * 1) == 0) { return SM100_TMEM_STORE_32dp32b1x_16b{}; } } else { static_assert(dependent_false, "Must pass 1x tmem copy operator"); } } //////////////////////////////////////////////////////////////////////////////////////////////////// // Select TMEM store corresponding to the provided TMEM load template CUTE_HOST_DEVICE constexpr auto tmem_load_to_store(CopyOp) { if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b1x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b1x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b2x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b2x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b4x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b4x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b8x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b8x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b16x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b16x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b32x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp256b32x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b1x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b1x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b2x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b2x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b4x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b4x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b8x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b8x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b16x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b16x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b32x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b32x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b64x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp128b64x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b1x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b1x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b2x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b2x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b4x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b4x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b8x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b8x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b16x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b16x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b32x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b32x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b64x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b64x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b128x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp64b128x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b1x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b1x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b2x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b2x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b4x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b4x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b8x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b8x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b16x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b16x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b32x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b32x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b64x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b64x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b128x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_16dp32b128x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b1x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b1x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b2x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b2x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b4x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b4x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b8x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b8x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b16x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b16x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b32x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b32x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b64x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b64x_16b{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b128x{}; } else if constexpr (is_same_v) { return SM100_TMEM_STORE_32dp32b128x_16b{}; } else { static_assert(dependent_false, "No TMEM_STORE matching for provided TMEM_LOAD"); } } } // namespace TMEM //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // // UTCCP Copy Traits // //////////////////////////////////////////////////////////////////////////////////////////////////// namespace SM100::TMEM::UTCCP { // // Specialized copy_unpack implementation for SM100::TMEM::UTCCP instructions // template CUTE_HOST_DEVICE constexpr void copy_unpack(Copy_Traits const&, Tensor const& src, Tensor & dst) { static_assert(is_rmem::value, "Expected smem_desc src for SM100_UTCCP"); static_assert(is_tmem::value, "Expected tmem dst for SM100_UTCCP"); CopyOp::copy(src[0], raw_pointer_cast(dst.data())); } } // end namespace SM100::TMEM::UTCCP // In the following UTCCP traits, the ValID is representing: // logical_bit_idx -> tmem_addr_offset. // And the logical_bit_idx is numbered in the order of: // [core_matrix_strided, core_matrix_leading, broadcast, repeat]. // The first two modes provide convenience for smem_desc construtction. // The last two modes provide boradcast transformation for 4x32DP and 2x64DP. // With above, the strides of first two modes are neccessary to be TMEM::DP_b and 1. // And the stride of the third mode in the SrcLayout must be zero. //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_128dp256bit_1cta; template <> struct Copy_Traits { using ThrID = Layout<_1>; using ValID = Layout, Stride>; using SrcLayout = Layout, Stride<_0, _1>>; using DstLayout = Layout, Stride<_0,_1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_128dp256bit_2cta; template <> struct Copy_Traits { using ThrID = Layout<_2>; using ValID = typename Copy_Traits::ValID; using SrcLayout = Layout, Stride<_0, _1>>; using DstLayout = Layout, Stride<_0, _1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_128dp128bit_1cta; template <> struct Copy_Traits { using ThrID = Layout<_1>; using ValID = Layout, Stride>; using SrcLayout = Layout, Stride<_0, _1>>; using DstLayout = Layout, Stride<_0,_1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_128dp128bit_2cta; template <> struct Copy_Traits { using ThrID = Layout<_2>; using ValID = typename Copy_Traits::ValID; using SrcLayout = Layout, Stride<_0, _1>>; using DstLayout = Layout, Stride<_0, _1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_4dp256bit_1cta; template <> struct Copy_Traits { /* 4DP is really hard to model if we consider this instruction as a "copy" instruction. But, if we take it as "TMEM refresh" instruction, then everything goes out naturally. 4DP utccp is designed to refresh the last 4 lanes of each tmem subpartition. So, in the kernel implementation, we usually only don't need to iterate on MMA_M dimension, but only need to iterate on MMA_K dimension. And in each refresh, logically we are refreshing MMA's 128 rows M + 256bit K. So the "atom_v" should be (refresh_m, refresh_k) instead of (copy_m, copy_k). And the Src/DstLayout below is: copy_bits -> logical_refresh_bits. */ using ThrID = Layout<_1>; using ValID = Layout, Stride>; using SrcLayout = Layout>, Stride<_0,Stride<_32,_128>>>; using DstLayout = Layout>, Stride<_0,Stride<_32,_128>>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_4dp256bit_2cta; template <> struct Copy_Traits { using ThrID = Layout<_2>; using ValID = typename Copy_Traits::ValID; using SrcLayout = Layout>, Stride<_0,Stride<_32,_128>>>; using DstLayout = Layout>, Stride<_0,Stride<_32,_128>>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_4x32dp128bit_1cta; template <> struct Copy_Traits { using _DP = TMEM::DP_b; using _DPx32 = Int<_DP{}*32>; using ThrID = Layout<_1>; // logical bit_idx -> tmem_addr // [core_matrix_strided, core_matrix_leading, broadcast] using ValID = Layout, Stride<_DP,_1, _DPx32>>; using SrcLayout = Layout>, Stride<_0,Stride<_1, _32, _0>>>; using DstLayout = Layout, Stride<_0,_1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_4x32dp128bit_2cta; template <> struct Copy_Traits { using ThrID = Layout<_2>; using ValID = typename Copy_Traits::ValID; using SrcLayout = Layout>, Stride<_0,Stride<_1, _32, _0>>>; using DstLayout = Layout, Stride<_0,_1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_2x64dp128bitlw0213_1cta; template <> struct Copy_Traits { using _DP = TMEM::DP_b; using _DPx64 = Int<_DP{}*64>; using ThrID = Layout<_1>; // logical bit_idx -> tmem_addr // [core_matrix_strided, core_matrix_leading, broadcast] using ValID = Layout, Stride<_DP,_1, _DPx64>>; using SrcLayout = Layout>, Stride<_0,Stride<_1, _64, _0>>>; using DstLayout = Layout, Stride<_0, _1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_2x64dp128bitlw0213_2cta; template <> struct Copy_Traits { using ThrID = Layout<_2>; using ValID = typename Copy_Traits::ValID; using SrcLayout = Layout>, Stride<_0,Stride<_1, _64, _0>>>; using DstLayout = Layout, Stride<_0, _1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_2x64dp128bitlw0123_1cta; template <> struct Copy_Traits { using _DP = TMEM::DP_b; using _DPx32 = Int<_DP{}*32>; using _DPx64 = Int<_DP{}*64>; using ThrID = Layout<_1>; // logical bit_idx -> tmem_addr // [core_matrix_strided, core_matrix_leading, repeat, broadcast] using ValID = Layout, Stride<_DP,_1 ,_DPx64,_DPx32>>; using SrcLayout = Layout>, Stride<_0,Stride<_1, _32,_4096,_0>>>; using DstLayout = Layout, Stride<_0, _1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// using SM100::TMEM::UTCCP::SM100_UTCCP_2x64dp128bitlw0123_2cta; template <> struct Copy_Traits { using ThrID = Layout<_2>; using ValID = typename Copy_Traits::ValID; using SrcLayout = Layout>, Stride<_0,Stride<_1, _32, _4096,_0>>>; using DstLayout = Layout, Stride<_0,_1>>; using RefLayout = DstLayout; }; //////////////////////////////////////////////////////////////////////////////////////////////////// template CUTE_HOST_DEVICE constexpr auto make_utccp_copy(CopyOp const&, Tensor const& tmem) { static_assert(is_tmem::value, "Expected TMEM tensor."); using T = typename TEngine::value_type; using Traits = Copy_Traits; using Atom = Copy_Atom; // atom thr idx -> tmem addr This is the T in the Layout_TV auto atom_t_layout = make_layout(size(typename Traits::ThrID{}), Int<0>{}); // atom val idx -> tmem addr Cast the CopyOp's value ids to the proper data width auto atom_v_layout = coalesce(upcast::value>(typename Traits::ValID{})); return make_cotiled_copy(Atom{}, make_layout(atom_t_layout, atom_v_layout), tmem.layout()); } //////////////////////////////////////////////////////////////////////////////////////////////////// } // namespace cute