Skip to content

Commit 71d2eeb

Browse files
dkhaldibb-sycl
authored andcommitted
[SYCL][Matrix] test the two features: fill a matrix and element wise operations (intel#645)
Two new matrix features are being added to the DPC++ compiler namely: fill a matrix and element wise operations. This PR adds tests for these two features. Signed-off-by: Dounia Khaldi [email protected]
1 parent 34e51fa commit 71d2eeb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SYCL/Matrix/element_wise_all_ops_half.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ template <typename T, size_t M, size_t N>
4444
void assert_ops_ref(
4545
accessor<T, 2, access::mode::read, access::target::host_buffer> C,
4646
const float ref) {
47+
void assert_ops_ref(/*const T &C*/ accessor<T, 2, access::mode::read,
48+
access::target::host_buffer>
49+
C,
50+
const float ref) {
4751
for (size_t i = 0; i < M; i++)
4852
for (size_t j = 0; j < N; j++) {
4953
auto diff = C[i][j] - ref;
@@ -205,6 +209,7 @@ void matrix_verify_logic(queue q, big_matrix<T, M, N> &A, nd_range<2> &r,
205209
wi_slice_a[i] < 2.0 || wi_slice_a[i] <= 2.0) {
206210
T val = (wi_slice_a[i] != 2.0) ? wi_slice_a[i]
207211
: static_cast<half>(2.0);
212+
T val = (wi_slice_a[i] != 2.0) ? wi_slice_a[i] : 2.0;
208213
val--;
209214
val++;
210215
if (wi_slice_a[i] == 2.0) {

0 commit comments

Comments
 (0)