MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
Loading...
Searching...
No Matches
Classes | Functions
ONNXModelRunnerCWrapper.cpp File Reference

This file defines the C APIs for ONNXModelRunner. More...

#include "MLModelRunner/C/ONNXModelRunner.h"
#include "MLModelRunner/ONNXModelRunner/agent.h"
#include "MLModelRunner/ONNXModelRunner/utils.h"
#include "MLModelRunner/Utils/Debug.h"
#include "llvm/ADT/SmallVector.h"
#include <cassert>
#include <iostream>
#include <map>
#include <stdarg.h>
#include <vector>
Include dependency graph for ONNXModelRunnerCWrapper.cpp:

Go to the source code of this file.

Classes

struct  ONNXModelRunner
 
struct  Environment
 

Functions

EnvironmentcreateEnvironment ()
 
void env_setDone (Environment *env)
 
void env_resetDone (Environment *env)
 
bool env_checkDone (Environment *env)
 
void env_setNumFeatures (Environment *env, int numFeatures)
 
void env_setStepFunc (Environment *env, float *(*stepFunc)(Action action))
 
void env_setResetFunc (Environment *env, float *(*resetFunc)())
 
void env_setNextAgent (Environment *env, char *agentName)
 
ONNXModelRunnercreateONNXModelRunner (Environment *env, int numAgents,...)
 
ONNXModelRunnercreateSingleAgentOMR (char *agent_path)
 
void evaluate (ONNXModelRunner *omr)
 
int singleAgentEvaluate (ONNXModelRunner *obj, float *inp, int inp_size)
 
void destroyEnvironment (Environment *env)
 
void destroyONNXModelRunner (ONNXModelRunner *omr)
 

Detailed Description

This file defines the C APIs for ONNXModelRunner.

Definition in file ONNXModelRunnerCWrapper.cpp.

Function Documentation

◆ createEnvironment()

Environment * createEnvironment ( )

Definition at line 81 of file ONNXModelRunnerCWrapper.cpp.

◆ createONNXModelRunner()

ONNXModelRunner * createONNXModelRunner ( Environment * env,
int numAgents,
... )

Definition at line 105 of file ONNXModelRunnerCWrapper.cpp.

◆ createSingleAgentOMR()

ONNXModelRunner * createSingleAgentOMR ( char * agent_path)

Definition at line 124 of file ONNXModelRunnerCWrapper.cpp.

◆ destroyEnvironment()

void destroyEnvironment ( Environment * env)

Definition at line 155 of file ONNXModelRunnerCWrapper.cpp.

◆ destroyONNXModelRunner()

void destroyONNXModelRunner ( ONNXModelRunner * omr)

Definition at line 157 of file ONNXModelRunnerCWrapper.cpp.

◆ env_checkDone()

bool env_checkDone ( Environment * env)

Definition at line 87 of file ONNXModelRunnerCWrapper.cpp.

◆ env_resetDone()

void env_resetDone ( Environment * env)

Definition at line 85 of file ONNXModelRunnerCWrapper.cpp.

◆ env_setDone()

void env_setDone ( Environment * env)

Definition at line 83 of file ONNXModelRunnerCWrapper.cpp.

◆ env_setNextAgent()

void env_setNextAgent ( Environment * env,
char * agentName )

Definition at line 101 of file ONNXModelRunnerCWrapper.cpp.

◆ env_setNumFeatures()

void env_setNumFeatures ( Environment * env,
int numFeatures )

Definition at line 89 of file ONNXModelRunnerCWrapper.cpp.

◆ env_setResetFunc()

void env_setResetFunc ( Environment * env,
float *(*)() resetFunc )

Definition at line 97 of file ONNXModelRunnerCWrapper.cpp.

◆ env_setStepFunc()

void env_setStepFunc ( Environment * env,
float *(*)(Action action) stepFunc )

Definition at line 93 of file ONNXModelRunnerCWrapper.cpp.

◆ evaluate()

void evaluate ( ONNXModelRunner * omr)

Definition at line 130 of file ONNXModelRunnerCWrapper.cpp.

◆ singleAgentEvaluate()

int singleAgentEvaluate ( ONNXModelRunner * obj,
float * inp,
int inp_size )

Definition at line 148 of file ONNXModelRunnerCWrapper.cpp.