|
24 | 24 | #ifdef __SYCL_DEVICE_ONLY__
|
25 | 25 |
|
26 | 26 | #if (SYCL_EXT_ONEAPI_MATRIX_VERSION > 1)
|
27 |
| -#define JOINT_MATRIX_INTEL(T, R, C, L, S, U) \ |
28 |
| - __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> |
29 |
| -#else |
30 |
| -#define JOINT_MATRIX_INTEL(T, R, C, L, S, U) \ |
31 |
| - __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> |
32 |
| -#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION |
33 |
| - |
34 |
| -template <typename T, std::size_t R, std::size_t C, |
35 |
| - __spv::MatrixUse U = __spv::MatrixUse::Unnecessary, |
| 27 | +template <typename T, std::size_t R, std::size_t C, __spv::MatrixUse U, |
36 | 28 | __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor,
|
37 | 29 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
38 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T, R, C, L, S, U) * |
| 30 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> * |
39 | 31 | __spirv_JointMatrixLoadINTEL(T *Ptr, std::size_t Stride,
|
40 | 32 | __spv::MatrixLayout Layout = L,
|
41 | 33 | __spv::Scope::Flag Sc = S, int MemOperand = 0);
|
42 | 34 |
|
43 |
| -template <typename T, std::size_t R, std::size_t C, |
44 |
| - __spv::MatrixUse U = __spv::MatrixUse::Unnecessary, |
| 35 | +template <typename T, std::size_t R, std::size_t C, __spv::MatrixUse U, |
45 | 36 | __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor,
|
46 | 37 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
47 | 38 | extern SYCL_EXTERNAL void __spirv_JointMatrixStoreINTEL(
|
48 |
| - T *Ptr, JOINT_MATRIX_INTEL(T, R, C, L, S, U) *Object, |
| 39 | + T *Ptr, __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> *Object, |
49 | 40 | std::size_t Stride, __spv::MatrixLayout Layout = L,
|
50 | 41 | __spv::Scope::Flag Sc = S, int MemOperand = 0);
|
51 | 42 |
|
52 | 43 | template <typename T1, typename T2, std::size_t M, std::size_t K, std::size_t N,
|
53 |
| - __spv::MatrixUse UA = __spv::MatrixUse::Unnecessary, |
54 |
| - __spv::MatrixUse UB = __spv::MatrixUse::Unnecessary, |
55 |
| - __spv::MatrixUse UC = __spv::MatrixUse::Unnecessary, |
| 44 | + __spv::MatrixUse UA, __spv::MatrixUse UB, __spv::MatrixUse UC, |
56 | 45 | __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor,
|
57 | 46 | __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor,
|
58 | 47 | __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor,
|
59 | 48 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
60 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T2, M, N, LC, S, UC) * |
| 49 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T2, M, N, LC, S, UC> * |
61 | 50 | __spirv_JointMatrixMadINTEL(
|
62 |
| - JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, |
63 |
| - JOINT_MATRIX_INTEL(T1, K, N, LB, S, UB) *B, |
64 |
| - JOINT_MATRIX_INTEL(T2, M, N, LC, S, UC) *C, |
| 51 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S, UA> *A, |
| 52 | + __spv::__spirv_JointMatrixINTEL<T1, K, N, LB, S, UB> *B, |
| 53 | + __spv::__spirv_JointMatrixINTEL<T2, M, N, LC, S, UC> *C, |
65 | 54 | __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup);
|
66 | 55 |
|
67 | 56 | template <typename T1, typename T2, typename T3, std::size_t M, std::size_t K,
|
68 |
| - std::size_t N, __spv::MatrixUse UA = __spv::MatrixUse::Unnecessary, |
69 |
| - __spv::MatrixUse UB = __spv::MatrixUse::Unnecessary, |
70 |
| - __spv::MatrixUse UC = __spv::MatrixUse::Unnecessary, |
| 57 | + std::size_t N, __spv::MatrixUse UA, __spv::MatrixUse UB, |
| 58 | + __spv::MatrixUse UC, |
71 | 59 | __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor,
|
72 | 60 | __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor,
|
73 | 61 | __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor,
|
74 | 62 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
75 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) * |
| 63 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S, UC> * |
76 | 64 | __spirv_JointMatrixUUMadINTEL(
|
77 |
| - JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, |
78 |
| - JOINT_MATRIX_INTEL(T2, K, N, LB, S, UB) *B, |
79 |
| - JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) *C, |
| 65 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S, UA> *A, |
| 66 | + __spv::__spirv_JointMatrixINTEL<T2, K, N, LB, S, UB> *B, |
| 67 | + __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S, UC> *C, |
80 | 68 | __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup);
|
81 | 69 |
|
82 | 70 | template <typename T1, typename T2, typename T3, std::size_t M, std::size_t K,
|
83 |
| - std::size_t N, __spv::MatrixUse UA = __spv::MatrixUse::Unnecessary, |
84 |
| - __spv::MatrixUse UB = __spv::MatrixUse::Unnecessary, |
85 |
| - __spv::MatrixUse UC = __spv::MatrixUse::Unnecessary, |
| 71 | + std::size_t N, __spv::MatrixUse UA, __spv::MatrixUse UB, |
| 72 | + __spv::MatrixUse UC, |
86 | 73 | __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor,
|
87 | 74 | __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor,
|
88 | 75 | __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor,
|
89 | 76 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
90 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) * |
| 77 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S, UC> * |
91 | 78 | __spirv_JointMatrixUSMadINTEL(
|
92 |
| - JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, |
93 |
| - JOINT_MATRIX_INTEL(T2, K, N, LB, S, UB) *B, |
94 |
| - JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) *C, |
| 79 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S, UA> *A, |
| 80 | + __spv::__spirv_JointMatrixINTEL<T2, K, N, LB, S, UB> *B, |
| 81 | + __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S, UC> *C, |
95 | 82 | __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup);
|
96 | 83 |
|
97 | 84 | template <typename T1, typename T2, typename T3, std::size_t M, std::size_t K,
|
98 |
| - std::size_t N, __spv::MatrixUse UA = __spv::MatrixUse::Unnecessary, |
99 |
| - __spv::MatrixUse UB = __spv::MatrixUse::Unnecessary, |
100 |
| - __spv::MatrixUse UC = __spv::MatrixUse::Unnecessary, |
| 85 | + std::size_t N, __spv::MatrixUse UA, __spv::MatrixUse UB, |
| 86 | + __spv::MatrixUse UC, |
101 | 87 | __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor,
|
102 | 88 | __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor,
|
103 | 89 | __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor,
|
104 | 90 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
105 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) * |
| 91 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S, UC> * |
106 | 92 | __spirv_JointMatrixSUMadINTEL(
|
107 |
| - JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, |
108 |
| - JOINT_MATRIX_INTEL(T2, K, N, LB, S, UB) *B, |
109 |
| - JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) *C, |
| 93 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S, UA> *A, |
| 94 | + __spv::__spirv_JointMatrixINTEL<T2, K, N, LB, S, UB> *B, |
| 95 | + __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S, UC> *C, |
110 | 96 | __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup);
|
111 | 97 |
|
| 98 | +template <typename T, std::size_t R, std::size_t C, __spv::MatrixUse U, |
| 99 | + __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, |
| 100 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 101 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> * |
| 102 | +__spirv_CompositeConstruct(const T v); |
| 103 | + |
| 104 | +template <typename T, std::size_t R, std::size_t C, __spv::MatrixUse U, |
| 105 | + __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, |
| 106 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 107 | +extern SYCL_EXTERNAL size_t __spirv_JointMatrixWorkItemLengthINTEL( |
| 108 | + __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> *); |
| 109 | + |
| 110 | +template <typename T, std::size_t R, std::size_t C, __spv::MatrixUse U, |
| 111 | + __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, |
| 112 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 113 | +extern SYCL_EXTERNAL T __spirv_VectorExtractDynamic( |
| 114 | + __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> *, size_t i); |
| 115 | + |
| 116 | +template <typename T, std::size_t R, std::size_t C, __spv::MatrixUse U, |
| 117 | + __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, |
| 118 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 119 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> * |
| 120 | +__spirv_VectorInsertDynamic(__spv::__spirv_JointMatrixINTEL<T, R, C, L, S, U> *, |
| 121 | + T val, size_t i); |
| 122 | +#else |
| 123 | +template <typename T, std::size_t R, std::size_t C, |
| 124 | + __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, |
| 125 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 126 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> * |
| 127 | +__spirv_JointMatrixLoadINTEL(T *Ptr, std::size_t Stride, |
| 128 | + __spv::MatrixLayout Layout = L, |
| 129 | + __spv::Scope::Flag Sc = S, int MemOperand = 0); |
| 130 | + |
112 | 131 | template <typename T, std::size_t R, std::size_t C,
|
113 |
| - __spv::MatrixUse U = __spv::MatrixUse::Unnecessary, |
114 | 132 | __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor,
|
115 | 133 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
116 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T, R, C, L, S, U) * |
| 134 | +extern SYCL_EXTERNAL void __spirv_JointMatrixStoreINTEL( |
| 135 | + T *Ptr, __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> *Object, |
| 136 | + std::size_t Stride, __spv::MatrixLayout Layout = L, |
| 137 | + __spv::Scope::Flag Sc = S, int MemOperand = 0); |
| 138 | + |
| 139 | +template <typename T1, typename T2, std::size_t M, std::size_t K, std::size_t N, |
| 140 | + __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor, |
| 141 | + __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor, |
| 142 | + __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor, |
| 143 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 144 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T2, M, N, LC, S> * |
| 145 | +__spirv_JointMatrixMadINTEL( |
| 146 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S> *A, |
| 147 | + __spv::__spirv_JointMatrixINTEL<T1, K, N, LB, S> *B, |
| 148 | + __spv::__spirv_JointMatrixINTEL<T2, M, N, LC, S> *C, |
| 149 | + __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); |
| 150 | + |
| 151 | +template <typename T1, typename T2, typename T3, std::size_t M, std::size_t K, |
| 152 | + std::size_t N, __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor, |
| 153 | + __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor, |
| 154 | + __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor, |
| 155 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 156 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T2, M, N, LC, S> * |
| 157 | +__spirv_JointMatrixUUMadINTEL( |
| 158 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S> *A, |
| 159 | + __spv::__spirv_JointMatrixINTEL<T2, K, N, LB, S> *B, |
| 160 | + __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S> *C, |
| 161 | + __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); |
| 162 | + |
| 163 | +template <typename T1, typename T2, typename T3, std::size_t M, std::size_t K, |
| 164 | + std::size_t N, __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor, |
| 165 | + __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor, |
| 166 | + __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor, |
| 167 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 168 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S> * |
| 169 | +__spirv_JointMatrixUSMadINTEL( |
| 170 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S> *A, |
| 171 | + __spv::__spirv_JointMatrixINTEL<T2, K, N, LB, S> *B, |
| 172 | + __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S> *C, |
| 173 | + __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); |
| 174 | + |
| 175 | +template <typename T1, typename T2, typename T3, std::size_t M, std::size_t K, |
| 176 | + std::size_t N, __spv::MatrixLayout LA = __spv::MatrixLayout::RowMajor, |
| 177 | + __spv::MatrixLayout LB = __spv::MatrixLayout::RowMajor, |
| 178 | + __spv::MatrixLayout LC = __spv::MatrixLayout::RowMajor, |
| 179 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 180 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S> * |
| 181 | +__spirv_JointMatrixSUMadINTEL( |
| 182 | + __spv::__spirv_JointMatrixINTEL<T1, M, K, LA, S> *A, |
| 183 | + __spv::__spirv_JointMatrixINTEL<T2, K, N, LB, S> *B, |
| 184 | + __spv::__spirv_JointMatrixINTEL<T3, M, N, LC, S> *C, |
| 185 | + __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); |
| 186 | + |
| 187 | +template <typename T, std::size_t R, std::size_t C, |
| 188 | + __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, |
| 189 | + __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> |
| 190 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> * |
117 | 191 | __spirv_CompositeConstruct(const T v);
|
118 | 192 |
|
119 | 193 | template <typename T, std::size_t R, std::size_t C,
|
120 |
| - __spv::MatrixUse U = __spv::MatrixUse::Unnecessary, |
121 | 194 | __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor,
|
122 | 195 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
123 | 196 | extern SYCL_EXTERNAL size_t __spirv_JointMatrixWorkItemLengthINTEL(
|
124 |
| - JOINT_MATRIX_INTEL(T, R, C, L, S, U) *); |
| 197 | + __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> *); |
125 | 198 |
|
126 | 199 | template <typename T, std::size_t R, std::size_t C,
|
127 |
| - __spv::MatrixUse U = __spv::MatrixUse::Unnecessary, |
128 | 200 | __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor,
|
129 | 201 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
130 | 202 | extern SYCL_EXTERNAL T __spirv_VectorExtractDynamic(
|
131 |
| - JOINT_MATRIX_INTEL(T, R, C, L, S, U) *, size_t i); |
| 203 | + __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> *, size_t i); |
132 | 204 |
|
133 | 205 | template <typename T, std::size_t R, std::size_t C,
|
134 |
| - __spv::MatrixUse U = __spv::MatrixUse::Unnecessary, |
135 | 206 | __spv::MatrixLayout L = __spv::MatrixLayout::RowMajor,
|
136 | 207 | __spv::Scope::Flag S = __spv::Scope::Flag::Subgroup>
|
137 |
| -extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T, R, C, L, S, U) * |
138 |
| -__spirv_VectorInsertDynamic(JOINT_MATRIX_INTEL(T, R, C, L, S, U) *, |
| 208 | +extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> * |
| 209 | +__spirv_VectorInsertDynamic(__spv::__spirv_JointMatrixINTEL<T, R, C, L, S> *, |
139 | 210 | T val, size_t i);
|
140 |
| -#undef JOINT_MATRIX_INTEL |
| 211 | +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION |
141 | 212 |
|
142 | 213 | #ifndef __SPIRV_BUILTIN_DECLARATIONS__
|
143 | 214 | #error \
|
|
0 commit comments