Skip to content

Commit 05516c6

Browse files
metascroymalfet
authored andcommitted
Add dtype runner aoti (#552)
* add dtype tests for runner-aoti + runner-et * typo * add dtype test runner-aoti
1 parent 2e5eed1 commit 05516c6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/pull.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
echo "::group::Install newer objcopy that supports --set-section-alignment"
204204
yum install -y devtoolset-10-binutils
205205
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
206-
echo "::endgroup::"
206+
echo "::endgroup::"
207207
208208
echo "::group::Install required packages"
209209
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
@@ -244,7 +244,7 @@ jobs:
244244
echo "::group::Install newer objcopy that supports --set-section-alignment"
245245
yum install -y devtoolset-10-binutils
246246
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
247-
echo "::endgroup::"
247+
echo "::endgroup::"
248248
249249
echo "::group::Install required packages"
250250
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
@@ -291,7 +291,7 @@ jobs:
291291
echo "::group::Install newer objcopy that supports --set-section-alignment"
292292
yum install -y devtoolset-10-binutils
293293
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
294-
echo "::endgroup::"
294+
echo "::endgroup::"
295295
296296
echo "::group::Install required packages"
297297
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
@@ -441,7 +441,7 @@ jobs:
441441
export MODEL_PATH=checkpoints/stories15M/stories15M.pt
442442
export MODEL_NAME=stories15M
443443
export MODEL_DIR=/tmp
444-
444+
445445
echo "******************************************"
446446
echo "*** vanilla ***"
447447
echo "******************************************"
@@ -909,9 +909,11 @@ jobs:
909909
910910
python torchchat.py generate --checkpoint-path ${MODEL_DIR}/stories15M.pt --temperature 0 --prompt "${PROMPT}"
911911
912-
python torchchat.py export --checkpoint-path ${MODEL_DIR}/stories15M.pt --output-dso-path /tmp/model.so
913-
914-
./cmake-out/aoti_run /tmp/model.so -z ${MODEL_DIR}/tokenizer.bin -i "${PROMPT}"
912+
for dtype in fp32 fp16 bf16; do
913+
echo "Running export + runner with dtype=$dtype"
914+
python torchchat.py export --checkpoint-path ${MODEL_DIR}/stories15M.pt --dtype $dtype --output-dso-path /tmp/model.so
915+
./cmake-out/aoti_run /tmp/model.so -z ${MODEL_DIR}/tokenizer.bin -i "${PROMPT}"
916+
done
915917
916918
echo "Tests complete."
917919

0 commit comments

Comments
 (0)