Skip to content

Commit 1c297f7

Browse files
anmyachevpbchekin
andauthored
Run inductor tests on PRs if needed (#4385)
Signed-off-by: Anatoly Myachev <[email protected]> Co-authored-by: Pavel Chekin <[email protected]>
1 parent 20df7e7 commit 1c297f7

File tree

1 file changed

+43
-18
lines changed

1 file changed

+43
-18
lines changed

.github/workflows/inductor-tests.yml

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,7 @@ on:
1111
suite:
1212
description: Space separated lists of test suites or "all"
1313
type: string
14-
default: >-
15-
inductor/test_kernel_benchmark.py
16-
inductor/test_codegen_triton.py
17-
inductor/test_triton_extension_backend.py
18-
inductor/test_triton_heuristics.py
19-
inductor/test_triton_wrapper.py
20-
inductor/test_triton_kernels.py
21-
inductor/test_gpu_cpp_wrapper.py
22-
inductor/test_aot_inductor.py
23-
inductor/test_select_algorithm.py
24-
# FIXME: enable them later
25-
# inductor/test_max_autotune.py
26-
# inductor/test_compile_subprocess.py
14+
default: ""
2715
runner_label:
2816
description: Runner label, keep empty for default
2917
type: string
@@ -41,15 +29,52 @@ on:
4129
type: string
4230
default: "PyTorch inductor tests on Linux"
4331

32+
pull_request:
33+
branches:
34+
- main
35+
paths:
36+
- .github/pins/pytorch.txt
37+
- .github/workflows/inductor-tests.yml
38+
4439
permissions: read-all
4540

41+
env:
42+
DEFAULT_SUITE: >-
43+
inductor/test_kernel_benchmark.py
44+
inductor/test_codegen_triton.py
45+
inductor/test_triton_extension_backend.py
46+
inductor/test_triton_heuristics.py
47+
inductor/test_triton_wrapper.py
48+
inductor/test_triton_kernels.py
49+
inductor/test_gpu_cpp_wrapper.py
50+
inductor/test_aot_inductor.py
51+
inductor/test_select_algorithm.py
52+
# FIXME: enable them later
53+
# inductor/test_max_autotune.py
54+
# inductor/test_compile_subprocess.py
55+
4656
jobs:
57+
compute-params:
58+
runs-on: linux
59+
outputs:
60+
suite: ${{ steps.set_suite.outputs.suite }}
61+
steps:
62+
- id: set_suite
63+
run: |
64+
SUITE="${{ inputs.suite }}"
65+
if [ -z "${SUITE}" ]; then
66+
echo "Using default suite"
67+
SUITE="${DEFAULT_SUITE}"
68+
fi
69+
echo "suite=${SUITE}" >> "$GITHUB_OUTPUT"
70+
4771
run_tests:
4872
name: Run inductor tests
73+
needs: compute-params
4974
uses: ./.github/workflows/inductor-tests-reusable.yml
5075
with:
51-
pytorch_repo: ${{ inputs.pytorch_repo }}
52-
python_version: ${{ inputs.python_version }}
53-
runner_label: ${{ inputs.runner_label }}
54-
suite: ${{ inputs.suite }}
55-
pytorch_ref: ${{ inputs.pytorch_ref }}
76+
pytorch_repo: ${{ inputs.pytorch_repo || 'pytorch/pytorch' }}
77+
python_version: ${{ inputs.python_version || '3.9' }}
78+
runner_label: ${{ inputs.runner_label || '' }}
79+
suite: ${{ needs.compute-params.outputs.suite }}
80+
pytorch_ref: ${{ inputs.pytorch_ref || '' }}

0 commit comments

Comments
 (0)