@@ -98,6 +98,8 @@ struct is_sg_tensor<SubgroupTensor<Engine,Layout,SubgroupTVLayout>> : true_type
9898template <class Engine , class Layout , class SubgroupTVLayout >
9999struct is_tensor <SubgroupTensor<Engine,Layout,SubgroupTVLayout>> : true_type {};
100100
101+ // Create a SubgroupTensor from its component parts:
102+ // a regular rmem Tensor and the subgroup-scope TV-layout.
101103template <class Engine ,
102104 class Layout ,
103105 class SubgroupTVLayout ,
@@ -111,6 +113,9 @@ make_subgroup_tensor(Tensor<Engine, Layout> const& tensor, SubgroupTVLayout cons
111113 return static_cast <SubgroupTensor<Engine,Layout,SubgroupTVLayout> const &>(tensor);
112114}
113115
116+ // Create a new owning SubgroupTensor with the given subgroup-level layout.
117+ // Elements are assigned to threads following the normal Xe interleaved mapping
118+ // (i.e. work-item i gets elements i, i + 16, i + 32, ...)
114119template <typename T, class Shape , class Stride >
115120CUTE_HOST_DEVICE
116121constexpr auto
@@ -123,6 +128,8 @@ make_subgroup_tensor(Layout<Shape,Stride> const& sg_layout)
123128 return make_subgroup_tensor (make_fragment_like<T>(sv_layout (0 ,_)), sv_layout);
124129}
125130
131+ // Create a new owning SubgroupTensor with a subgroup-level layout, constructed
132+ // from the argument list with make_layout.
126133template <typename T, class ... Args>
127134CUTE_HOST_DEVICE
128135constexpr auto
0 commit comments