Skip to content

Commit 9d0f785

Browse files
committed
SKIP the test for bfloat16 when needing quite relaxed condition
1 parent 2a3813c commit 9d0f785

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

reference/test/solver/batch_bicgstab_kernels.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ TYPED_TEST(BatchBicgstab, ApplyLogsResAndIters)
184184
using Solver = typename TestFixture::solver_type;
185185
using Mtx = typename TestFixture::Mtx;
186186
using Logger = gko::batch::log::BatchConvergence<value_type>;
187+
// bfloat16 will need to bump the scale from 50 to 100, which gives around
188+
// 0.7 for error check, so it is not really useful for testing. We skip the
189+
// bfloat16 for this check.
190+
// TODO: figure out a suitible test for different precision.
191+
SKIP_IF_HALF(value_type);
187192
const real_type tol = 1e-4;
188193
const int max_iters = 1000;
189194
auto solver_factory =
@@ -210,7 +215,7 @@ TYPED_TEST(BatchBicgstab, ApplyLogsResAndIters)
210215

211216
auto iter_counts = logger->get_num_iterations();
212217
auto res_norm = logger->get_residual_norm();
213-
GKO_ASSERT_BATCH_MTX_NEAR(res.x, linear_system.exact_sol, tol * 100);
218+
GKO_ASSERT_BATCH_MTX_NEAR(res.x, linear_system.exact_sol, tol * 50);
214219
for (size_t i = 0; i < num_batch_items; i++) {
215220
auto rel_res_norm = res.host_res_norm->get_const_values()[i] /
216221
linear_system.host_rhs_norm->get_const_values()[i];

0 commit comments

Comments
 (0)