forked from triton-lang/triton
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18930eb
commit 850da66
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: AMD Perf Kernel Nightly Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' # This will run the job every day at midnight UTC | ||
push: | ||
branches: [main_perf] | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main_perf' }} | ||
|
||
permissions: read-all | ||
|
||
env: | ||
TRITON_BUILD_WITH_CLANG_LLD: "TRUE" | ||
TRITON_USE_ASSERT_ENABLED_LLVM: "TRUE" | ||
TRITON_DISABLE_LINE_INFO: 1 | ||
|
||
jobs: | ||
Runner-Preparation-AMD: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
outputs: | ||
matrix-HIP: ${{ steps.set-matrix.outputs.matrix-HIP }} | ||
steps: | ||
- name: Prepare runner matrix | ||
id: set-matrix | ||
run: | | ||
if [ x"${{ github.repository }}" == x"ROCm/triton" ]; then | ||
echo '::set-output name=matrix-HIP::[["self-hosted", "rocm.gfx90a"]]' | ||
else | ||
echo '::set-output name=matrix-HIP::[["ubuntu-latest"]]' | ||
fi | ||
Nightly-Tests-AMD: | ||
needs: Runner-Preparation-AMD | ||
if: needs.Runner-Preparation-AMD.outputs.matrix-HIP != '' | ||
runs-on: ${{ matrix.runner }} | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
runner: ${{fromJson(needs.Runner-Preparation-AMD.outputs.matrix-HIP)}} | ||
container: | ||
image: rocm/pytorch:rocm6.0.2_ubuntu22.04_py3.10_pytorch_2.1.2 | ||
options: --device=/dev/kfd --device=/dev/dri --security-opt seccomp=unconfined --group-add video --user root | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Clear cache | ||
run: | | ||
rm -rf ~/.triton | ||
mkdir -p ~/.triton | ||
ls -alh ~/.triton | ||
- name: Update PATH | ||
run: | | ||
echo "/opt/rocm/llvm/bin" >> $GITHUB_PATH | ||
- name: Install pip dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install lit matplotlib pandas | ||
- name: Install Triton | ||
run: | | ||
echo "PATH is '$PATH'" | ||
pip uninstall -y triton\ | ||
cd python | ||
pip install -v -e . | ||
- name: Run Perf Kernels Unit Tests | ||
run: | | ||
pytest -vvv ./python/perf-kernels/flash-attention.py | ||
- name: Run Perf Kernels Benchmark | ||
run: | | ||
python ./python/perf-kernels/flash-attention.py |