amd / ryzen-ai-documentation

Onboarding documentation source for the AMD Ryzen™ AI Software Platform. The AMD Ryzen™ AI Software Platform enables developers to take pretrained machine learning models in popular frameworks and run them on laptops powered by AMD Ryzen™ AI technology.
https://ryzenai.docs.amd.com/en/latest/
MIT License
46 stars 19 forks source link

UserWarning: Specified provider 'VitisAIExecutionProvider' is not in available provider names. #59

Closed blurSong closed 12 months ago

blurSong commented 1 year ago

I have tried to run the example\resnet50 on my 7840HS notebook. I followed this tutorial to install and check the voe environment. However, I have this ERROR MESS when trying to run

python predict.py --ep ipu

C:\Dev\miniconda3\envs\voe\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:65: UserWarning: Specified provider 'VitisAIExecutionProvider' is not in available provider names.Available providers: 'CPUExecutionProvider'

I thought it was the ort version problem. But I have no idea how to solve that.

(I didn't install VS2019, instead, I installed the VC++ 2015-2022 redistribution and I think this should not be wrong).

uday610 commented 1 year ago

Is it possible that you have installed a onnxruntimeat the end? As you see the step of installation onnxruntimehas to be installed before. Can you try installing Vitis AI EP wheel files again as below?

pip install voe-0.1.0-cp39-cp39-win_amd64.whl
pip install onnxruntime_vitisai-1.15.1-cp39-cp39-win_amd64.whl
python installer.py
blurSong commented 12 months ago

Works for me! Thanks! I think the problem is the order of the installation of Step https://ryzenai.docs.amd.com/en/latest/inst.html#install-vitis-ai-execution-provider is wrong.python installer.py should be the last step. Perhaps you should modify this section.

wingsfly commented 2 months ago

I've also met the same problem on ASUS Zenbook S 16, with HX 370 NPU. The RyzenAI software version is 1.2, with voe-1.2.0-cp310-cp310-win_amd64.whl and onnxruntime_vitisai-1.17.0-cp310-cp310-win_amd64.whl, the driver version is 32.0.201.204, after installation following with https://ryzenai.docs.amd.com/en/latest/inst.html, I tried python quicktest.py and got promt:

Setting environment for STX
XLNX_VART_FIRMWARE= C:\Program Files\RyzenAI\1.2.0\voe-4.0-win_amd64\xclbins\strix\AMD_AIE2P_Nx4_Overlay.xclbin
NUM_OF_DPU_RUNNERS= 1
XLNX_TARGET_NAME= AMD_AIE2_Nx4_Overlay
C:\Users\xxx\AppData\Roaming\Python\Python310\site-
packages\onnxruntime\capi\onnxruntime_inference_collection.py:69: UserWarning: Specified provider 
'VitisAIExecutionProvider' is not in available provider names.Available providers: 'TensorrtExecutionProvider, 
CUDAExecutionProvider, CPUExecutionProvider'
  warnings.warn(
Test Passed

Also i tried installing Vitis AI EP wheel files again as issued, and nothing changed.

wingsfly commented 2 months ago

I've also met the same problem on ASUS Zenbook S 16, with HX 370 NPU. The RyzenAI software version is 1.2, with voe-1.2.0-cp310-cp310-win_amd64.whl and onnxruntime_vitisai-1.17.0-cp310-cp310-win_amd64.whl, the driver version is 32.0.201.204, after installation following with https://ryzenai.docs.amd.com/en/latest/inst.html, I tried python quicktest.py and got promt:

Setting environment for STX
XLNX_VART_FIRMWARE= C:\Program Files\RyzenAI\1.2.0\voe-4.0-win_amd64\xclbins\strix\AMD_AIE2P_Nx4_Overlay.xclbin
NUM_OF_DPU_RUNNERS= 1
XLNX_TARGET_NAME= AMD_AIE2_Nx4_Overlay
C:\Users\xxx\AppData\Roaming\Python\Python310\site-
packages\onnxruntime\capi\onnxruntime_inference_collection.py:69: UserWarning: Specified provider 
'VitisAIExecutionProvider' is not in available provider names.Available providers: 'TensorrtExecutionProvider, 
CUDAExecutionProvider, CPUExecutionProvider'
  warnings.warn(
Test Passed

Also i tried installing Vitis AI EP wheel files again as issued, and nothing changed.

I found the problem, as the python path shown above, it use the python310 site-packages instead of my current conda env directory, while i copy all the onnxruntime dll to the python310 site-packages capi dir, it works. maybe i've used the wrong way to install python in the current conda env.

Got another problem, custom VitisAI Provider seems still not supported by c# onnxruntime library, any one knows how to use NPU under c# environment?