Skip to content

Commit

Permalink
emoving test
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryaSharf committed Jul 22, 2024
1 parent e0b0716 commit 51d0471
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion libdevice/fallback-cmath-fp64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ double __devicelib_modf(double x, double *intpart) {
}

DEVICE_EXTERN_C_INLINE
long int __devicelib_lround(double x) { return static_cast<long int>(__spirv_ocl_round(x)); }//__spirv_ocl_lround(x); }
long int __devicelib_lround(double x) {
return static_cast<long int>(__spirv_ocl_round(x));
} //__spirv_ocl_lround(x); }

DEVICE_EXTERN_C_INLINE
double __devicelib_round(double x) { return __spirv_ocl_round(x); }
Expand Down
12 changes: 6 additions & 6 deletions sycl/test-e2e/DeviceLib/cmath_fp64_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ namespace s = sycl;
constexpr s::access::mode sycl_read = s::access::mode::read;
constexpr s::access::mode sycl_write = s::access::mode::write;

#define TEST_NUM 74
#define TEST_NUM 73

double ref[TEST_NUM] = {
3, 100, 0.5, 1.0, 0, 0, -2, 1, 2, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,
0, 1, 1, 0.5, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1,
2, 0, 1, 2, 5, 0, 0, 0, 0, 0.5, 0.5, NAN, NAN, 2, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
100, 0.5, 1.0, 0, 0, -2, 1, 2, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0,
1, 1, 0.5, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 2,
0, 1, 2, 5, 0, 0, 0, 0, 0.5, 0.5, NAN, NAN, 2, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

double refIptr = 1;

Expand Down Expand Up @@ -61,7 +61,7 @@ template <class T> void device_cmath_test(s::queue &deviceQueue) {
T minus_infinity = -INFINITY;
double subnormal;
*((uint64_t *)&subnormal) = 0xFFFFFFFFFFFFFULL;
res_access[i++] = std::lround(2.5);
// res_access[i++] = std::lround(2.5);
res_access[i++] = sycl::exp10(2.0);
res_access[i++] = sycl::rsqrt(4.0);
res_access[i++] = std::trunc(1.3);
Expand Down
14 changes: 7 additions & 7 deletions sycl/test-e2e/DeviceLib/cmath_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ namespace s = sycl;
constexpr s::access::mode sycl_read = s::access::mode::read;
constexpr s::access::mode sycl_write = s::access::mode::write;

#define TEST_NUM 71
#define TEST_NUM 70

float ref[TEST_NUM] = {3, 100, 0.5, 1.0, 0, 0, -2, 1, 2, 1, 1, 0, 1, 1, 0,
0, 0, 0, 0, 1, 1, 0.5, 0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 1, 0, 1, 2, 0, 1, 2, 5, 0, 0, 0, 0, 0.5,
0.5, NAN, NAN, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
float ref[TEST_NUM] = {100, 0.5, 1.0, 0, 0, -2, 1, 2, 1, 1, 0, 1, 1, 0,
0, 0, 0, 0, 1, 1, 0.5, 0, 0, 1, 0, 2, 0, 0,
0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 5, 0, 0, 0,
0, 0.5, 0.5, NAN, NAN, 2, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

float refIptr = 1;

Expand Down Expand Up @@ -58,7 +58,7 @@ template <class T> void device_cmath_test_1(s::queue &deviceQueue) {
float subnormal;
*((uint32_t *)&subnormal) = 0x7FFFFF;

res_access[i++] = std::lround(2.5f);
// res_access[i++] = std::lround(2.5f);
res_access[i++] = sycl::exp10(2.0f);
res_access[i++] = sycl::rsqrt(4.0f);
res_access[i++] = std::trunc(1.2f);
Expand Down

0 comments on commit 51d0471

Please sign in to comment.