10
10
// UNSUPPORTED: gpu-intel-dg1,gpu-intel-dg2,cuda,hip
11
11
// TODO: esimd_emulator fails due to unimplemented 'raw_send' intrinsic
12
12
// XFAIL: esimd_emulator
13
- // RUN: %clangxx -fsycl %s -o %t.out
14
- // RUN: %GPU_RUN_PLACEHOLDER %t.out
13
+ // RUN: %clangxx -fsycl %s -o %t1.out
14
+ // RUN: %GPU_RUN_PLACEHOLDER %t1.out
15
+ // RUN: %clangxx -fsycl -DNEW_API %s -o %t2.out
16
+ // RUN: %GPU_RUN_PLACEHOLDER %t2.out
15
17
16
18
// The test checks raw send functionality with block read/write implementation
17
19
// on SKL. It does not work on DG1 due to send instruction incompatibility.
@@ -41,9 +43,13 @@ ESIMD_INLINE simd<T, N> dwaligned_block_read(AccessorTy acc,
41
43
constexpr uint8_t sfid = 0x0 ;
42
44
constexpr uint8_t numSrc0 = 0x1 ;
43
45
constexpr uint8_t numDst = 0x2 ;
44
-
46
+ #ifdef NEW_API
47
+ return experimental::esimd::raw_send (oldDst, src0, exDesc, desc, execSize,
48
+ sfid, numSrc0, numDst);
49
+ #else
45
50
return experimental::esimd::raw_send_load (oldDst, src0, exDesc, desc,
46
51
execSize, sfid, numSrc0, numDst);
52
+ #endif
47
53
}
48
54
49
55
template <typename T, int N, typename AccessorTy>
@@ -59,9 +65,13 @@ ESIMD_INLINE void block_write1(AccessorTy acc, unsigned int offset,
59
65
constexpr uint8_t sfid = 0x0 ;
60
66
constexpr uint8_t numSrc0 = 0x1 ;
61
67
constexpr uint8_t numSrc1 = 0x1 ;
62
-
68
+ #ifdef NEW_API
69
+ return experimental::esimd::raw_sends (src0, data, exDesc, desc, execSize,
70
+ sfid, numSrc0, numSrc1);
71
+ #else
63
72
return experimental::esimd::raw_sends_store (src0, data, exDesc, desc,
64
73
execSize, sfid, numSrc0, numSrc1);
74
+ #endif
65
75
}
66
76
67
77
template <typename T, int N, typename AccessorTy>
@@ -80,9 +90,13 @@ ESIMD_INLINE void block_write2(AccessorTy acc, unsigned int offset,
80
90
constexpr uint8_t execSize = 0x83 ;
81
91
constexpr uint8_t sfid = 0x0 ;
82
92
constexpr uint8_t numSrc0 = 0x2 ;
83
-
93
+ #ifdef NEW_API
94
+ return experimental::esimd::raw_send (src0, exDesc, desc, execSize, sfid,
95
+ numSrc0);
96
+ #else
84
97
return experimental::esimd::raw_send_store (src0, exDesc, desc, execSize, sfid,
85
98
numSrc0);
99
+ #endif
86
100
}
87
101
88
102
int main (void ) {
0 commit comments