LLVM 24.0.0git
MLGOUtils.h File Reference

This file provides helper functions for creating MLModelRunners and checking model validity in release mode. More...

#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/InteractiveModelRunner.h"
#include "llvm/Analysis/MLModelRunner.h"
#include "llvm/Analysis/ReleaseModeModelRunner.h"
#include "llvm/Analysis/TensorSpec.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/CommandLine.h"
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

template<class CompiledModelType, class EnumType, bool ExternalStorage, class ParserClass>
bool llvm::isReleaseModelValid (StringRef InteractiveChannelBaseName, const cl::opt< EnumType, ExternalStorage, ParserClass > &SelectedModel, EnumType DefaultModelVal=EnumType::Default)
 Helper to check if a release-mode ML advisor has a valid model to execute.
template<class CompiledModelType, class EnumType>
bool llvm::isReleaseModelValid (StringRef InteractiveChannelBaseName, EnumType SelectedModel, EnumType DefaultModelVal=EnumType::Default)
 Helper to check if a release-mode ML advisor has a valid model to execute.
template<class CompiledModelType, bool HaveMLIRLowering, class CreateEmitCFunc>
std::unique_ptr< MLModelRunnerllvm::createReleaseModeModelRunner (LLVMContext &Ctx, const std::vector< TensorSpec > &InputFeatures, StringRef DecisionName, const std::string &InteractiveChannelBaseName, const TensorSpec &InteractiveDecisionSpec, CreateEmitCFunc &&CreateEmitCModelRunner, const EmbeddedModelRunnerOptions &Options={})
 Helper to construct the appropriate MLModelRunner in release mode:

Detailed Description

This file provides helper functions for creating MLModelRunners and checking model validity in release mode.

Definition in file MLGOUtils.h.