![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <NNERuntimeRDG.h>
Public Types | |
| using | ESetInputTensorShapesStatus = EResultStatus |
| using | EEnqueueRDGStatus = EResultStatus |
Public Member Functions | |
| virtual | ~IModelInstanceRDG ()=default |
| virtual TConstArrayView< FTensorDesc > | GetInputTensorDescs () const =0 |
| virtual TConstArrayView< FTensorDesc > | GetOutputTensorDescs () const =0 |
| virtual TConstArrayView< FTensorShape > | GetInputTensorShapes () const =0 |
| virtual TConstArrayView< FTensorShape > | GetOutputTensorShapes () const =0 |
| virtual ESetInputTensorShapesStatus | SetInputTensorShapes (TConstArrayView< FTensorShape > InInputShapes)=0 |
| virtual EEnqueueRDGStatus | EnqueueRDG (FRDGBuilder &RDGBuilder, TConstArrayView< FTensorBindingRDG > Inputs, TConstArrayView< FTensorBindingRDG > Outputs)=0 |
The interface of a model instance that can run on RDG.
Use UE::NNE::IModelRDG::CreateModelInstance() to get a model instance. Use UE::NNE::GetRuntime<INNERuntimeRDG>(RuntimeName) to get a runtime capable of creating RDG models.
|
virtualdefault |
|
pure virtual |
Enqueue the model graph to a FRDGBuilder.
This function must be called from the render thread. SetInputTensorShapes must be called prior to this call. The caller owns the memory inside the bindings and must make sure that they are big enough.
| RDGBuilder | The RDG builder to which the neural network operations are enqueued. |
| InInputTensors | An array containing tensor bindings for each input tensor with caller owned memory containing the input data. |
| InOutputTensors | An array containing tensor bindings for each output tensor with caller owned memory big enough to contain the results on success. |
|
pure virtual |
Get the input tensor descriptions as defined by the model, potentially with variable dimensions.
|
pure virtual |
Get the input shapes.
SetInputTensorShapes must be called prior of running a model.
|
pure virtual |
Get the output tensor descriptions as defined by the model, potentially with variable dimensions.
|
pure virtual |
Getters for outputs shapes if they were already resolved.
Output shapes might be resolved after a call to SetInputTensorShapes if the model and runtime supports it. Otherwise they will be resolved while running the model
|
pure virtual |
Prepare the model to be run with the given input shape.
The call is mandatory before a model can be run. This function might be called from the render thread, if not it is up to the caller to ensure thread safety. The function will run shape inference and resolve, if possible, the output shapes which can then be accessed by calling GetOutputTensorShapes(). This is a potentially expensive call and should be called lazily if possible.
| InInputShapes | The input shapes to prepare the model with. |