[Triton] FA v3 API #606
This file contains hidden or 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: Triton Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
triton: | |
runs-on: aiter-mi325-1gpu | |
env: | |
DOCKER_IMAGE: "rocm/pytorch:latest" | |
TRITON_TEST: "op_tests/triton_tests/" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Clean up Rocm processes | |
run: | | |
./.github/scripts/clean_up_rocm.sh | |
- name: Run the container | |
run: | | |
set -ex | |
echo "Starting container: triton_test" | |
docker run -dt \ | |
--device=/dev/dri \ | |
--device=/dev/kfd \ | |
--shm-size=16G \ | |
--group-add $(getent group render | cut -d: -f3) \ | |
--group-add $(getent group video | cut -d: -f3) \ | |
-v "${{ github.workspace }}:/workspace" \ | |
-w /workspace \ | |
--name triton_test \ | |
${{ env.DOCKER_IMAGE }} | |
- name: Setup-Triton | |
run: | | |
set -ex | |
echo "Setuping Triton..." | |
docker exec \ | |
-w /workspace \ | |
triton_test \ | |
./.github/scripts/build_triton.sh | |
- name: Install Pytest | |
run: | | |
set -ex | |
echo "Installing Pytest..." | |
docker exec \ | |
-w /workspace \ | |
triton_test \ | |
pip install pytest | |
- name: Triton Tests | |
run: | | |
set -ex | |
echo "Running Triton Tests..." | |
docker exec -w /workspace triton_test mkdir -p test-reports | |
docker exec -w /workspace triton_test pytest -v ${{ env.TRITON_TEST }} --junitxml=test-reports/triton.xml | |
- name: Upload test logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: triton-test-logs | |
path: test-reports/triton.xml | |
- name: Cleanup container | |
if: always() | |
run: | | |
docker rm -f triton_test || true | |
- name: Clean up Rocm processes | |
if: always() | |
run: | | |
./.github/scripts/clean_up_rocm.sh |