1
- name : Run runner- aoti CUDA tests
1
+ name : Run the aoti runner with CUDA using stories
2
2
3
3
on :
4
4
pull_request :
8
8
workflow_dispatch :
9
9
10
10
jobs :
11
- test-cuda :
11
+ test-runner-aot- cuda :
12
12
uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
13
13
with :
14
14
runner : linux.g5.4xlarge.nvidia.gpu
15
+ secrets-env : " HF_TOKEN_PERIODIC"
15
16
gpu-arch-type : cuda
16
17
gpu-arch-version : " 12.1"
18
+ timeout : 60
17
19
script : |
18
20
echo "::group::Print machine info"
19
21
uname -a
29
31
# Install requirements
30
32
31
33
./install_requirements.sh cuda
34
+ bash scripts/build_native.sh aoti
32
35
pip3 list
33
36
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
34
37
echo "::endgroup::"
@@ -46,30 +49,11 @@ jobs:
46
49
export MODEL_NAME=stories15M
47
50
export MODEL_DIR=/tmp
48
51
49
- - name : Install dependencies
50
- run : |
51
- ./install_requirements.sh
52
- pip3 list
53
- python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
54
- bash scripts/build_native.sh aoti
52
+ set -eou pipefail
53
+ export MODEL_DIR=${PWD}/checkpoints/stories15M
54
+ export PROMPT="Once upon a time in a land far away"
55
55
56
- - name : Download checkpoint
57
- run : |
58
- mkdir -p checkpoints/stories15M
59
- pushd checkpoints/stories15M
60
- wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.pt
61
- wget https://github.com/karpathy/llama2.c/raw/master/tokenizer.model
62
- wget https://github.com/karpathy/llama2.c/raw/master/tokenizer.bin
63
- popd
64
- - name : Run inference
65
- run : |
66
- set -eou pipefail
67
-
68
-
69
- export MODEL_DIR=${PWD}/checkpoints/stories15M
70
- export PROMPT="Once upon a time in a land far away"
71
-
72
- for DTYPE in bfloat16; do
56
+ for DTYPE in bfloat16; do
73
57
python torchchat.py generate --dtype ${DTYPE} --checkpoint-path ${MODEL_DIR}/stories15M.pt --temperature 0 --prompt "${PROMPT}" --device cuda
74
58
75
59
python torchchat.py export --checkpoint-path ${MODEL_DIR}/stories15M.pt --output-dso-path /tmp/model.so
87
71
python generate.py --dtype ${DTYPE} --device cuda --checkpoint-path ${MODEL_PATH} --temperature 0 --dso-path ${MODEL_DIR}/${MODEL_NAME}.so > ./output_aoti
88
72
cat ./output_aoti
89
73
90
- done
74
+ done
91
75
92
- echo "tests complete"
93
- echo "******************************************"
94
- echo "::endgroup::"
76
+ echo "tests complete"
77
+ echo "******************************************"
78
+ echo "::endgroup::"
0 commit comments