[llvm] Changing creation of TensorSpec in a type agnostic manner. (PR #141161)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 16:44:28 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: S. VenkataKeerthy (svkeerthy)
<details>
<summary>Changes</summary>
This change would enable using `ir2vec::Embedding` which are float vectors in ML Inliner.
---
Full diff: https://github.com/llvm/llvm-project/pull/141161.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp (+2-2)
``````````diff
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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/141161
More information about the llvm-commits
mailing list