diff options
author | S. VenkataKeerthy <31350914+svkeerthy@users.noreply.github.com> | 2025-07-01 12:03:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-01 12:03:37 -0700 |
commit | efe0deae3fc6211a15c0fa0cdf7707d06950a616 (patch) | |
tree | c26d2921fbcbbffa08db3ea132c6cdf7764909e7 /llvm/unittests/Analysis | |
parent | 6fafa46f8c1b335d08a59febb8bcb35a17fb177e (diff) | |
download | llvm-efe0deae3fc6211a15c0fa0cdf7707d06950a616.zip llvm-efe0deae3fc6211a15c0fa0cdf7707d06950a616.tar.gz llvm-efe0deae3fc6211a15c0fa0cdf7707d06950a616.tar.bz2 |
[NFC][IR2Vec] Increasing tolerance in `approximatelyEquals()` of `Embedding` (#145117)
Increase the default tolerance for `approximatelyEquals` in IR2Vec's Embedding class from 1e-6 to 1e-4.
(Tracking issue - #141817)
Diffstat (limited to 'llvm/unittests/Analysis')
-rw-r--r-- | llvm/unittests/Analysis/IR2VecTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Analysis/IR2VecTest.cpp b/llvm/unittests/Analysis/IR2VecTest.cpp index ba0e4e2..3c97c20 100644 --- a/llvm/unittests/Analysis/IR2VecTest.cpp +++ b/llvm/unittests/Analysis/IR2VecTest.cpp @@ -154,14 +154,14 @@ TEST(EmbeddingTest, ApproximatelyEqual) { EXPECT_TRUE(E1.approximatelyEquals(E2)); // Diff = 1e-7 Embedding E3 = {1.00002, 2.00002, 3.00002}; // Diff = 2e-5 - EXPECT_FALSE(E1.approximatelyEquals(E3)); + EXPECT_FALSE(E1.approximatelyEquals(E3, 1e-6)); EXPECT_TRUE(E1.approximatelyEquals(E3, 3e-5)); Embedding E_clearly_within = {1.0000005, 2.0000005, 3.0000005}; // Diff = 5e-7 EXPECT_TRUE(E1.approximatelyEquals(E_clearly_within)); Embedding E_clearly_outside = {1.00001, 2.00001, 3.00001}; // Diff = 1e-5 - EXPECT_FALSE(E1.approximatelyEquals(E_clearly_outside)); + EXPECT_FALSE(E1.approximatelyEquals(E_clearly_outside, 1e-6)); Embedding E4 = {1.0, 2.0, 3.5}; // Large diff EXPECT_FALSE(E1.approximatelyEquals(E4, 0.01)); |