@@ -88,6 +88,50 @@ raw_sends(__ESIMD_NS::simd<T1, n1> msgDst, __ESIMD_NS::simd<T2, n2> msgSrc0,
88
88
msgDesc, msgSrc0.data (), msgSrc1.data (), msgDst.data ());
89
89
}
90
90
91
+ // / Raw sends. "s" suffix designates "split" variant - i.e. two sources.
92
+ // /
93
+ // / @tparam execSize is the execution size.
94
+ // / @tparam sfid is the shared function ID.
95
+ // / @tparam numSrc0 is the number of GRFs for source-0.
96
+ // / @tparam numSrc1 is the number of GRFs for source-1.
97
+ // / @tparam numDst is the number of GRFs for destination.
98
+ // / @tparam isEOT is the flag that indicates whether this is an EOT message
99
+ // / (optional - default to 0).
100
+ // / @tparam isSendc is the flag that indicates whether sendc should be used
101
+ // / (optional - default to 0).
102
+ // / @param msgDst is the old value of the destination operand.
103
+ // / @param msgSrc0 is the first source operand of send message.
104
+ // / @param msgSrc1 is the second source operand of send message.
105
+ // / @param exDesc is the extended message descriptor.
106
+ // / @param msgDesc is the message descriptor.
107
+ // / @param mask is the predicate to specify enabled channels (optional - default
108
+ // / to on).
109
+ // / @return the vector value read from memory.
110
+ template <uint8_t execSize, uint8_t sfid, uint8_t numSrc0, uint8_t numSrc1,
111
+ uint8_t numDst, uint8_t isEOT = 0 , uint8_t isSendc = 0 , typename T1,
112
+ int n1, typename T2, int n2, typename T3, int n3, int N = 16 >
113
+ __ESIMD_API __ESIMD_NS::simd<T1, n1>
114
+ raw_sends (__ESIMD_NS::simd<T1, n1> msgDst, __ESIMD_NS::simd<T2, n2> msgSrc0,
115
+ __ESIMD_NS::simd<T3, n3> msgSrc1, uint32_t exDesc, uint32_t msgDesc,
116
+ __ESIMD_NS::simd_mask<N> mask = 1 ) {
117
+ constexpr unsigned _Width1 = n1 * sizeof (T1);
118
+ static_assert (_Width1 % 32 == 0 , " Invalid size for raw send rspVar" );
119
+ constexpr unsigned _Width2 = n2 * sizeof (T2);
120
+ static_assert (_Width2 % 32 == 0 , " Invalid size for raw send msgSrc0" );
121
+ constexpr unsigned _Width3 = n3 * sizeof (T3);
122
+ static_assert (_Width3 % 32 == 0 , " Invalid size for raw send msgSrc1" );
123
+
124
+ using ElemT1 = __ESIMD_DNS::__raw_t <T1>;
125
+ using ElemT2 = __ESIMD_DNS::__raw_t <T2>;
126
+ using ElemT3 = __ESIMD_DNS::__raw_t <T3>;
127
+
128
+ constexpr uint8_t modifier = ((isEOT & 0x1 ) << 1 ) | (isSendc & 0x1 );
129
+
130
+ return __esimd_raw_sends2<ElemT1, n1, ElemT2, n2, ElemT3, n3, N>(
131
+ modifier, execSize, mask.data (), numSrc0, numSrc1, numDst, sfid, exDesc,
132
+ msgDesc, msgSrc0.data (), msgSrc1.data (), msgDst.data ());
133
+ }
134
+
91
135
// / Raw send.
92
136
// /
93
137
// / @param msgDst is the old value of the destination operand.
@@ -129,6 +173,43 @@ raw_send(__ESIMD_NS::simd<T1, n1> msgDst, __ESIMD_NS::simd<T2, n2> msgSrc0,
129
173
msgSrc0.data (), msgDst.data ());
130
174
}
131
175
176
+ // / Raw send.
177
+ // /
178
+ // / @tparam execSize is the execution size.
179
+ // / @tparam sfid is the shared function ID.
180
+ // / @tparam numSrc0 is the number of GRFs for source-0.
181
+ // / @tparam numDst is the number of GRFs for destination.
182
+ // / @tparam isEOT is the flag that indicates whether this is an EOT message
183
+ // / (optional - default to 0).
184
+ // / @tparam isSendc is the flag that indicates whether sendc should be used
185
+ // / (optional - default to 0).
186
+ // / @param msgDst is the old value of the destination operand.
187
+ // / @param msgSrc0 is the first source operand of send message.
188
+ // / @param exDesc is the extended message descriptor.
189
+ // / @param msgDesc is the message descriptor.
190
+ // / @param mask is the predicate to specify enabled channels (optional - default
191
+ // / to on).
192
+ // / @return the vector value read from memory
193
+ template <uint8_t execSize, uint8_t sfid, uint8_t numSrc0, uint8_t numDst,
194
+ uint8_t isEOT = 0 , uint8_t isSendc = 0 , typename T1, int n1,
195
+ typename T2, int n2, int N = 16 >
196
+ __ESIMD_API __ESIMD_NS::simd<T1, n1>
197
+ raw_send (__ESIMD_NS::simd<T1, n1> msgDst, __ESIMD_NS::simd<T2, n2> msgSrc0,
198
+ uint32_t exDesc, uint32_t msgDesc, __ESIMD_NS::simd_mask<N> mask = 1 ) {
199
+ constexpr unsigned _Width1 = n1 * sizeof (T1);
200
+ static_assert (_Width1 % 32 == 0 , " Invalid size for raw send rspVar" );
201
+ constexpr unsigned _Width2 = n2 * sizeof (T2);
202
+ static_assert (_Width2 % 32 == 0 , " Invalid size for raw send msgSrc0" );
203
+
204
+ using ElemT1 = __ESIMD_DNS::__raw_t <T1>;
205
+ using ElemT2 = __ESIMD_DNS::__raw_t <T2>;
206
+
207
+ constexpr uint8_t modifier = ((isEOT & 0x1 ) << 1 ) | (isSendc & 0x1 );
208
+ return __esimd_raw_send2<ElemT1, n1, ElemT2, n2, N>(
209
+ modifier, execSize, mask.data (), numSrc0, numDst, sfid, exDesc, msgDesc,
210
+ msgSrc0.data (), msgDst.data ());
211
+ }
212
+
132
213
// / Raw sends. "s" suffix designates "split" variant - i.e. two sources.
133
214
// /
134
215
// / @param msgSrc0 is the first source operand of send message.
@@ -169,6 +250,43 @@ raw_sends(__ESIMD_NS::simd<T1, n1> msgSrc0, __ESIMD_NS::simd<T2, n2> msgSrc1,
169
250
msgSrc0.data (), msgSrc1.data ());
170
251
}
171
252
253
+ // / Raw sends. "s" suffix designates "split" variant - i.e. two sources.
254
+ // /
255
+ // / @tparam execSize is the execution size.
256
+ // / @tparam sfid is the shared function ID.
257
+ // / @tparam numSrc0 is the number of GRFs for source-0.
258
+ // / @tparam numSrc1 is the number of GRFs for source-1.
259
+ // / @tparam isEOT is the flag that indicates whether this is an EOT message
260
+ // / (optional - default to 0).
261
+ // / @tparam isSendc is the flag that indicates whether sendc should be used
262
+ // / (optional - default to 0).
263
+ // / @param msgSrc0 is the first source operand of send message.
264
+ // / @param msgSrc1 is the second source operand of send message.
265
+ // / @param exDesc is the extended message descriptor.
266
+ // / @param msgDesc is the message descriptor.
267
+ // / @param mask is the predicate to specify enabled channels (optional - default
268
+ // / to on).
269
+ template <uint8_t execSize, uint8_t sfid, uint8_t numSrc0, uint8_t numSrc1,
270
+ uint8_t isEOT = 0 , uint8_t isSendc = 0 , typename T1, int n1,
271
+ typename T2, int n2, int N = 16 >
272
+ __ESIMD_API void raw_sends (__ESIMD_NS::simd<T1, n1> msgSrc0,
273
+ __ESIMD_NS::simd<T2, n2> msgSrc1, uint32_t exDesc,
274
+ uint32_t msgDesc,
275
+ __ESIMD_NS::simd_mask<N> mask = 1 ) {
276
+ constexpr unsigned _Width1 = n1 * sizeof (T1);
277
+ static_assert (_Width1 % 32 == 0 , " Invalid size for raw send msgSrc0" );
278
+ constexpr unsigned _Width2 = n2 * sizeof (T2);
279
+ static_assert (_Width2 % 32 == 0 , " Invalid size for raw send msgSrc1" );
280
+
281
+ using ElemT1 = __ESIMD_DNS::__raw_t <T1>;
282
+ using ElemT2 = __ESIMD_DNS::__raw_t <T2>;
283
+
284
+ constexpr uint8_t modifier = ((isEOT & 0x1 ) << 1 ) | (isSendc & 0x1 );
285
+ __esimd_raw_sends2_noresult<ElemT1, n1, ElemT2, n2, N>(
286
+ modifier, execSize, mask.data (), numSrc0, numSrc1, sfid, exDesc, msgDesc,
287
+ msgSrc0.data (), msgSrc1.data ());
288
+ }
289
+
172
290
// / Raw send. Generates a \c send or \c sendc instruction for the message
173
291
// / gateway.
174
292
// /
@@ -201,6 +319,34 @@ raw_send(__ESIMD_NS::simd<T1, n1> msgSrc0, uint32_t exDesc, uint32_t msgDesc,
201
319
msgSrc0.data ());
202
320
}
203
321
322
+ // / Raw send. Generates a \c send or \c sendc instruction for the message
323
+ // / gateway.
324
+ // /
325
+ // / @tparam execSize is the execution size.
326
+ // / @tparam sfid is the shared function ID.
327
+ // / @tparam numSrc0 is the number of GRFs for source-0.
328
+ // / @tparam isEOT is the flag that indicates whether this is an EOT message
329
+ // / (optional - default to 0).
330
+ // / @tparam isSendc is the flag that indicates whether sendc should be used
331
+ // / (optional - default to 0).
332
+ // / @param msgSrc0 is the first source operand of send message.
333
+ // / @param exDesc is the extended message descriptor.
334
+ // / @param msgDesc is the message descriptor.
335
+ // / @param mask is the predicate to specify enabled channels (optional - default
336
+ // / to on).
337
+ template <uint8_t execSize, uint8_t sfid, uint8_t numSrc0, uint8_t isEOT = 0 ,
338
+ uint8_t isSendc = 0 , typename T1, int n1, int N = 16 >
339
+ __ESIMD_API void raw_send (__ESIMD_NS::simd<T1, n1> msgSrc0, uint32_t exDesc,
340
+ uint32_t msgDesc, __ESIMD_NS::simd_mask<N> mask = 1 ) {
341
+ constexpr unsigned _Width1 = n1 * sizeof (T1);
342
+ static_assert (_Width1 % 32 == 0 , " Invalid size for raw send msgSrc0" );
343
+ using ElemT1 = __ESIMD_DNS::__raw_t <T1>;
344
+ constexpr uint8_t modifier = ((isEOT & 0x1 ) << 1 ) | (isSendc & 0x1 );
345
+ __esimd_raw_send2_noresult<ElemT1, n1, N>(modifier, execSize, mask.data (),
346
+ numSrc0, sfid, exDesc, msgDesc,
347
+ msgSrc0.data ());
348
+ }
349
+
204
350
// / @} sycl_esimd_raw_send
205
351
206
352
// / @defgroup sycl_esimd_memory_nbarrier Named barrier APIs.
@@ -2729,9 +2875,8 @@ ESIMD_INLINE SYCL_ESIMD_FUNCTION __ESIMD_NS::simd<T, N> lsc_load_2d(
2729
2875
constexpr uint8_t sfid = 0xF ;
2730
2876
constexpr uint8_t numSrc0 = 0x1 ;
2731
2877
constexpr uint8_t numDst = (N * sizeof (T)) / 64 ;
2732
- __ESIMD_NS::simd<T, ActualN> Raw =
2733
- raw_send (oldDst, payload.get_raw_data (), exDesc, desc, execSize, sfid,
2734
- numSrc0, numDst);
2878
+ __ESIMD_NS::simd<T, ActualN> Raw = raw_send<execSize, numSrc0, numDst, sfid>(
2879
+ oldDst, payload.get_raw_data (), exDesc, desc);
2735
2880
2736
2881
if constexpr (ActualN == N) {
2737
2882
return Raw;
@@ -2794,7 +2939,7 @@ ESIMD_INLINE SYCL_ESIMD_FUNCTION void lsc_prefetch_2d(
2794
2939
constexpr uint8_t execSize = 0x0 ;
2795
2940
constexpr uint8_t sfid = 0xF ;
2796
2941
constexpr uint8_t numDst = (N * sizeof (T)) / 64 ;
2797
- raw_send (payload.get_raw_data (), exDesc, desc, execSize, sfid, numDst );
2942
+ raw_send<execSize, numDst, sfid> (payload.get_raw_data (), exDesc, desc);
2798
2943
}
2799
2944
2800
2945
// / A variation of \c 2D stateless block store \c with parameters passed as
@@ -2834,8 +2979,8 @@ lsc_store_2d(config_2d_mem_access<T, BlockWidth, BlockHeight, NBlocks> &payload,
2834
2979
constexpr uint8_t numSrc0 = 0x1 ;
2835
2980
constexpr uint8_t numSrc1 = (N * sizeof (T)) / 64 ;
2836
2981
2837
- raw_sends (payload. get_raw_data (), Data, exDesc, desc, execSize, sfid, numSrc0 ,
2838
- numSrc1 );
2982
+ raw_sends<execSize, numSrc0, numSrc1, sfid>(payload. get_raw_data (), Data ,
2983
+ exDesc, desc );
2839
2984
}
2840
2985
2841
2986
// / SLM atomic.
0 commit comments