pip install virtualenv
virtualenv -p /usr/bin/python3.9 ModelCompilerEnv
source ModelCompilerEnv/bin/activate
pip install tensorflow
pip install gin-config
python -m pip install \
iree-compiler-snapshot \
iree-runtime-snapshot \
iree-tools-tf-snapshot \
iree-tools-tflite-snapshot \
iree-tools-xla-snapshot \
--find-links https://github.com/google/iree/releases
git clone https://github.com/raikonenfnu/ModelCompiler
cd ModelCompiler
git submodule update --init --recursive
cd ModelCompiler
export PYTHONPATH=$PYTHONPATH:$PWD/third_party/tf_models
cd nlp_gen
python bert_small_gen.py # should generate it to /tmp/model.mlir