Skip to content

Commit 38fd188

Browse files
[Matrix][SYCL] Change the template parameter of joint_matrix_fill to fix the issue of deduced conflicting types (#5277)
This is because Type deduction does not consider implicit conversions (other than type adjustments listed above): that's the job for overload resolution, which happens later.
1 parent c878063 commit 38fd188

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/include/sycl/ext/oneapi/matrix/matrix-jit.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,16 @@ joint_matrix_mad(Group sg, joint_matrix<T1, M, K, LayoutA, Group> &mA,
203203
}
204204

205205
template <typename Group, typename T, size_t NumRows, size_t NumCols,
206-
matrix_layout Layout>
206+
matrix_layout Layout, typename T2>
207207
inline __SYCL_ALWAYS_INLINE void
208208
joint_matrix_fill(Group sg,
209209
joint_matrix<T, NumRows, NumCols, Layout, Group> &res,
210-
const T v) {
210+
const T2 v) {
211211
// We kept the unused "sg" in joint_matrix_fill to match the other DPC++
212212
// functions
213213
(void)sg;
214214
#ifdef __SYCL_DEVICE_ONLY__
215-
res.spvm = __spirv_CompositeConstruct<T, NumRows, NumCols>(v);
215+
res.spvm = __spirv_CompositeConstruct<T, NumRows, NumCols>(static_cast<T>(v));
216216
#else
217217
(void)res;
218218
(void)v;

0 commit comments

Comments
 (0)