From f7300f5c2ed85db1f823b33d8e437af2adb4ddab Mon Sep 17 00:00:00 2001 From: sanchitintel Date: Wed, 22 Oct 2025 19:45:24 -0700 Subject: [PATCH 1/2] Add more `static_assert`s in `make_block_2d_copy_CD` to prevent relevant future bugs `make_block_2d_copy_CD` must not be called with a `void` `CopyOp` --- include/cute/atom/copy_traits_xe_2d.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/cute/atom/copy_traits_xe_2d.hpp b/include/cute/atom/copy_traits_xe_2d.hpp index 60876df697..428707fcac 100644 --- a/include/cute/atom/copy_traits_xe_2d.hpp +++ b/include/cute/atom/copy_traits_xe_2d.hpp @@ -981,6 +981,7 @@ make_block_2d_copy_CD(CopyOp const& op, // Copy operation TiledMMA const& mma, // TiledMMA instance Stride const& gstride) // Global memory strides { + static_assert(is_xe_block_2d_atom_v, "Expected a block 2D atom"); return make_block_2d_copy_CD(op, mma, gstride, find_x_mode(gstride), find_y_mode(gstride)); } @@ -993,6 +994,7 @@ make_block_2d_copy_CD(CopyOp const& op, // Copy operation XMode const& x_mode, // x, y modes YMode const& y_mode) { + static_assert(is_xe_block_2d_atom_v, "Expected a block 2D atom"); // Retrieve MMA atom's (subgroup, value) -> (M,N) layout auto tile_mn = select<0,1>(mma.tile_mnk()); From 37e62504fae6a802fa00bd4c750a7be52dfab63d Mon Sep 17 00:00:00 2001 From: sanchitintel Date: Thu, 23 Oct 2025 00:17:40 -0700 Subject: [PATCH 2/2] Revise as per review comment --- include/cute/atom/copy_traits_xe_2d.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/cute/atom/copy_traits_xe_2d.hpp b/include/cute/atom/copy_traits_xe_2d.hpp index 428707fcac..cf25b3fe9d 100644 --- a/include/cute/atom/copy_traits_xe_2d.hpp +++ b/include/cute/atom/copy_traits_xe_2d.hpp @@ -994,7 +994,6 @@ make_block_2d_copy_CD(CopyOp const& op, // Copy operation XMode const& x_mode, // x, y modes YMode const& y_mode) { - static_assert(is_xe_block_2d_atom_v, "Expected a block 2D atom"); // Retrieve MMA atom's (subgroup, value) -> (M,N) layout auto tile_mn = select<0,1>(mma.tile_mnk());