Skip to content

Commit

Permalink
[SYCL][Matrix tests][E2E] Add double compare case (intel#12298)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhaldi authored Jan 4, 2024
1 parent 4af4d4b commit 71192df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sycl/test-e2e/Matrix/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ bool matrix_compare(unsigned int rows, unsigned int cols, T1 *src, T2 *ref) {
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
if constexpr (!exact && (std::is_same_v<T1, float> ||
std::is_same_v<T1, bfloat16>)) {
std::is_same_v<T1, bfloat16> ||
(std::is_same_v<T1, double> &&
std::is_same_v<T2, double>))) {
float diff = std::fabs(src[i * cols + j] - (T1)ref[i * cols + j]);
if (diff > FLOAT_EPSILON || std::isnan(src[i * cols + j])) {
std::cout << "Incorrect result in matrix. "
Expand Down

0 comments on commit 71192df

Please sign in to comment.