[llvm] 73b8330 - [MLInlineAdvisor] Changing creation of TensorSpec in a type agnostic manner. (#141161)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 20:10:34 PDT 2025
Author: S. VenkataKeerthy
Date: 2025-05-22T20:10:30-07:00
New Revision: 73b833005445b21886557aac3382d7fb429f8fdb
URL: https://github.com/llvm/llvm-project/commit/73b833005445b21886557aac3382d7fb429f8fdb
DIFF: https://github.com/llvm/llvm-project/commit/73b833005445b21886557aac3382d7fb429f8fdb.diff
LOG: [MLInlineAdvisor] Changing creation of TensorSpec in a type agnostic manner. (#141161)
This change would enable using `ir2vec::Embedding` which are float
vectors in ML Inliner.
Co-authored-by: svkeerthy <venkatakeerthy at google.com>
Added:
Modified:
llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
index 2feedd2ff40af..e7e8f2ac1ff25 100644
--- a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
@@ -261,8 +261,8 @@ static const std::vector<TensorSpec> TrainingOnlyFeatures{
static const std::vector<TensorSpec> getInputFeatures() {
std::vector<TensorSpec> InputSpecs;
for (size_t I = 0; I < NumberOfFeatures; ++I)
- InputSpecs.push_back(TensorSpec::createSpec<int64_t>(
- TFFeedPrefix + FeatureMap[I].name(), FeatureMap[I].shape()));
+ InputSpecs.push_back(
+ TensorSpec(TFFeedPrefix + FeatureMap[I].name(), FeatureMap[I]));
append_range(InputSpecs, TrainingOnlyFeatures);
return InputSpecs;
}
More information about the llvm-commits
mailing list