pytorch/test/cpp/aoti_inference
Mu-Chu Lee d3d1a78774 [AOTInductor] Add standalone test for compilation from ExportedProgram (#142327)
Summary: Provide a standalone path to compile and run a ExportedProgram in C.

Test Plan:
(1) Generate a compiled model from ExportedProgram
```
python generate_lowered_cpu.py --input-path /tmp/$USER/ep.pt --output-path /tmp/$USER/final.pt
```
(2) Compile a standalone test runner
```
TORCH_ROOT_DIR=/data/users/$USER/pytorch sh standalone_compile.sh standalone_test.cpp standalone_test.out
```
(3) Run test for the compiled model in step (1)
```
LD_LIBRARY_PATH=/data/users/$USER/pytorch/build/lib ./standalone_test.out /tmp/$USER/final.pt
```

Differential Revision: D66872380

Pull Request resolved: https://github.com/pytorch/pytorch/pull/142327
Approved by: https://github.com/hl475
2024-12-10 06:50:09 +00:00
..
aoti_custom_class.cpp [AOTI] Fix #140546 and support AOTI package load for Intel GPU. (#140664) 2024-12-10 05:05:08 +00:00
aoti_custom_class.h
CMakeLists.txt
compile_model.py
generate_lowered_cpu.py [AOTInductor] Add standalone test for compilation from ExportedProgram (#142327) 2024-12-10 06:50:09 +00:00
standalone_compile.sh [AOTInductor] Add standalone test for compilation from ExportedProgram (#142327) 2024-12-10 06:50:09 +00:00
standalone_test.cpp [AOTInductor] Add standalone test for compilation from ExportedProgram (#142327) 2024-12-10 06:50:09 +00:00
test.cpp [AOTI] Update C++ runner API to take a const vector (#139955) 2024-11-08 16:59:10 +00:00
test.py