TorchBench Nightly #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TorchBench Nightly | |
on: | |
workflow_dispatch: | |
env: | |
TRITON_USE_ASSERT_ENABLED_LLVM: "TRUE" | |
jobs: | |
TorchBench-Nvidia: | |
runs-on: [self-hosted, A100] | |
steps: | |
- name: Clear cache | |
run: | | |
rm -rf ${HOME}/.triton | |
rm -rf ${HOME}/torchbench | |
- name: Checkout TorchBench | |
uses: actions/checkout@v4 | |
with: | |
repository: 'pytorch/benchmark' | |
ref: '7617d3f53f8ae8db938cda80173926968c7f0d4b' | |
path: 'torchbench' | |
submodules: 'recursive' | |
- name: Create Python venv | |
run: | | |
python3 -m venv ${HOME}/torchbench/venv | |
source ${HOME}/torchbench/venv/bin/activate | |
echo PATH=${PATH} >> $GITHUB_ENV | |
# Torch nightly version below must match TorchBench commit above | |
- name: Install TorchBench and models | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install doctr fastnlp lightning-utilities matplotlib numba pyre_extensions | |
python3 -m pip install --upgrade torchaudio==2.2.0.dev20231017 torch==2.2.0.dev20231017 torchrec==0.5.0.dev20231017 torchvision==0.17.0.dev20231017 --index-url https://download.pytorch.org/whl/nightly/cu121 | |
cd torchbench | |
python3 install.py -v BERT_pytorch | |
- name: Tune Nvidia GPU | |
run: | | |
sudo nvidia-smi -pm 1 | |
sudo nvidia-smi --lock-gpu-clocks=1280,1280 | |
nvidia-smi | |
- name: Run TorchBench | |
run: | | |
cd torchbench | |
python3 run_benchmark.py dynamo --performance --inference | |
- name: Install the latest Triton wheel | |
run: | | |
python3 -m pip uninstall --yes pytorch-triton | |
python3 -m pip install --upgrade triton-nightly --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ | |
- name: Run TorchBench Again | |
run: | | |
cd torchbench | |
python3 run_benchmark.py dynamo --performance --inference | |
- name: Cleanup and reset GPU clocks | |
if: always() | |
run: | | |
sudo nvidia-smi -i 0 -rgc |