Skip to content

Commit 6c55541

Browse files
committed
CI: reduce CAPABILITY for pull_requests
1 parent 29aa6c1 commit 6c55541

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/python-package.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ jobs:
154154
155155
nvcc --version
156156
157+
- name: Select COMPUTE_CAPABILITY
158+
shell: bash -el {0}
159+
run: |
160+
# set COMPUTE_CAPABILITY
161+
COMPUTE_CAPABILITY="61;75;86;89"
162+
[[ "${{ env.GITHUB_REF }}" = refs/tags/* ]] && COMPUTE_CAPABILITY="50;52;60;61;62;70;72;75;80;86;87;89;90"
163+
echo "COMPUTE_CAPABILITY=$COMPUTE_CAPABILITY" >> "$GITHUB_ENV"
164+
157165
- name: Prep build
158166
if: startsWith(matrix.os, 'windows')
159167
run: python -m pip install cmake==3.27.9 ninja
@@ -166,7 +174,7 @@ jobs:
166174
-G Ninja ${{ env.DCMAKE_CUDA_COMPILER }} \
167175
${{ env.CXX_COMPILER }} \
168176
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
169-
-DCOMPUTE_CAPABILITY="50;52;60;61;62;70;72;75;80;86;87;89;90" \
177+
-DCOMPUTE_CAPABILITY="${{ env.COMPUTE_CAPABILITY }}" \
170178
-DCOMPUTE_BACKEND=cuda \
171179
-S .
172180
@@ -177,7 +185,7 @@ jobs:
177185
uses: addnab/docker-run-action@v3
178186
with:
179187
image: ${{ format('nvidia/cuda:{0}-{1}', matrix.cuda-version, 'devel-ubuntu22.04') }}
180-
options: --platform linux/${{ matrix.arch }} -w /src -v ${{ github.workspace }}:/src
188+
options: --platform linux/${{ matrix.arch }} -w /src -v ${{ github.workspace }}:/src -e "COMPUTE_CAPABILITY"
181189
run: |
182190
apt-get update
183191
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cmake python3 python3-pip
@@ -188,7 +196,7 @@ jobs:
188196
cmake -B build \
189197
-G Ninja \
190198
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
191-
-DCOMPUTE_CAPABILITY="50;52;60;61;62;70;72;75;80;86;87;89;90" \
199+
-DCOMPUTE_CAPABILITY="${{ env.COMPUTE_CAPABILITY }}" \
192200
-DCOMPUTE_BACKEND=cuda \
193201
-DNO_CUBLASLT=$NO_CUBLASLT \
194202
-S .

0 commit comments

Comments
 (0)