17#ifndef TFMODELRUNNER_H
18#define TFMODELRUNNER_H
35 llvm::StringRef FeedPrefix =
"feed_",
36 llvm::StringRef FetchPrefix =
"fetch_")
46 assert(
ResultIndex >= 0 &&
"Cannot find DecisionName in inlining model");
49 llvm::StringRef FeedPrefix =
"feed_",
50 llvm::StringRef FetchPrefix =
"fetch_")
60 assert(
ResultIndex >= 0 &&
"Cannot find DecisionName in inlining model");
65 llvm_unreachable(
"requestExit() is not supported in TFModelRunner");
86#define NOOP_MODEL_ERRMSG \
87 "The mock AOT-ed saved model is a compile-time stub and should not be " \
101#undef NOOP_MODEL_ERRMSG
The MLModelRunner class is the main interface for interacting with the ML models.
#define NOOP_MODEL_ERRMSG
MLModelRunner - The main interface for interacting with the ML models.
std::unique_ptr< BaseSerDes > SerDes
Kind
Type of the MLModelRunner.
void setRequest(void *request)
Mainly used in the case of gRPC where the request object is not known explicitly.
A mock class satisfying the interface expected by ReleaseModeModelRunner for its TGen parameter.
int LookupResultIndex(const std::string &)
int LookupArgIndex(const std::string &)
NoopSavedModelImpl()=default
TFModelRunner - TF Compiled model implementation of the MLModelRunner.
void * evaluateUntyped() override
Should be implemented by the derived class to call the model and get the result.
TFModelRunner(llvm::StringRef DecisionName, llvm::StringRef FeedPrefix="feed_", llvm::StringRef FetchPrefix="fetch_")
TFModelRunner(llvm::StringRef DecisionName, llvm::LLVMContext &Ctx, llvm::StringRef FeedPrefix="feed_", llvm::StringRef FetchPrefix="fetch_")
FeatureNames' type should be an indexed collection of std::string, like std::array or std::vector,...
virtual void requestExit() override
virtual ~TFModelRunner()=default
static bool classof(const MLModelRunner *R)
std::unique_ptr< TGen > CompiledModel
bool isEmbeddedModelEvaluatorValid()
bool isEmbeddedModelEvaluatorValid< NoopSavedModelImpl >()
SerDesKind
This is the base class for SerDes.