Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of ryzen 1.3.0 errors #135

Open
Garbo1229 opened this issue Dec 3, 2024 · 4 comments
Open

Installation of ryzen 1.3.0 errors #135

Garbo1229 opened this issue Dec 3, 2024 · 4 comments
Assignees

Comments

@Garbo1229
Copy link

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
Copy link
Collaborator

cyndwith commented Dec 3, 2024

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
Copy link
Author

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.

@cyndwith
Copy link
Collaborator

cyndwith commented Dec 4, 2024

The quicktest.py is expect to set these automatically, based on the logs I see that it is setting up the 'XLNX_VART_FIRMWARE' and 'XLNX_VART_FIRMWARE' for the correct hardware.

While i'm not able to reproduce the error, here are a few more pointers that might help:

  • Ensure that the path specified for the xclbin file (C:\Program Files\RyzenAI\1.3.0\voe-4.0-win_amd64\xclbins\phoenix\1x4.xclbin) is correct and that the file exists at that location.

  • Check if you have the necessary permissions to access the xclbin file and the directories involved. Running the command prompt or terminal as an administrator might help resolve permission issues.

  • If you look into Device Manger -> Neural Processors -> NPU Computer Accelerate Device. Right click to properties to verify the NPU Driver Version: 32.0.203.237

@cyndwith cyndwith self-assigned this Dec 4, 2024
@Garbo1229
Copy link
Author

The quicktest.py is expect to set these automatically, based on the logs I see that it is setting up the 'XLNX_VART_FIRMWARE' and 'XLNX_VART_FIRMWARE' for the correct hardware.

While i'm not able to reproduce the error, here are a few more pointers that might help:

  • Ensure that the path specified for the xclbin file (C:\Program Files\RyzenAI\1.3.0\voe-4.0-win_amd64\xclbins\phoenix\1x4.xclbin) is correct and that the file exists at that location.
  • Check if you have the necessary permissions to access the xclbin file and the directories involved. Running the command prompt or terminal as an administrator might help resolve permission issues.
  • If you look into Device Manger -> Neural Processors -> NPU Computer Accelerate Device. Right click to properties to verify the NPU Driver Version: 32.0.203.237

image
image
image
I can make sure it's all correct, it's still an error, and I've tried running the command prompt as administrator but it still fails with an error report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants