Skip to content

Commit f86cbde

Browse files
committed
add more verbose validation
1 parent d49442e commit f86cbde

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/conv1d.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ validate_conv1d(sycl::queue &Q, span3d_t data, size_t nw) {
4848
for (auto i2 = 0; i2 < n2 - 1; ++i2) {
4949
if(data(i0, i1, i2) != data(i0, i1, i2+1)){
5050
// throw std::runtime_error("nn");
51-
data(0,0,0) = -1000;
51+
data(0,0,0) = -12345;
5252
};
5353
}
5454
}
@@ -59,17 +59,19 @@ validate_conv1d(sycl::queue &Q, span3d_t data, size_t nw) {
5959
for (auto i0 = 0; i0 < n0 - 1; ++i0) {
6060
if(data(i0, i1, i2) != data(i0+1, i1, i2)){
6161
// throw std::runtime_error("nn");
62-
data(0,0,0) = -2000;
62+
data(0,0,0) = -45678;
6363
};
6464
}
6565
}
6666
});
6767

6868
Q.wait();
69-
if (data(0,0,0) == -1000 || data(0,0,0) == -2000)
70-
std::cout << "Values at same position i1 are not equivalent throught "
71-
"the batchs"
69+
if (data(0,0,0) == -12345 || data(0,0,0) == -45678)
70+
std::cout << "WARNING: Values at same position i1 are not equivalent "
71+
"throught the batchs. Check implementation."
7272
<< std::endl;
73+
else
74+
std::cout << "All values data[:,i1,:] are equal." << std::endl;
7375
}
7476

7577

0 commit comments

Comments
 (0)