MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
|
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>
Go to the source code of this file.
Classes | |
struct | ONNXModelRunner |
struct | Environment |
Functions | |
Environment * | createEnvironment () |
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) |
ONNXModelRunner * | createONNXModelRunner (Environment *env, int numAgents,...) |
ONNXModelRunner * | createSingleAgentOMR (char *agent_path) |
void | evaluate (ONNXModelRunner *omr) |
int | singleAgentEvaluate (ONNXModelRunner *obj, float *inp, int inp_size) |
void | destroyEnvironment (Environment *env) |
void | destroyONNXModelRunner (ONNXModelRunner *omr) |
This file defines the C APIs for ONNXModelRunner.
Definition in file ONNXModelRunnerCWrapper.cpp.
Environment * createEnvironment | ( | ) |
Definition at line 81 of file ONNXModelRunnerCWrapper.cpp.
ONNXModelRunner * createONNXModelRunner | ( | Environment * | env, |
int | numAgents, | ||
... ) |
Definition at line 105 of file ONNXModelRunnerCWrapper.cpp.
ONNXModelRunner * createSingleAgentOMR | ( | char * | agent_path | ) |
Definition at line 124 of file ONNXModelRunnerCWrapper.cpp.
void destroyEnvironment | ( | Environment * | env | ) |
Definition at line 155 of file ONNXModelRunnerCWrapper.cpp.
void destroyONNXModelRunner | ( | ONNXModelRunner * | omr | ) |
Definition at line 157 of file ONNXModelRunnerCWrapper.cpp.
bool env_checkDone | ( | Environment * | env | ) |
Definition at line 87 of file ONNXModelRunnerCWrapper.cpp.
void env_resetDone | ( | Environment * | env | ) |
Definition at line 85 of file ONNXModelRunnerCWrapper.cpp.
void env_setDone | ( | Environment * | env | ) |
Definition at line 83 of file ONNXModelRunnerCWrapper.cpp.
void env_setNextAgent | ( | Environment * | env, |
char * | agentName ) |
Definition at line 101 of file ONNXModelRunnerCWrapper.cpp.
void env_setNumFeatures | ( | Environment * | env, |
int | numFeatures ) |
Definition at line 89 of file ONNXModelRunnerCWrapper.cpp.
void env_setResetFunc | ( | Environment * | env, |
float *(*)() | resetFunc ) |
Definition at line 97 of file ONNXModelRunnerCWrapper.cpp.
void env_setStepFunc | ( | Environment * | env, |
float *(*)(Action action) | stepFunc ) |
Definition at line 93 of file ONNXModelRunnerCWrapper.cpp.
void evaluate | ( | ONNXModelRunner * | omr | ) |
Definition at line 130 of file ONNXModelRunnerCWrapper.cpp.
int singleAgentEvaluate | ( | ONNXModelRunner * | obj, |
float * | inp, | ||
int | inp_size ) |
Definition at line 148 of file ONNXModelRunnerCWrapper.cpp.