//===- MLModelRunner.h ---- ML model runner interface -----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // #ifndef LLVM_ANALYSIS_MLMODELRUNNER_H #define LLVM_ANALYSIS_MLMODELRUNNER_H #include "llvm/Analysis/TensorSpec.h" #include "llvm/IR/PassManager.h" namespace llvm { class LLVMContext; /// MLModelRunner interface: abstraction of a mechanism for evaluating a /// ML model. More abstractly, evaluating a function that has as tensors as /// arguments, described via TensorSpecs, and returns a tensor. Currently, the /// latter is assumed to be a scalar, in absence of more elaborate scenarios. /// NOTE: feature indices are expected to be consistent all accross /// MLModelRunners (pertaining to the same model), and also Loggers (see /// TFUtils.h) class MLModelRunner { … }; } // namespace llvm #endif // LLVM_ANALYSIS_MLMODELRUNNER_H