Skip to content

Commit cbecf26

Browse files
authored
Run triton-benchmarks on PRs with changes to benchmarks and the workflow (#2413)
Fixes #2412.
1 parent 62c07a7 commit cbecf26

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/triton-benchmarks.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ on:
2121
default: PYTORCH_LEGACY_PROFILER_USING_IPEX
2222
schedule:
2323
- cron: "5 23 * * *"
24+
pull_request:
25+
branches:
26+
- main
27+
paths:
28+
- .github/workflows/triton-benchmarks.yml
29+
- benchmarks/**
2430

2531
permissions: read-all
2632

2733
env:
2834
PYTHON_VERSION: "3.10"
29-
BENCHMARKING_METHOD: ${{ github.event_name == 'schedule' && 'PYTORCH_LEGACY_PROFILER_USING_IPEX' || inputs.benchmarking_method }}
30-
USE_IPEX: ${{ github.event_name == 'schedule' && '1' || inputs.benchmarking_method == 'PYTORCH_LEGACY_PROFILER_USING_IPEX' && '1' || '0' }}
35+
BENCHMARKING_METHOD: ${{ inputs.benchmarking_method || 'PYTORCH_LEGACY_PROFILER_USING_IPEX' }}
36+
USE_IPEX: ${{ github.event_name != 'workflow_dispatch' && '1' || inputs.benchmarking_method == 'PYTORCH_LEGACY_PROFILER_USING_IPEX' && '1' || '0' }}
3137

3238
jobs:
3339
build:

0 commit comments

Comments
 (0)