Skip to content

Commit cbf79a3

Browse files
committed
Fix default value for pytorch_mode
1 parent 1734448 commit cbf79a3

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/actions/setup-pytorch/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ runs:
9393
with:
9494
repository: ${{ env.PYTORCH_REPO }}
9595
ref: ${{ env.PYTORCH_COMMIT_ID }}
96-
submodules: recursive
96+
# To build PyTorch from source we need all submodules, they are not required for benchmarks
97+
submodules: ${{ inputs.mode == 'source' && 'recursive' || 'false' }}
9798
path: pytorch
9899

99100
- name: Apply additional PR patches

.github/workflows/build-test-gpu.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ on:
1414
default: ""
1515
pytorch_mode:
1616
description: PyTorch mode, source or wheels
17-
type: string
18-
default: "source"
17+
type: choice
18+
options:
19+
- source
20+
- wheels
21+
default: source
1922
upload_test_reports:
2023
description: Upload test reports
2124
type: boolean
@@ -50,7 +53,7 @@ jobs:
5053
device: ${{ inputs.runner_label }}
5154
runner_label: ${{ inputs.runner_label }}
5255
pytorch_ref: ${{ inputs.pytorch_ref }}
53-
pytorch_mode: ${{ inputs.pytorch_mode }}
56+
pytorch_mode: ${{ inputs.pytorch_mode || 'source' }}
5457
python_version: ${{ matrix.python }}
5558
upload_test_reports: ${{ inputs.upload_test_reports }}
5659
ignore_errors: ${{ inputs.ignore_errors }}

.github/workflows/build-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ on:
1414
default: ""
1515
pytorch_mode:
1616
description: PyTorch mode, source or wheels
17-
type: string
18-
default: "source"
17+
type: choice
18+
options:
19+
- source
20+
- wheels
21+
default: source
1922
upload_test_reports:
2023
description: Upload test reports
2124
type: boolean
@@ -124,7 +127,7 @@ jobs:
124127
driver_version: ${{ matrix.driver }}
125128
runner_label: ${{ inputs.runner_label }}
126129
pytorch_ref: ${{ inputs.pytorch_ref }}
127-
pytorch_mode: ${{ inputs.pytorch_mode }}
130+
pytorch_mode: ${{ inputs.pytorch_mode || 'source' }}
128131
python_version: ${{ matrix.python }}
129132
upload_test_reports: ${{ inputs.upload_test_reports || false }}
130133
ignore_errors: ${{ inputs.ignore_errors || false }}

0 commit comments

Comments
 (0)