From d6a9c5c349cfe306bd0d3d4febac10d23959e7b2 Mon Sep 17 00:00:00 2001 From: Mike Mullen <96440448+mfzmullen@users.noreply.github.com> Date: Wed, 22 Jan 2025 20:52:38 -0600 Subject: [PATCH] Adjust half-type threshold for cross product unit tests (#838) * Adjust half-type threshold for cross product unit tests * Use the same seed for rng each time --- test/00_operators/OperatorTests.cu | 2 +- test/test_vectors/generators/00_operators.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/00_operators/OperatorTests.cu b/test/00_operators/OperatorTests.cu index 1ef3d962..3e5ea055 100644 --- a/test/00_operators/OperatorTests.cu +++ b/test/00_operators/OperatorTests.cu @@ -2015,7 +2015,7 @@ TYPED_TEST(OperatorTestsFloatNonComplexAllExecs, Cross) // Half precision needs a bit more tolerance when compared to fp32 float thresh = 0.01f; if constexpr (is_matx_half_v) { - thresh = 0.02f; + thresh = 0.08f; } {//batched 4 x 3 diff --git a/test/test_vectors/generators/00_operators.py b/test/test_vectors/generators/00_operators.py index 9d6861dc..b8948920 100644 --- a/test/test_vectors/generators/00_operators.py +++ b/test/test_vectors/generators/00_operators.py @@ -24,7 +24,8 @@ def run(self) -> Dict[str, np.array]: class cross_operator: def __init__(self, dtype: str, size: List[int]): self.size = size - self.dtype = dtype + self.dtype = dtype + np.random.seed(1234) pass def run(self) -> Dict[str, np.array]: