TorchBench Nightly #24
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 numba | |
python3 -m pip install --upgrade torch==2.2.0.dev20231017 torchvision==0.17.0.dev20231017 torchaudio==2.2.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.py BERT_pytorch -d cuda -t train --torchdynamo inductor | |
- 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.py BERT_pytorch -d cuda -t train --torchdynamo inductor | |
- name: Cleanup and reset GPU clocks | |
if: always() | |
run: | | |
sudo nvidia-smi -i 0 -rgc |