Skip to content

Commit 942d76c

Browse files
metascroymalfet
authored andcommitted
add dtype tests for runner-aoti + runner-et (#539)
* add dtype tests for runner-aoti + runner-et * typo
1 parent 1fb03a8 commit 942d76c

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/pull.yml

Lines changed: 15 additions & 8 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 "******************************************"
@@ -858,8 +858,12 @@ jobs:
858858
859859
python torchchat.py generate stories15M --temperature 0 --prompt "${PRMT}"
860860
861-
python torchchat.py export stories15M --output-pte-path ./model.pte
862-
./cmake-out/et_run ./model.pte -z ./tokenizer.bin -t 0 -i "${PRMT}"
861+
862+
for dtype in fp32 fp16 bf16; do
863+
echo "Testing export + runner with dtype=$dtype"
864+
python torchchat.py export stories15M --dtype $dtype --output-pte-path ./model.pte
865+
./cmake-out/et_run ./model.pte -z ./tokenizer.bin -t 0 -i "${PRMT}"
866+
done
863867
864868
echo "Tests complete."
865869
runner-aoti:
@@ -909,9 +913,12 @@ jobs:
909913
910914
python torchchat.py generate --checkpoint-path ${MODEL_DIR}/stories15M.pt --temperature 0 --prompt "${PROMPT}"
911915
912-
python torchchat.py export --checkpoint-path ${MODEL_DIR}/stories15M.pt --output-dso-path /tmp/model.so
913916
914-
./cmake-out/aoti_run /tmp/model.so -z ${MODEL_DIR}/tokenizer.bin -i "${PROMPT}"
917+
for dtype in fp32 fp16 bf16; do
918+
echo "Running export + runner with dtype=$dtype"
919+
python torchchat.py export --checkpoint-path ${MODEL_DIR}/stories15M.pt --dtype $dtype --output-dso-path /tmp/model.so
920+
./cmake-out/aoti_run /tmp/model.so -z ${MODEL_DIR}/tokenizer.bin -i "${PROMPT}"
921+
done
915922
916923
echo "Tests complete."
917924

0 commit comments

Comments
 (0)