Xilinx/pyxir

tvm partition_for_vitis_ai of TFLite model: "Value Error: Could not add xlayer with name..."

robertzak133 opened this issue · 0 comments

I’ve made a tflite version of EfficientDet-Lite{0,1,2} following tutorial at RetrainEfficientDet Model Maker tf2

I then follow Compile TFLite Models to load the model

And finally Vitis AI Integration – tvm to compile the model for the Xilinx KV-260.

I have everything working up until the “partition_for_vitis_ai()” function call in Vitis AI Integration – tvm. Although I have verified that this works for the mxnet model and tflite models used in the tvm examples. All of my EfficientDet-Lite models (0, 1, 2) compile and run with target = 'llvm'. None-the-less, when I specify DPU_TARGET and attempt to partition for vitis ai, I get the following error:

>>mod = partition_for_vitis_ai(mod, params, dpu=dpu_target)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-30-36b2c4f557b5> in <module>
:
:
  File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/pyxir-0.3.3-py3.6-linux-x86_64.egg/pyxir/graph/xgraph.py", line 185, in add
    self._xgraph.add(X._get_xlayer())
ValueError: Could not add xlayer with name: nn_max_pool2d_NHWC-NCHW-94770022471280as the layer already exists.
Any suggestions on what this error means, or how it might be fixed?
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-30-36b2c4f557b5> in <module>
:
:
  File "/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/pyxir-0.3.3-py3.6-linux-x86_64.egg/pyxir/graph/xgraph.py", line 185, in add
    self._xgraph.add(X._get_xlayer())
ValueError: Could not add xlayer with name: nn_max_pool2d_NHWC-NCHW-94770022471280as the layer already exists.

pyxir.__version = '0.3.3'
Any suggestions on what this error means, or how it might be fixed?