Vitis-AI: AssertionError: the memory allocation MUST BE DONE BETTER RESHAPE
I am attempting to compile a yolov4 model and it fails with the error in the title. Changes to the model were made according to the yolov4 tutorial. Quantization completed successfully. Compilation is being done for a U200 with DPUCADF8H, so the input_shape in the compile_yolov4.sh file was changed to ‘input_shape’:‘4,512,512,3’.
The following script was run and generates the associated error message:
TARGET=U200
NET_NAME=dpu_yolov4
ARCH=/opt/vitis_ai/compiler/arch/${DPU}/${TARGET}/arch.json
vai_c_tensorflow --frozen_pb ./eai_yolov4_quantized/quantize_eval_model.pb \
--arch ${ARCH} \
--output_dir ./yolov4_compiled/ \
--net_name ${NET_NAME} \
--options "{'mode':'normal','save_kernel':'', 'input_shape':'4,512,512,3'}"```
/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/SC/HwAbstraction/code_convreshape.py(296)gen_fm_par_fm()
-> assert tq is not None, " the memory allocation MUST BE DONE BETTER RESHAPE" + "\n" + str(FM)
(Pdb) continue
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): AssertionError: the memory allocation MUST BE DONE BETTER RESHAPE
Name FeatureMapBuffer Size 20971520
Banks [
Name 0 Layout 2 Unit 8-bits Frequency 300MHz Rows 8192 Column 128 dict_keys([])
Name 1 Layout 2 Unit 8-bits Frequency 300MHz Rows 8192 Column 128 dict_keys([])
Name 2 Layout 2 Unit 8-bits Frequency 300MHz Rows 4096 Column 128 dict_keys([])
]
Note that the following allocation that causes the error returns None
tq = FM.allocate(temporary) ## the memory allocation should account for this extra space in FM
I have tried this with vitis ai versions 1.4 and 2.0 with the same error. I’m not sure how to proceed, any help would be great.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 32 (3 by maintainers)
OK, let me take a look at the model.