UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
INNERuntime Class Referenceabstract

#include <NNERuntime.h>

Public Types

enum class  ECanCreateModelDataStatus : uint8 { Ok = 0 , Fail = 1 , FailFileIdNotSupported = 2 }
 

Public Member Functions

virtual FString GetRuntimeName () const =0
 
virtual ECanCreateModelDataStatus CanCreateModelData (const FString &FileType, TConstArrayView64< uint8 > FileData, const TMap< FString, TConstArrayView64< uint8 > > &AdditionalFileData, const FGuid &FileId, const ITargetPlatform *TargetPlatform) const =0
 
virtual TSharedPtr< UE::NNE::FSharedModelDataCreateModelData (const FString &FileType, TConstArrayView64< uint8 > FileData, const TMap< FString, TConstArrayView64< uint8 > > &AdditionalFileData, const FGuid &FileId, const ITargetPlatform *TargetPlatform)=0
 
virtual FString GetModelDataIdentifier (const FString &FileType, TConstArrayView64< uint8 > FileData, const TMap< FString, TConstArrayView64< uint8 > > &AdditionalFileData, const FGuid &FileId, const ITargetPlatform *TargetPlatform) const =0
 

Detailed Description

The base interface of a neural network runtime.

This interface is mainly used internally by UNNEModelData to cook a model given in a file format (e.g. .onnx) into runtime specific model data. The model data is then stored inside UNNEModelData which then can be used in game to create an inferable model. See INNERuntimeCPU, INNERuntimeGPU and INNERuntimeRDG on how to create a model given a UNNEModelData asset.

Member Enumeration Documentation

◆ ECanCreateModelDataStatus

Enumerator
Ok 
Fail 
FailFileIdNotSupported 

Member Function Documentation

◆ CanCreateModelData()

virtual ECanCreateModelDataStatus INNERuntime::CanCreateModelData ( const FString &  FileType,
TConstArrayView64< uint8 FileData,
const TMap< FString, TConstArrayView64< uint8 > > &  AdditionalFileData,
const FGuid FileId,
const ITargetPlatform TargetPlatform 
) const
pure virtual

Check if the runtime is able to create model data given some file data representing a neural network.

Parameters
FileTypeThe type of file inside FileData. Corresponds to the file extension (e.g. 'onnx').
FileDataThe raw binary file of a neural network model.
AdditionalFileDataAdditional raw binary data of the neural network model.
FileIdThe unique identifier representing FileData.
TargetPlatformThe Interface identifying the target platform for which the data needs to be created. A null pointer indicates the currently compiled/running platform.
Returns
True if the runtime is able to create model data, false otherwise.

◆ CreateModelData()

virtual TSharedPtr< UE::NNE::FSharedModelData > INNERuntime::CreateModelData ( const FString &  FileType,
TConstArrayView64< uint8 FileData,
const TMap< FString, TConstArrayView64< uint8 > > &  AdditionalFileData,
const FGuid FileId,
const ITargetPlatform TargetPlatform 
)
pure virtual

Create model data given some raw file data.

Parameters
FileTypeThe type of file inside FileData. Corresponds to the file extension (e.g. 'onnx').
FileDataThe raw binary file of a neural network model.
AdditionalFileDataAdditional raw binary data of the neural network model.
FileIdThe unique identifier representing FileData.
TargetPlatformThe Interface identifying the target platform for which the data needs to be created. A null pointer indicates the currently compiled/running platform.
Returns
A pointer to data representing the runtime specific representation of the model to be stored by UNNEModelData on success or an invalid pointer otherwise.

◆ GetModelDataIdentifier()

virtual FString INNERuntime::GetModelDataIdentifier ( const FString &  FileType,
TConstArrayView64< uint8 FileData,
const TMap< FString, TConstArrayView64< uint8 > > &  AdditionalFileData,
const FGuid FileId,
const ITargetPlatform TargetPlatform 
) const
pure virtual

Get an id uniquely identifying the model data. This is used by UNNEModelData to create a FCacheKey to get and add the model data from and to a DDC.

Parameters
FileTypeThe type of file inside FileData. Corresponds to the file extension (e.g. 'onnx').
FileDataThe raw binary file of a neural network model.
AdditionalFileDataAdditional raw binary data of the neural network model.
FileIdThe unique identifier representing FileData.
TargetPlatformThe Interface identifying the target platform for which the data is produced or by which it will be consumed. A null pointer indicates the currently compiled/running platform.
Returns
A string that identifies the model data uniquely, e.g. by containing the FileId, model data version and target platform display name.

◆ GetRuntimeName()

virtual FString INNERuntime::GetRuntimeName ( ) const
pure virtual

Get the name of the runtime.

Returns
The name of the runtime.

The documentation for this class was generated from the following file: