- follow instructions from onnx-mlir-docker to setup
onnx-mlir-docker
- create parent folder
automation
in pathcontainerId:/workdir/
- create folder with name
onnx-mlir_files
, llvm-IR_files/raw etc etc (check ref-for-docker-folder-structure for list of all folders` - use torchhub links to get proper input for all models.
- Update
<model>.main.cpp
-> static float img_data[] = {<input data as 1D array>} [line 16] andshape[]
[line 18] - if required use Netron to get input and output dimensions. Update img_data and input img dimension
- run
cd auto_scripts
- run
./get_bin_abs.sh <filename>
to copy files from local to docker and generate llvm IR, asm and then exec bin - to regenerate only bin run
./get_bin_abs.sh <filename> bin
- this cmd will generate
filename.output.txt
file containing model output as 1D array.
TO-DO Use output array and get post processed image / data for all 4 models and comapre them.
run ./delete_all_files_con.sh
to delete all generated files from docker container and
run ./delete_all_files_host.sh
to delete all generated files from local