Skip to content

Commit 73b8330

Browse files
authored
[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 <[email protected]>
1 parent 3a84a4e commit 73b8330

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ static const std::vector<TensorSpec> TrainingOnlyFeatures{
261261
static const std::vector<TensorSpec> getInputFeatures() {
262262
std::vector<TensorSpec> InputSpecs;
263263
for (size_t I = 0; I < NumberOfFeatures; ++I)
264-
InputSpecs.push_back(TensorSpec::createSpec<int64_t>(
265-
TFFeedPrefix + FeatureMap[I].name(), FeatureMap[I].shape()));
264+
InputSpecs.push_back(
265+
TensorSpec(TFFeedPrefix + FeatureMap[I].name(), FeatureMap[I]));
266266
append_range(InputSpecs, TrainingOnlyFeatures);
267267
return InputSpecs;
268268
}

0 commit comments

Comments
 (0)