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.5k stars 635 forks source link

Issues while quantizing and compiling HRNet based model #1478

Open MeltedHyperion07 opened 1 month ago

MeltedHyperion07 commented 1 month ago

Our team is trying to quantize and compile a landmark regression model based on HRNet for VCK190 DPU architecture.

We faced a couple of issues while quantizing during the process

1) 'NoneType' object has no attribute 'named_children' - For this we replaced the None values to nn.Identity as per this

2) Next was an image shape mismatch error in ConvTranspose2d due to output_padding not being supported. For that we tweaked the formula to get the correct image shape without affecting the model performance. We retrained the model on the changes. Other than minor pytorch warnings, the quantization works successfully and we are getting the quantized file.

For reference, these were the warnings being received while quantization testing: image image image

3) Now while trying to run the vai_c_xir (compiler) to compile it to xmodel, it gives an error

Screenshot from 2024-10-07 13-07-03

Here's the link to the current hrnet architecture and the quantization script being used.

Hardware - VCK190 / DPUCVDX8G Host System - Ubuntu 22.04 on NVIDIA RTX A5000 Software - Vitis AI 3.0

Can someone help me out with this @hanxue @eemars @quentonh @woinck