vit_qaicandresnet_qaicfolder contains example showing an end-to-end workflow for running inference on QAIC100 using the python APIs.qaic_featuresfolder consists of examples to show how to perform benchmarking, profiling and measuring metrics for inferences made on the device.
Steps to install qaic API:
pip install /opt/qti-aic/dev/lib/x86_64/qaic-0.0.1-py3-none-any.whl
pip install -r requirements.txt
Examples follow this pattern:
- Get the model from open source. (HuggingFace for example)
- Convert the model to onnx using onnx library.
- Call generate_bin function converts onnx to qpc (binary for the device). a. Currently it is compiled for default arguments, can be replaced with best performance compile arguments) #FIXME
- Creating
qaic.sessionwith appropriate input and output names. - Provide sample prepossessing steps. Build input_dict for the session.
- Call session.run() to perform inference.
- Provide sample postprocessing steps. reshape output from the session.
python example.py