Thanks. I am fairly far along but i am getting a windows exception deep in the optimization pass on my model. Is there an ONNX model somewhere I cna use to test that is known to work with NNE in 5.4?
This is the exception:
Exception 0xe06d7363 encountered at address 0x7fff8d46fabc
<unknown> 0x00007fff8d46fabc
UE::NNEUtilities::Internal::FOnnxRuntimeModelOptimizerPass::ApplyPass(FNNEModelRaw &, const UE::NNE::FAttributeMap &) NNEUtilitiesModelOptimizerONNX.cpp:67
UE::NNEUtilities::Internal::FModelOptimizerBase::ApplyAllPassesAndValidations(FNNEModelRaw &, const UE::NNE::FAttributeMap &) NNEUtilitiesModelOptimizerBase.cpp:87
UNNERuntimeORTCpu::CreateModelData(const FString &, TArrayView<…>, const TMap<…> &, const FGuid &, const ITargetPlatform *) NNERuntimeORT.cpp:82
UE::NNE::ModelData::CreateModelData(const FString &, const FString &, const TArray<…> &, const TMap<…> &, const FGuid &, const ITargetPlatform *) NNEModelData.cpp:142
UNNEModelData::GetModelData(const FString &) NNEModelData.cpp:582
UNNERuntimeORTCpu::CanCreateModelCPU(TObjectPtr<…>) NNERuntimeORT.cpp:134
UNNERuntimeORTCpu::CreateModelCPU(TObjectPtr<…>) NNERuntimeORT.cpp:159
UNNEBlueprintInterfaceBPLibrary::CreateModelInstance(FNNDataModel, FNNModelInstance &, bool &) NNEBlueprintInterfaceBPLibrary.cpp:75
UObject::execCallMathFunction(UObject *, FFrame &, void *const) ScriptCore.cpp:1075
[Inlined] FFrame::Step(UObject *, void *const) ScriptCore.cpp:478
[Blueprint] test: Inputs Event Graph
ProcessLocalScriptFunction(UObject *, FFrame &, void *const) ScriptCore.cpp:1233
ProcessScriptFunction<…>(UObject *, UFunction *, FFrame &, void *const, void (*)(UObject *, FFrame &, void *)) ScriptCore.cpp:1036
ProcessLocalFunction(UObject *, UFunction *, FFrame &, void *const) ScriptCore.cpp:1276
[Inlined] FFrame::Step(UObject *, void *const) ScriptCore.cpp:478
[Blueprint] test: Event BeginPlay Function /Game/test.test_C:ReceiveBeginPlay
ProcessLocalScriptFunction(UObject *, FFrame &, void *const) ScriptCore.cpp:1233
UObject::ProcessInternal(UObject *, FFrame &, void *const) ScriptCore.cpp:1303
UFunction::Invoke(UObject *, FFrame &, void *const) Class.cpp:6847
UObject::ProcessEvent(UFunction *, void *) ScriptCore.cpp:2142
AActor::ProcessEvent(UFunction *, void *) Actor.cpp:1092
AActor::BeginPlay() Actor.cpp:4251
AActor::DispatchBeginPlay(bool) Actor.cpp:4191
AWorldSettings::NotifyBeginPlay() WorldSettings.cpp:305
AGameStateBase::HandleBeginPlay() GameStateBase.cpp:227
AGameModeBase::StartPlay() GameModeBase.cpp:205
UWorld::BeginPlay() World.cpp:5329
UGameInstance::StartPlayInEditorGameInstance(ULocalPlayer *, const FGameInstancePIEParameters &) GameInstance.cpp:566
UEditorEngine::CreateInnerProcessPIEGameInstance(FRequestPlaySessionParams &, const FGameInstancePIEParameters &, int) PlayLevel.cpp:3141
UEditorEngine::OnLoginPIEComplete_Deferred(int, bool, FString, FPieLoginStruct) PlayLevel.cpp:1589
UEditorEngine::CreateNewPlayInEditorInstance(FRequestPlaySessionParams &, const bool, EPlayNetMode) PlayLevel.cpp:1853
UEditorEngine::StartPlayInEditorSession(FRequestPlaySessionParams &) PlayLevel.cpp:2868
UEditorEngine::StartQueuedPlaySessionRequestImpl() PlayLevel.cpp:1167
UEditorEngine::StartQueuedPlaySessionRequest() PlayLevel.cpp:1064
UEditorEngine::Tick(float, bool) EditorEngine.cpp:1901
UUnrealEdEngine::Tick(float, bool) UnrealEdEngine.cpp:547
FEngineLoop::Tick() LaunchEngineLoop.cpp:5915
[Inlined] EngineTick() Launch.cpp:61
GuardedMain(const wchar_t *) Launch.cpp:182
LaunchWindowsStartup(HINSTANCE__ *, HINSTANCE__ *, char *, int, const wchar_t *) LaunchWindows.cpp:247
WinMain(HINSTANCE__ *, HINSTANCE__ *, char *, int) LaunchWindows.cpp:298
This is the code generating it (last line is where the exception happens)
Note that I am passing in the loaded model wrapped in a Blueprint struct, but it seems alright…
TWeakInterfacePtr<INNERuntimeCPU> Runtime = UE::NNE::GetRuntime<INNERuntimeCPU>(FString("NNERuntimeORTCpu"));
if (!Runtime.IsValid())
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red,
TEXT("Could not fetch runtime NNERuntimeORTCpu " ));
success = false;
return;
}
const TObjectPtr<UNNEModelData> ModelData = modelData.ModelData;
if (ModelData.IsNull())
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red,
TEXT("Could not create ModelData " ));
success = false;
return;
}
if (!IsValid(ModelData))
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red,
TEXT("Invalid ModelData " ));
success = false;
return;
}
const TSharedPtr<IModelCPU> Model = Runtime-CreateModelCPU(ModelData);