File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Flash Attention Benchmark
2+
3+ # To remotely trigger a FA Benchmarking run, use the following:
4+ # curl -XPOST -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/pytorch/pytorch-integration-testing/dispatches --data '{"event_type": "benchmark_flash_attention"}'
5+
6+ on :
7+ schedule :
8+ - cron : " 0 */2 * * *" # Run every 2 hours
9+ push :
10+ paths :
11+ - .github/workflows/flash_attention.yml
12+ repository_dispatch :
13+ types : benchmark_flash_attention
14+ workflow_dispatch :
15+ jobs :
16+ benchmark-flash-attn :
17+ name : Flash Attention CuTe DSL Benchmark
18+ runs-on : B200
19+ container :
20+ # https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch/
21+ image : nvcr.io/nvidia/pytorch:25.06-py3
22+ options : --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864
23+ steps :
24+ - name : Buid and Run FlashAttention CuTe DSL
25+ run : |
26+ set -x
27+ export CUDA_VISIBLE_DEVICES=0
28+ echo "Installing nvidia-cutlass-dsl"
29+ pip install nvidia-cutlass-dsl==4.1.0.dev0
30+ echo "Installing Flash Attention"
31+ rm -fr fa4
32+ git clone https://github.com/Dao-AILab/flash-attention.git fa4
33+ pushd fa4
34+ pwd
35+ git log -1
36+ python setup.py install
37+ export PYTHONPATH=$(pwd)
38+
39+ echo '<h1>B200 1000W</h1>' >> $GITHUB_STEP_SUMMARY
40+ nvidia-smi
41+ python benchmarks/benchmark_attn.py >> $GITHUB_STEP_SUMMARY
42+
43+ popd
44+ rm -fr fa4
You can’t perform that action at this time.
0 commit comments