Skip to content

Commit eb7ea6b

Browse files
committed
[CuTe] [Xe] Allow general layouts in make_subgroup_tensor
1 parent 88bc845 commit eb7ea6b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/cute/tensor_sg.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ CUTE_HOST_DEVICE
115115
constexpr auto
116116
make_subgroup_tensor(Layout<Shape,Stride> const& sg_layout)
117117
{
118-
return make_subgroup_tensor(make_fragment_like<T>(sg_layout(0,_)), sg_layout);
118+
using _SG = intel::_SGSize;
119+
auto ilayout = make_layout(make_shape(_SG{}, size(sg_layout) / _SG{}),
120+
make_stride(_1{}, _16{}));
121+
auto sv_layout = sg_layout.compose(ilayout);
122+
return make_subgroup_tensor(make_fragment_like<T>(sv_layout(0,_)), sv_layout);
119123
}
120124

121125
template <typename T, class... Args>

0 commit comments

Comments
 (0)