Skip to content

TorchBench Nightly

TorchBench Nightly #30

Workflow file for this run

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
# python3 -m pip install doctr fastnlp matplotlib numba
- name: Install TorchBench and models
run: |
sudo apt-get install libpango-1.0-0
python3 -m pip install --upgrade pip
python3 -m pip install lightning-utilities 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
- 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 --inductor --devices=cuda --output-directory ./ --timing --stats 2>&1 | tee dynamo_log_pytorch-triton.txt
- 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 --inductor --devices=cuda --output-directory ./ --timing --stats 2>&1 | tee dynamo_log_triton-nightly.txt
- name: Cleanup and reset GPU clocks
if: always()
run: |
sudo nvidia-smi -i 0 -rgc