Hi everyone, I am working with mnist-8 model in the guide and I got the following runtimes to work, for context, I am on a windows machine with an Intel CPU and a Nvidia GPU running Unreal Engine 5.3:
NNERuntimeORTCuda (strictly requires CUDA 11.4 and CUDNN 8.8.2.26)
NNERuntimeORTDml (Works with no extra requirements)
NNERuntimeOrtCpu (Works with no extra requirements)
for NNERuntimeRDGHlsl → I could not even create a Model, I got errors that some layers are not supported, like the MaxPooling Layer for example, which I assume that requires creating those custom layers using HLSL some where in the code
I am trying to get NNERuntimeRDGDml to work and I think I am very close, here are the steps:
- Load Model Manual, Automatic or Lazy → works
- Create RDG Model → works
- Create RDG Model Instance → works
- set inputs and outputs → works
- Create input and output RDG Buffers on the GPU → works
- create input and output bindings → works
- Enqueue model, input bindings, output binding to the RDG → works
- Execute the RDG → works and then the editor crashes
I checked the logs and the last thing printed before the crash is “Graph Builder Executed” which I print right after GraphBuilder.execute() so I assume this means inference is running on the render dependency graph successfully
also the reason for the crash is a Memory access violation, so may be after or during graph execution the engine is trying to access a null pointer or something, trying to figure it out
There are 3 functions in my code (see below)
-
void NNERDG::CreateModelRDG() → the main function where steps 1 to 8 are executed
-
void NNERDG::CreateRDGBuffers(int32 InputSize, int32 OutputSize) → for step 5
-
void NNERDG::RunInferenceRDG(TSharedPtrUE::NNE::IModelInstanceRDG ModelInstanceRDG, TArray NNEInputTensorArrayBuffer) → for steps 6,7 and 8
I need help in
- confirming that the input and output data setup and bindings are correct in steps 4, 5 and 6
- confirm that step 7 is done correctly as well
- Why the editor is crashing after GraphBuilder is executed
Thank you
RDGModel.cpp (9.1 KB)