amd / RyzenAI-SW

MIT License
411 stars 66 forks source link

Installation of ryzen 1.3.0 errors #135

Open Garbo1229 opened 22 hours ago

Garbo1229 commented 22 hours ago

CPU is amd R7-8845HS. I tried to install ryzenai based on https://ryzenai.docs.amd.com/en/latest/inst.html . I'm getting this error. What should I change?

(ryzen-ai-1.3.0) C:\Program Files\RyzenAI\1.3.0\quicktest>python quicktest.py
Setting environment for PHX/HPT
XLNX_VART_FIRMWARE= C:\Program Files\RyzenAI\1.3.0\voe-4.0-win_amd64\xclbins\phoenix\1x4.xclbin
NUM_OF_DPU_RUNNERS= 1
XLNX_TARGET_NAME= AMD_AIE2_Nx4_Overlay
WARNING: Logging before InitGoogleLogging() is written to STDERR
I20241203 22:22:28.195551 104432 vitisai_compile_model.cpp:1046] Vitis AI EP Load ONNX Model Success
I20241203 22:22:28.195551 104432 vitisai_compile_model.cpp:1047] Graph Input Node Name/Shape (1)
I20241203 22:22:28.195551 104432 vitisai_compile_model.cpp:1051]         input : [-1x3x32x32]
I20241203 22:22:28.195551 104432 vitisai_compile_model.cpp:1057] Graph Output Node Name/Shape (1)
I20241203 22:22:28.195551 104432 vitisai_compile_model.cpp:1061]         output : [-1x10]
[Vitis AI EP] No. of Operators :   CPU     2    NPU   398
[Vitis AI EP] No. of Subgraphs :   CPU     1    NPU     1 Actually running on NPU     1
2024-12-03 22:22:28.3108482 [W:onnxruntime:, session_state.cc:1166 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2024-12-03 22:22:28.3160418 [W:onnxruntime:, session_state.cc:1168 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
F20241203 22:22:28.462572 104432 custom_op.cpp:552] -- Error: Failed to create GE handle: Error: No compatible xclbin file found.
2024-12-03 22:22:28.4819190 [E:onnxruntime:, inference_session.cc:2106 onnxruntime::InferenceSession::Initialize::<lambda_666f9e10d0809ac0097d66ff1b8ff07f>::operator ()] Exception during initialization: private: static void __cdecl google::protobuf::FieldDescriptor::TypeOnceInit(class google::protobuf::FieldDescriptor const * __ptr64)
public: virtual unsigned char * __ptr64 __cdecl google::protobuf::internal::ZeroFieldsBase::_InternalSerialize(unsigned char * __ptr64,class google::protobuf::io::EpsCopyOutputStream * __ptr64)const __ptr64
__CxxFrameHandler4
(unknown)
RtlCaptureContext2
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
(unknown)
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
public: void __cdecl pybind11::error_already_set::discard_as_unraisable(class pybind11::object) __ptr64
PyCFunction_GetFlags
_PyObject_MakeTpCall
PyMethod_Self
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall

Failed to create an InferenceSession: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: private: static void __cdecl google::protobuf::FieldDescriptor::TypeOnceInit(class google::protobuf::FieldDescriptor const * __ptr64)
public: virtual unsigned char * __ptr64 __cdecl google::protobuf::internal::ZeroFieldsBase::_InternalSerialize(unsigned char * __ptr64,class google::protobuf::io::EpsCopyOutputStream * __ptr64)const __ptr64
__CxxFrameHandler4
(unknown)
RtlCaptureContext2
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
(unknown)
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
public: void __cdecl pybind11::error_already_set::discard_as_unraisable(class pybind11::object) __ptr64
PyCFunction_GetFlags
_PyObject_MakeTpCall
PyMethod_Self
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
cyndwith commented 20 hours ago

As the error suggests, it looks like quicktest.py is failing to find the xclbin's.

Please, try the instructions in the runtime setup: https://ryzenai.docs.amd.com/en/latest/runtime_setup.html to setup 'XLNX_VART_FIRMWARE' and 'XLNX_TARGET_NAME', to see if it fixes the error.

Garbo1229 commented 12 hours ago

I tried to set it up with the following results.

(ryzen-ai-1.3.0) C:\Program Files\RyzenAI\1.3.0\quicktest>set XLNX_VART_FIRMWARE=%RYZEN_AI_INSTALLATION_PATH%/voe-4.0-win_amd64/xclbins/phoenix/1x4.xclbin

(ryzen-ai-1.3.0) C:\Program Files\RyzenAI\1.3.0\quicktest>set XLNX_TARGET_NAME=AMD_AIE2_Nx4_Overlay

(ryzen-ai-1.3.0) C:\Program Files\RyzenAI\1.3.0\quicktest>python quicktest.py
Setting environment for PHX/HPT
XLNX_VART_FIRMWARE= C:\Program Files\RyzenAI\1.3.0\voe-4.0-win_amd64\xclbins\phoenix\1x4.xclbin
NUM_OF_DPU_RUNNERS= 1
XLNX_TARGET_NAME= AMD_AIE2_Nx4_Overlay
WARNING: Logging before InitGoogleLogging() is written to STDERR
I20241204 08:19:38.847720 72868 vitisai_compile_model.cpp:1046] Vitis AI EP Load ONNX Model Success
I20241204 08:19:38.847720 72868 vitisai_compile_model.cpp:1047] Graph Input Node Name/Shape (1)
I20241204 08:19:38.847720 72868 vitisai_compile_model.cpp:1051]          input : [-1x3x32x32]
I20241204 08:19:38.847720 72868 vitisai_compile_model.cpp:1057] Graph Output Node Name/Shape (1)
I20241204 08:19:38.847720 72868 vitisai_compile_model.cpp:1061]          output : [-1x10]
[Vitis AI EP] No. of Operators :   CPU     2    NPU   398
[Vitis AI EP] No. of Subgraphs :   CPU     1    NPU     1 Actually running on NPU     1
2024-12-04 08:19:38.9464950 [W:onnxruntime:, session_state.cc:1166 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2024-12-04 08:19:38.9511231 [W:onnxruntime:, session_state.cc:1168 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
F20241204 08:19:39.086123 72868 custom_op.cpp:552] -- Error: Failed to create GE handle: Error: No compatible xclbin file found.
2024-12-04 08:19:39.0998961 [E:onnxruntime:, inference_session.cc:2106 onnxruntime::InferenceSession::Initialize::<lambda_666f9e10d0809ac0097d66ff1b8ff07f>::operator ()] Exception during initialization: private: static void __cdecl google::protobuf::FieldDescriptor::TypeOnceInit(class google::protobuf::FieldDescriptor const * __ptr64)
public: virtual unsigned char * __ptr64 __cdecl google::protobuf::internal::ZeroFieldsBase::_InternalSerialize(unsigned char * __ptr64,class google::protobuf::io::EpsCopyOutputStream * __ptr64)const __ptr64
__CxxFrameHandler4
(unknown)
RtlCaptureContext2
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
(unknown)
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
public: void __cdecl pybind11::error_already_set::discard_as_unraisable(class pybind11::object) __ptr64
PyCFunction_GetFlags
_PyObject_MakeTpCall
PyMethod_Self
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall

Failed to create an InferenceSession: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: private: static void __cdecl google::protobuf::FieldDescriptor::TypeOnceInit(class google::protobuf::FieldDescriptor const * __ptr64)
public: virtual unsigned char * __ptr64 __cdecl google::protobuf::internal::ZeroFieldsBase::_InternalSerialize(unsigned char * __ptr64,class google::protobuf::io::EpsCopyOutputStream * __ptr64)const __ptr64
__CxxFrameHandler4
(unknown)
RtlCaptureContext2
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
public: void __cdecl vaip_core::DpuSubgraphEntryProto::unsafe_arena_set_allocated_try_fuse(class vaip_core::TryFuseProto * __ptr64) __ptr64
(unknown)
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
PyInit_onnxruntime_pybind11_state
public: void __cdecl pybind11::error_already_set::discard_as_unraisable(class pybind11::object) __ptr64
PyCFunction_GetFlags
_PyObject_MakeTpCall
PyMethod_Self
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall
_PyOS_URandomNonblock
PyEval_GetFuncDesc
_PyEval_EvalFrameDefault
_PyEval_EvalFrameDefault
_PyFunction_Vectorcall

1.2.0 doesn't seem to need me to actively set it up 1.3.0 gets this error.