Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/cute/atom/copy_traits_xe_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ make_block_2d_copy_CD(CopyOp const& op, // Copy operation
TiledMMA const& mma, // TiledMMA instance
Stride<Strides...> const& gstride) // Global memory strides
{
static_assert(is_xe_block_2d_atom_v<CopyOp>, "Expected a block 2D atom");
Copy link

@rolandschulz rolandschulz Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overload is also not really expected to be called directly but only by the other overload which already has the static_assert. And the equivalent overload for A/B also don't have the static_assert

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For A & B, CopyOp can be void, so they don't need a corresponding assert

return make_block_2d_copy_CD<ValType>(op, mma, gstride, find_x_mode(gstride), find_y_mode(gstride));
}

Expand All @@ -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<CopyOp>, "Expected a block 2D atom");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need extra static assert here as you are already providing on line number 984 so if user send some old ops its will stop there itself, it will never go to 985 which will call
make_block_2d_copy_CD(CopyOp const& op, // Copy operation
TiledMMA const& mma, // TiledMMA instance
Stride<Strides...> const& gstride, // Global memory strides
XMode const& x_mode, // x, y modes
YMode const& y_mode)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing!

I created this PR based on the discussion in #576 (comment).

Nevertheless, in the future, if some code-changes would result in these make_block_2d_copy_CD overloads being called from elsewhere, then these asserts should be added.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I had misread your comment. I revised the PR.

// Retrieve MMA atom's (subgroup, value) -> (M,N) layout
auto tile_mn = select<0,1>(mma.tile_mnk());

Expand Down
Loading