IREE's tooling is divided into two components: import and compilation.
These two stages can be completed entirely via the command line.
WORKDIR="/tmp/workdir" TFLITE_URL="https://storage.googleapis.com/iree-model-artifacts/tflite-integration-tests/posenet_i8.tflite" TFLITE_PATH=${WORKDIR}/model.tflite IMPORT_PATH=${WORKDIR}/tosa.mlir MODULE_PATH=${WORKDIR}/module.vmfb # Fetch the sample model wget ${TFLITE_URL} -O ${TFLITE_PATH} # Import the sample model to an IREE compatible form iree-import-tflite ${TFLITE_PATH} -o ${IMPORT_PATH} # Compile for the CPU backend iree-compile \ --iree-mlir-to-vm-bytecode-module \ --iree-input-type=tosa \ --iree-hal-target-backends=dylib-llvm-aot \ ${IMPORT_PATH} \ -o ${MODULE_PATH}