diff --git a/.github/workflows/amd_perf_kernel_tests.yml b/.github/workflows/amd_perf_kernel_tests.yml index 3befba900a1d..8b383e116d3f 100644 --- a/.github/workflows/amd_perf_kernel_tests.yml +++ b/.github/workflows/amd_perf_kernel_tests.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: pull_request: branches: [main_perf] - merge_group: - branches: [main_perf] - types: [checks_requested] + merge_group: + branches: [main_perf] + types: [checks_requested] push: branches: [main_perf] @@ -14,8 +14,7 @@ concurrency: group: ${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main_perf' }} -permissions: - read-all +permissions: read-all env: TRITON_BUILD_WITH_CLANG_LLD: "TRUE" @@ -24,25 +23,25 @@ env: jobs: Check-File-Changes: + if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - # - name: Check file changes - # run: | - # git fetch origin ${{ github.base_ref }} - # changed_files=$(git diff --name-only origin/${{ github.base_ref }} ${{ github.sha }}) - # echo "Changed files:" - # echo "$changed_files" - # if echo "$changed_files" | grep -v "^python/perf-kernels/"; then - # echo "Changes detected outside of the python/perf-kernels directory. Failing the workflow." - # exit 1 - # fi + - name: Check file changes + run: | + git fetch origin ${{ github.base_ref }} + changed_files=$(git diff --name-only origin/${{ github.base_ref }} ${{ github.sha }}) + echo "Changed files:" + echo "$changed_files" + if echo "$changed_files" | grep -v "^python/perf-kernels/"; then + echo "Changes detected outside of the python/perf-kernels directory. Failing the workflow." + exit 1 + fi Runner-Preparation-AMD: - needs: Check-File-Changes runs-on: ubuntu-latest timeout-minutes: 30 outputs: @@ -54,7 +53,7 @@ jobs: 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"]' + echo '::set-output name=matrix-HIP::[["ubuntu-latest"]]' fi Integration-Tests-AMD: @@ -94,4 +93,4 @@ jobs: pytest -vvv ./python/perf-kernels/flash-attention.py - name: Run Perf Kernels Benchmark run: | - python ./python/perf-kernels/flash-attention.py + python ./python/perf-kernels/flash-attention.py \ No newline at end of file