llvm / llvm/llvm-project

[IR2Vec] Reduce/Remove "magic numbers" in IR2VecTest

Open
#162,199 0 comments 0 reactions 0 assignees View on GitHub
mlgo
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Current `IR2VecTest.cpp` relies heavily on `createDummyVocabForTest()` defined in `IR2Vec.cpp` for testing the embeddings. This leads to embeddings for opcodes, types, and operands to appear out of nowhere resulting in hardcoded values. This can be changed by allowing vocabulary creation with embeddings specific to the entities for which we want to compare (follow the same style as what we have in MIR2VecTest.cpp for testing the expected embeddings)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.