Error in PYNQ-DPU loading "xmodel"

Hi, I´m trying to upload the model compiled from train_mnist_classifier example. I am using PYNQ 2.6 , Vivado 2020.1 and PYNQ-DPU 1.2.
When I compile the model, I get a “.xmodel” file instead of “.elf”. Then, I uploaded the model and the “dpu.bit” files to the board, but when I try to run this code in Jupyter Notebook:

from pynq_dpu import DpuOverlay
overlay = DpuOverlay(“…/mymodel/dpu.bit”)
overlay.load_model(“…/mymodel/mnist_classifier.xmodel”)

appears this error:

RuntimeError Traceback (most recent call last)
in ()
1 from pynq_dpu import DpuOverlay
2 overlay = DpuOverlay(“…/mymodel/dpu.bit”)
----> 3 overlay.load_model(“…/mymodel/mnist_classifier_org.xmodel”)

/usr/local/lib/python3.6/dist-packages/pynq_dpu/dpu.py in load_model(self, model)
211
212 if not model.endswith(“.elf”):
→ 213 raise RuntimeError(“Currently only elf files can be loaded.”)
214 else:
215 if self.runtime == ‘dnndk’:

RuntimeError: Currently only elf files can be loaded.

Any suggestions?
Regards

1 Like

xmodel is for Vitis AI 1.3. Check the README here:
"
For the GPU accelerated docker image:

./docker_run.sh xilinx/vitis-ai:1.2.82
From version 1.3 .xmodel files are generated instead of .elf
"

1 Like

Is there any plan to support this soon? If not, is there a possible way of creating the .elf file based on vitis ai 1.3?

It is already supported in DPU-PYNQ v1.3.0

So s you mean I can natively generate the .elf file even for vitis ai 1.3 while using DPU PYNQ repo? what about the .xmodel files, are they supported by PYQN ?
As far as I know PYNQ 2.6 doesn’t support .xmodel file (I just update the dpu-pynq version of my ultra96v2) and I’m still not able to load them, because is not an elf file.

Sorry for the confusion, just for documenting, after upgrading my pynq version I had to update pynq-dpu to its latest version, after that I was able to load .xmodel files.

1 Like