MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ONNXModel Class Reference

#include <onnx.h>

Public Member Functions

 ONNXModel (const char *model_path)
 
void run (llvm::SmallVector< float, 100 > &input, llvm::SmallVector< float, 100 > &output)
 Runs the ONNX model on the input and returns the output.
 

Private Member Functions

Ort::Value getInputValue (llvm::SmallVector< float, 100 > &input, int inputIdx)
 

Private Attributes

Ort::Env * env
 
const char * model_path
 
Ort::Session * session
 

Detailed Description

Definition at line 29 of file onnx.h.

Constructor & Destructor Documentation

◆ ONNXModel()

ONNXModel::ONNXModel ( const char * model_path)

Definition at line 24 of file onnx.cpp.

Member Function Documentation

◆ getInputValue()

Ort::Value ONNXModel::getInputValue ( llvm::SmallVector< float, 100 > & input,
int inputIdx )
private

Definition at line 29 of file onnx.cpp.

◆ run()

void ONNXModel::run ( llvm::SmallVector< float, 100 > & input,
llvm::SmallVector< float, 100 > & output )

Runs the ONNX model on the input and returns the output.

Definition at line 51 of file onnx.cpp.

Member Data Documentation

◆ env

Ort::Env* ONNXModel::env
private

Definition at line 30 of file onnx.h.

◆ model_path

const char* ONNXModel::model_path
private

Definition at line 31 of file onnx.h.

◆ session

Ort::Session* ONNXModel::session
private

Definition at line 32 of file onnx.h.


The documentation for this class was generated from the following files: