Add CI tests for AOT Compile (#65441)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65441
Adding CI test to verify a simple linear model can compile fine.
Successful run from CI logs:
```
+ test_aot_model_compiler
+ echo 'Testing AOT model compiler'
Testing AOT model compiler
+ source test/mobile/nnc/test_aot_compile.sh
+++ python -c 'import site; print(site.getsitepackages()[0])'
++ TORCH_INSTALL_DIR=/opt/conda/lib/python3.6/site-packages/torch
++ TORCH_BIN_DIR=/opt/conda/lib/python3.6/site-packages/torch/bin
+++ dirname test/mobile/nnc/test_aot_compile.sh
++ CURRENT_DIR=test/mobile/nnc
++ MODEL=aot_test_model.pt
++ COMPILED_MODEL=aot_test_model.compiled.pt
++ COMPILED_CODE=aot_test_model.compiled.ll
++ test_aot_model_compiler
++ python test/mobile/nnc/aot_test_model.py
++ exit_code=0
++ [[ 0 != 0 ]]
++ /opt/conda/lib/python3.6/site-packages/torch/bin/test_aot_model_compiler --model aot_test_model.pt --model_name=aot_test_model --model_version=v1 --input_dims=2,2,2
The compiled model was saved to aot_test_model.compiled.pt
++ success=1
++ '[' '!' -f aot_test_model.compiled.pt ']'
++ '[' '!' -f aot_test_model.compiled.ll ']'
++ '[' -f aot_test_model.compiled.ll ']'
++ rm aot_test_model.compiled.ll
++ '[' -f aot_test_model.compiled.pt ']'
++ rm aot_test_model.compiled.pt
++ rm aot_test_model.pt
++ '[' 1 = 0 ']'
+ [[ linux-xenial-py3.6-gcc5.4-default == pytorch-linux-xenial-py3* ]]
+ assert_git_not_dirty
+ [[ linux-xenial-py3.6-gcc5.4-default != *rocm* ]]
+ [[ linux-xenial-py3.6-gcc5.4-default != *xla* ]]
++ git status --porcelain
+ git_status=
+ [[ -n '' ]]
+ test_custom_script_ops
```
Test Plan: Imported from OSS
Reviewed By: ljk53
Differential Revision: D31348169
Pulled By: priyaramani
fbshipit-source-id: dd5c55859dfa07d150e5decc2dd7e56f43e7f66b