MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
Loading...
Searching...
No Matches
Classes | Namespaces
MLModelRunner.h File Reference

The MLModelRunner class is the main interface for interacting with the ML models. More...

#include "SerDes/baseSerDes.h"
#include "SerDes/bitstreamSerDes.h"
#include "SerDes/jsonSerDes.h"
#include <cstdlib>
#include <future>
#include <memory>
#include <string>
#include <type_traits>
#include "SerDes/protobufSerDes.h"
#include "SerDes/tensorflowSerDes.h"
Include dependency graph for MLModelRunner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MLBridge::MLModelRunner
 MLModelRunner - The main interface for interacting with the ML models. More...
 

Namespaces

namespace  MLBridge
 

Detailed Description

The MLModelRunner class is the main interface for interacting with the ML models.

The MLCompilerBridge uses the MLModelRunner class to set the features to be sent to the model and get the result back from the model.

This class internally uses the SerDes class to serialize and deserialize the features and result.

The MLModelRunner class is an abstract class and cannot be instantiated.

This class internally uses the SerDes class to serialize and deserialize the features and result.

Supporting new Model Runners:

  1. Create a new class inheriting the MLModelRunner class.
  2. Override evaluateUntyped() method to call the model and get the result.

Using any of the existing Model Runners:

  1. Instantiate the model runner object with the appropriate arguments.
  2. Call populateFeatures() to set the features to be sent to the model.
  3. Call evaluate() to get the send and receive the result from the model. Similar flows apply for both training and inference.

Definition in file MLModelRunner.h.