Xilinx / Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
https://www.xilinx.com/ai
Apache License 2.0
1.49k stars 634 forks source link

Could the pytorch model that compiled by Apache TVM run with KV260 and DPU? #721

Open youjunl opened 2 years ago

youjunl commented 2 years ago

Hi, all I tried to make a tvm model that compiled from pytorch run with DPU but it was not successful. And there is key error about "cpu-tf" as I running the deploy_lib_edge.so. It seems like a model framework problem. So I would ask if PyTorch models are supported on vitis-ai tvm api?

xilinx-k26-starterkit-2021_2:~/notebooks/compile-quartznet$ python3 test_tvm.py Traceback (most recent call last): File "test_tvm.py", line 13, in lib = tvm.runtime.load_module("deploy_lib_edge.so") File "/home/petalinux/tvm/python/tvm/runtime/module.py", line 552, in load_module return _ffi_api.ModuleLoadFromFile(path, fmt) File "tvm/_ffi/_cython/./packed_func.pxi", line 323, in tvm._ffi._cy3.core.PackedFuncBase.call File "tvm/_ffi/_cython/./packed_func.pxi", line 257, in tvm._ffi._cy3.core.FuncCall File "tvm/_ffi/_cython/./packed_func.pxi", line 246, in tvm._ffi._cy3.core.FuncCall3 File "tvm/_ffi/_cython/./base.pxi", line 163, in tvm._ffi._cy3.core.CALL KeyError: "KeyError: ('cpu-tf',)\nAt:\n /usr/lib/python3.8/site-packages/pyxir-0.3.1-py3.8-linux-aarch64.egg/pyxir/runtime/runtime_factory.py(60): build_runtime\n /usr/lib/python3.8/site-packages/pyxir-0.3.1-py3.8-linux-aarch64.egg/pyxir/base.py(343): build\n /usr/lib/python3.8/site-packages/pyxir-0.3.1-py3.8-linux-aarch64.egg/pyxir/base.py(489): build_online_quant_rt_opaque_func\n /usr/lib/python3.8/site-packages/pyxir-0.3.1-py3.8-linux-aarch64.egg/pyxir/opaque_func.py(113): opaque_func_wrapper\n /home/petalinux/tvm/python/tvm/runtime/module.py(552): load_module\n test_tvm.py(13): "

qianglin-xlnx commented 2 years ago

Hi @elliott-xilinx could you please help to check this issue? Thank you.