1 //===- NoInferenceModelRunner.cpp - noop ML model runner ----------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // A pseudo model runner. We use it to store feature values when collecting
10 // logs for the default policy, in 'development' mode, but never ask it to
12 //===----------------------------------------------------------------------===//
13 #include "llvm/Analysis/NoInferenceModelRunner.h"
17 NoInferenceModelRunner::NoInferenceModelRunner(
18 LLVMContext
&Ctx
, const std::vector
<TensorSpec
> &Inputs
)
19 : MLModelRunner(Ctx
, MLModelRunner::Kind::NoOp
, Inputs
.size()) {
21 for (const auto &TS
: Inputs
)
22 setUpBufferForTensor(Index
++, TS
, nullptr);