Skip to content

Commit

Permalink
Adjust test epsilons for CUDA 12.8 / sm100
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Zientkiewicz <[email protected]>
  • Loading branch information
mzient committed Sep 20, 2024
1 parent f34a227 commit 117f1c5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions dali/kernels/test/resampling_test/separable_3D_test.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019, 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// Copyright (c) 2019, 2022, 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -444,10 +444,13 @@ class Resample3DTest<ResamplingTestParams<Out, In, interp>>
if (interp == ResamplingFilterType::Nearest) {
Check(out_cpu, ref_cpu);
} else {
// Epsilons are quite big because, processing order in the reference is forced to be XYZ
// or YXZ, whereas the tested implementation can use any order.
double eps = std::is_integral<Out>::value ? 1 : 1e-3;
Check(out_cpu, ref_cpu, EqualEpsRel(eps, 1e-4));
// Epsilons are quite big because:
// - GPU uses fma
// - GPU uses different rounding
// - processing order in the reference is forced to be XYZ or YXZ, whereas
// the tested implementation can use any order.
double eps = std::is_integral<Out>::value ? 1 : 2e-3;
Check(out_cpu, ref_cpu, EqualEpsRel(eps, 1e-3));
}
}
}
Expand Down Expand Up @@ -500,11 +503,8 @@ class Resample3DTest<ResamplingTestParams<Out, In, interp>>
if (interp == ResamplingFilterType::Nearest) {
Check(out_cpu[i], ref_cpu[i]);
} else {
// Epsilons are quite big because:
// - GPU uses fma
// - GPU uses different rounding
// - processing order in the reference is forced to be XYZ or YXZ, whereas
// the tested implementation can use any order.
// Epsilons are quite big because, processing order in the reference is forced to be XYZ
// or YXZ, whereas the tested implementation can use any order.
double eps = std::is_integral<Out>::value ? 1 :
std::is_integral<In>::value ? max_value<In>()*1e-6 : 1e-5;
Check(out_cpu[i], ref_cpu[i], EqualEpsRel(eps, 2e-3));
Expand Down

0 comments on commit 117f1c5

Please sign in to comment.