Skip to content

IModelInstanceInterface

Generic interface for neural network model instances across different device types.

This interface provides a device-agnostic way to interact with NNE model instances, abstracting differences between CPU and GPU implementations.

class IModelInstanceInterface

Methods

IModelInstanceInterface

virtual ~IModelInstanceInterface() = default

GetInputTensorDescs

virtual TConstArrayView<UE::NNE::FTensorDesc> GetInputTensorDescs() = 0

Gets the input tensor descriptors for the model.


SetInputTensorShapes

virtual UE::NNE::EResultStatus
SetInputTensorShapes(TConstArrayView<UE::NNE::FTensorShape> InInputShapes) = 0

Sets the input tensor shapes for the model.

Parameters

  • InInputShapes (TConstArrayView<UE::NNE::FTensorShape>)

RunSync

virtual UE::NNE::EResultStatus
RunSync(TConstArrayView<FTensorBindingCPU> InInputBindings,
TConstArrayView<FTensorBindingCPU> InOutputBinding) = 0

Runs synchronous inference on the model.

Parameters

  • InInputBindings (TConstArrayView<FTensorBindingCPU>)

  • InOutputBinding (TConstArrayView<FTensorBindingCPU>)

Source: Source/ScholaNNE/Public/NNEUtils/NNEWrappers.h