edge namespace

Contents

Namespaces

namespace qnn
namespace tflite

Classes

class Model
A base class for machine learning models.
class Tensor
A base class for representing a tensor object.

Enums

enum class DELEGATE: uint8_t { CPU, GPU, NPU }
Enum class representing different types of delegates for model execution.
enum class STATUS: uint8_t { SUCCESS, FAIL }
Enum class representing the status of an operation.
enum class TensorType: uint8_t { UNSUPPORTED, NOTYPE, FLOAT16, FLOAT32, INT8, INT16, INT32, UINT8, UINT16, UINT32 }
Enum class representing different types of tensors.

Functions

auto createModel(const std::filesystem::path& modelPath) -> std::unique_ptr< Model > -> auto EDGERUNNER_EXPORT
Function to create a model from a given file path.
auto createModel(const nonstd::span<uint8_t>& modelBuffer, const std::string& modelExtension = "tflite") -> std::unique_ptr< Model > -> auto EDGERUNNER_EXPORT
Function to create a model from a given buffer.

Enum documentation

enum class edge::DELEGATE: uint8_t

Enum class representing different types of delegates for model execution.

Enumerators
CPU

CPU delegate

GPU

GPU delegate

NPU

NPU delegate

enum class edge::STATUS: uint8_t

Enum class representing the status of an operation.

Enumerators
SUCCESS

Operation was successful

FAIL

Operation failed

enum class edge::TensorType: uint8_t

Enum class representing different types of tensors.

This enum class defines types of input and output Tensors for a Model. Each type corresponds to a specific data type that the tensor can hold.

Possible values:

  • UNSUPPORTED: Represents an unsupported tensor type
  • NOTYPE: Represents a tensor with no specific data type
  • FLOAT32: Represents a tensor with 32-bit floating point data type
  • FLOAT16: Represents a tensor with 16-bit floating point data type
  • INT32: Represents a tensor with 32-bit integer data type
  • UINT32: Represents a tensor with unsigned 32-bit integer data type
  • INT8: Represents a tensor with 8-bit integer data type
  • UINT8: Represents a tensor with unsigned 8-bit integer data type

Function documentation

auto EDGERUNNER_EXPORT edge::createModel(const std::filesystem::path& modelPath) -> std::unique_ptr< Model >

Function to create a model from a given file path.

Parameters
modelPath The file path to the model file
Returns A unique pointer to the created Model object

This function takes a file path to a model and creates a new Model object from it.

createModel() is the intended way to instantiate a Model using the edgerunner library

auto EDGERUNNER_EXPORT edge::createModel(const nonstd::span<uint8_t>& modelBuffer, const std::string& modelExtension = "tflite") -> std::unique_ptr< Model >

Function to create a model from a given buffer.

Parameters
modelBuffer The buffer of the model file
modelExtension
Returns A unique pointer to the created Model object

This function takes a buffer of a model and creates a new Model object from it.

createModel() is the intended way to instantiate a Model using the edgerunner library