This repository provides a bash script that automates the process of compiling and packaging individual inference test suites for various Xilinx Evaluation Kits (e.g., ZCU104, ZCU102, VCK190, etc.).
When following the manual scripts from the Xilinx Vitis-AI Tutorials for PyTorch ResNet18, the default process often fails to generate a complete and self-contained archive. In particular:
- The required test images and compiled
.xmodelfiles are not correctly packaged together. - As a result, transferring and running inference tests on a target board becomes cumbersome and error-prone.
This script automates the entire compilation and packaging process, ensuring that each evaluation kit receives its own self-contained .tar archive. Each archive includes everything required to run inference immediately.
- Multi-Kit Compilation: Supports compilation for multiple Xilinx evaluation kits in one go.
- Automatic Archiving: Creates
.tararchives for each supported board. - Dependency Bundling: Includes compiled models, test scripts, and test images.
- Clean & Portable: Transfer just one archive file to your board — no need to clone or copy large repositories.
- A Linux host machine with the Xilinx Vitis-AI development environment properly installed and sourced.
- Necessary source models and files available for compilation.
Clone this repository:
git clone https://github.com/xp4t/vai_pt_archiver.git
cd vai_pt_archiverMake the script executable:
chmod +x compile.sh
cp compile.sh ~/Vitis-AI/Tutorials/PyTorch-ResNet18/files/ #this should be your working directoryRun the script in Vitis-AI Docker Container:
bash -x ./compile.shAfter completion, find your archives inside the build/ directory:
build/
├── target_zcu104.tar
├── target_zcu102.tar
├── target_vck190.tar
├── target_vek280.tar
├── target_vck5000.tar
└── target_v70.tar
Identify and copy the archive corresponding to your board. Example for ZCU104:
scp target_zcu104.tar root@[YOUR_BOARD_IP]:~/Log in to your board via SSH (OPTIONAL):
ssh root@[YOUR_BOARD_IP]Unpack the archive:
tar -xvf target_zcu104.tar
cd target_zcu104Run the included inference test script:
bash -x ./run_all_target.sh zcu104 #change to your board name- ZCU104
- ZCU102
- VCK190
- VEK280
- VCK5000
- V70
Contributions are welcome! Fork this repository, make improvements, and submit a pull request.
This project is licensed under the MIT License — simple and permissive for utility scripts.