From 117f1c5096083f91da0648906c7bd7b1f3cf738c Mon Sep 17 00:00:00 2001 From: Michal Zientkiewicz Date: Fri, 20 Sep 2024 17:12:33 +0200 Subject: [PATCH] Adjust test epsilons for CUDA 12.8 / sm100 Signed-off-by: Michal Zientkiewicz --- .../test/resampling_test/separable_3D_test.cu | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dali/kernels/test/resampling_test/separable_3D_test.cu b/dali/kernels/test/resampling_test/separable_3D_test.cu index 3460b4cc32..d41e93a538 100644 --- a/dali/kernels/test/resampling_test/separable_3D_test.cu +++ b/dali/kernels/test/resampling_test/separable_3D_test.cu @@ -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. @@ -444,10 +444,13 @@ class Resample3DTest> 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::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::value ? 1 : 2e-3; + Check(out_cpu, ref_cpu, EqualEpsRel(eps, 1e-3)); } } } @@ -500,11 +503,8 @@ class Resample3DTest> 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::value ? 1 : std::is_integral::value ? max_value()*1e-6 : 1e-5; Check(out_cpu[i], ref_cpu[i], EqualEpsRel(eps, 2e-3));