Skip to content

Commit 62a2509

Browse files
authored
Use one-less cores in preset workflows (#11073)
### Summary must go faster ![image](https://github.com/user-attachments/assets/218b6500-6276-4c34-95ca-3cf52c8a6f2b) ### Test plan CI cc @larryliu0820
1 parent 52d7778 commit 62a2509

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build-presets.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
runner: macos-latest-xlarge
2828
python-version: 3.12
2929
submodules: recursive
30-
timeout: 900
30+
timeout: 90
3131
script: |
3232
set -eux
3333
${CONDA_RUN} ./install_requirements.sh > /dev/null
3434
${CONDA_RUN} cmake --preset ${{ matrix.preset }}
35-
${CONDA_RUN} cmake --build cmake-out -j16
35+
${CONDA_RUN} cmake --build cmake-out -j$(( $(sysctl -n hw.ncpu) - 1 ))
3636
3737
linux:
3838
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
@@ -65,4 +65,4 @@ jobs:
6565
6666
./install_requirements.sh > /dev/null
6767
cmake --preset ${{ matrix.preset }}
68-
cmake --build cmake-out --parallel
68+
cmake --build cmake-out -j$(( $(nproc) - 1 ))

0 commit comments

Comments
 (0)