Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Disable std::ldiv test for SYCL device. #920

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions SYCL/DeviceLib/cmath_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ template <class T> void device_cmath_test_2(s::queue &deviceQueue) {
}
#endif

// Disable std::lldiv test since it will lead to OCL CPU
// failure, OCL CPU runtime has already fixed but need to
// wait for the fix to propagate into pre-ci environment.
// Disable std::lldiv and std::ldiv test since it will lead
// to OCL CPU failure, OCL CPU runtime has already fixed but
// need to wait for the fix to propagate into pre-ci environment.
void device_integer_math_test(s::queue &deviceQueue) {
div_t result_i[1];
ldiv_t result_l[1];
// ldiv_t result_l[1];
// lldiv_t result_ll[1];

int result_i2[1];
Expand All @@ -176,21 +176,21 @@ void device_integer_math_test(s::queue &deviceQueue) {

{
s::buffer<div_t, 1> buffer1(result_i, s::range<1>{1});
s::buffer<ldiv_t, 1> buffer2(result_l, s::range<1>{1});
// s::buffer<ldiv_t, 1> buffer2(result_l, s::range<1>{1});
// s::buffer<lldiv_t, 1> buffer3(result_ll, s::range<1>{1});
s::buffer<int, 1> buffer4(result_i2, s::range<1>{1});
s::buffer<long int, 1> buffer5(result_l2, s::range<1>{1});
s::buffer<long long int, 1> buffer6(result_ll2, s::range<1>{1});
deviceQueue.submit([&](s::handler &cgh) {
auto res_i_access = buffer1.get_access<sycl_write>(cgh);
auto res_l_access = buffer2.get_access<sycl_write>(cgh);
// auto res_l_access = buffer2.get_access<sycl_write>(cgh);
// auto res_ll_access = buffer3.get_access<sycl_write>(cgh);
auto res_i2_access = buffer4.get_access<sycl_write>(cgh);
auto res_l2_access = buffer5.get_access<sycl_write>(cgh);
auto res_ll2_access = buffer6.get_access<sycl_write>(cgh);
cgh.single_task<class DeviceIntMathTest>([=]() {
res_i_access[0] = std::div(99, 4);
res_l_access[0] = std::ldiv(10000, 23);
// res_l_access[0] = std::ldiv(10000, 23);
// res_ll_access[0] = std::lldiv(200000000, 47);
res_i2_access[0] = std::abs(-111);
res_l2_access[0] = std::labs(10000);
Expand All @@ -200,7 +200,7 @@ void device_integer_math_test(s::queue &deviceQueue) {
}

assert(result_i[0].quot == 24 && result_i[0].rem == 3);
assert(result_l[0].quot == 434 && result_l[0].rem == 18);
// assert(result_l[0].quot == 434 && result_l[0].rem == 18);
// assert(result_ll[0].quot == 4255319 && result_ll[0].rem == 7);
assert(result_i2[0] == 111);
assert(result_l2[0] == 10000);
Expand Down