[llvm] [IR2Vec] Restructuring Vocabulary (PR #145119)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 20:14:57 PDT 2025
================
@@ -407,32 +360,148 @@ TEST_F(IR2VecTestFixture, GetFunctionVector) {
EXPECT_EQ(FuncVec.size(), 2u);
- // Function vector should match BB vector (only one BB): {1.29, 2.31}
- EXPECT_THAT(FuncVec,
- ElementsAre(DoubleNear(1.29, 1e-6), DoubleNear(2.31, 1e-6)));
+ // Function vector should match BB vector (only one BB): {44.4, 44.4}
+ EXPECT_TRUE(FuncVec.approximatelyEquals(Embedding(2, 44.4)));
}
-TEST(IR2VecTest, IR2VecVocabAnalysisWithPrepopulatedVocab) {
- Vocab InitialVocab = {{"key1", {1.1, 2.2}}, {"key2", {3.3, 4.4}}};
- Vocab ExpectedVocab = InitialVocab;
- unsigned ExpectedDim = InitialVocab.begin()->second.size();
+static constexpr unsigned MAX_OPCODES = 67;
----------------
boomanaiden154 wrote:
This constants currently don't follow the LLVM naming guidelines.
https://github.com/llvm/llvm-project/pull/145119
More information about the llvm-commits
mailing list