Skip to content

Commit 17ecf4b

Browse files
authored
Merge branch 'main' into shared-pointer
2 parents 7a76f2f + 38b3a8d commit 17ecf4b

File tree

5 files changed

+39
-41
lines changed

5 files changed

+39
-41
lines changed

.github/workflows/build-wheel.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,24 @@ jobs:
4444
with:
4545
fetch-depth: 0
4646

47-
# The env vars ACTIONS_CACHE_SERVICE_V2, ACTIONS_RESULTS_URL, and ACTIONS_RUNTIME_TOKEN
48-
# are exposed by this action.
49-
- name: Enable sccache
47+
- name: Install latest rapidsai/sccache
5048
if: ${{ startsWith(inputs.host-platform, 'linux') }}
51-
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
49+
run: |
50+
curl -fsSL "https://github.com/rapidsai/sccache/releases/latest/download/sccache-$(uname -m)-unknown-linux-musl.tar.gz" \
51+
| sudo tar -C /usr/local/bin -xvzf - --wildcards --strip-components=1 -x '*/sccache'
52+
echo "SCCACHE_PATH=/usr/local/bin/sccache" >> "$GITHUB_ENV"
53+
echo "SCCACHE_GHA_USE_PREPROCESSOR_CACHE_MODE=true" >> "$GITHUB_ENV"
5254
5355
# xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
5456
- name: Adding addtional GHA cache-related env vars
55-
uses: actions/github-script@v7
57+
uses: actions/github-script@v8
5658
with:
5759
script: |
58-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
59-
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
60+
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
61+
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'] || '');
62+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
63+
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'] || '');
64+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
6065
6166
- name: Setup proxy cache
6267
uses: nv-gha-runners/setup-proxy-cache@main
@@ -104,11 +109,10 @@ jobs:
104109
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
105110
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
106111
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
107-
SCCACHE_DIR=/host/${{ env.SCCACHE_DIR }}
108-
SCCACHE_CACHE_SIZE=${{ env.SCCACHE_CACHE_SIZE }}
112+
SCCACHE_GHA_USE_PREPROCESSOR_CACHE_MODE=${{ env.SCCACHE_GHA_USE_PREPROCESSOR_CACHE_MODE }}
109113
# check cache stats before leaving cibuildwheel
110114
CIBW_BEFORE_TEST_LINUX: >
111-
"/host/${{ env.SCCACHE_PATH }}" --show-stats
115+
"/host/${{ env.SCCACHE_PATH }}" --show-adv-stats
112116
# force the test stage to be run (so that before-test is not skipped)
113117
# TODO: we might want to think twice on adding this, it does a lot of
114118
# things before reaching this command.
@@ -154,19 +158,24 @@ jobs:
154158
with:
155159
fetch-depth: 0
156160

157-
# The env vars ACTIONS_CACHE_SERVICE_V2, ACTIONS_RESULTS_URL, and ACTIONS_RUNTIME_TOKEN
158-
# are exposed by this action.
159-
- name: Enable sccache
161+
- name: Install latest rapidsai/sccache
160162
if: ${{ startsWith(inputs.host-platform, 'linux') }}
161-
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
163+
run: |
164+
curl -fsSL "https://github.com/rapidsai/sccache/releases/latest/download/sccache-$(uname -m)-unknown-linux-musl.tar.gz" \
165+
| sudo tar -C /usr/local/bin -xvzf - --wildcards --strip-components=1 -x '*/sccache'
166+
echo "SCCACHE_PATH=/usr/local/bin/sccache" >> "$GITHUB_ENV"
167+
echo "SCCACHE_GHA_USE_PREPROCESSOR_CACHE_MODE=true" >> "$GITHUB_ENV"
162168
163169
# xref: https://github.com/orgs/community/discussions/42856#discussioncomment-7678867
164170
- name: Adding addtional GHA cache-related env vars
165-
uses: actions/github-script@v7
171+
uses: actions/github-script@v8
166172
with:
167173
script: |
168-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
169-
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
174+
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', 'on');
175+
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'] || '');
176+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
177+
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'] || '');
178+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
170179
171180
- name: Setup proxy cache
172181
uses: nv-gha-runners/setup-proxy-cache@main
@@ -227,8 +236,8 @@ jobs:
227236
run: |
228237
pushd testing
229238
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
230-
PATH=$(dirname ${SCCACHE_PATH}):${PATH}
231-
SCCACHE_GHA_ENABLED=true
239+
export PATH=$(dirname ${SCCACHE_PATH}):${PATH}
240+
export SCCACHE_GHA_ENABLED=true
232241
fi
233242
234243
nvcc --version
@@ -247,6 +256,10 @@ jobs:
247256
done
248257
popd
249258
259+
if [[ "${{ inputs.host-platform }}" == linux* ]]; then
260+
"${SCCACHE_PATH}" --show-adv-stats
261+
fi
262+
250263
- name: Upload numba-cuda test artifacts
251264
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
252265
with:

ci/tools/env-vars

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ if [[ "${1}" == "build" ]]; then
3636
# here we only need to specify the python version we want
3737
echo "CIBW_BUILD=cp${PYTHON_VERSION_FORMATTED}-*" >> $GITHUB_ENV
3838
NUMBA_CUDA_ARTIFACT_BASENAME="numba-cuda-python${PYTHON_VERSION_FORMATTED}-${HOST_PLATFORM}"
39-
# Enforce an explicit cache dir so that we can reuse this path later
40-
echo "SCCACHE_DIR=${HOME}/.cache/sccache" >> $GITHUB_ENV
41-
echo "SCCACHE_CACHE_SIZE=1G" >> $GITHUB_ENV
4239
elif [[ "${1}" == "test" ]]; then
4340
TEST_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${CUDA_VER})"
4441
TEST_CUDA_MINOR="$(cut -d '.' -f 2 <<< ${CUDA_VER})"

numba_cuda/numba/cuda/core/config.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,6 @@ def avx_default():
494494
"NUMBA_CUDA_PER_THREAD_DEFAULT_STREAM", int, 0
495495
)
496496

497-
CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY = _readenv(
498-
"NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY", int, 0
499-
)
500-
501497
# Location of the CUDA include files
502498
if IS_WIN32:
503499
cuda_path = os.environ.get("CUDA_PATH")

numba_cuda/numba/cuda/testing.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,6 @@ def skip_if_curand_kernel_missing(fn):
276276
return unittest.skipUnless(curand_kernel_h_file, reason)(fn)
277277

278278

279-
def skip_if_mvc_enabled(reason):
280-
"""Skip a test if Minor Version Compatibility is enabled"""
281-
assert isinstance(reason, str)
282-
return unittest.skipIf(
283-
config.CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY, reason
284-
)
285-
286-
287279
def cc_X_or_above(major, minor):
288280
if not config.ENABLE_CUDASIM:
289281
cc = devices.get_context().device.compute_capability

testing/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ MULTI_FATBIN_GENCODE := $(MULTI_GENCODE) -gencode arch=compute_$(ALT_CC),code=[s
3131
# LTO-IR tests need to generate for the LTO "architecture" instead
3232
LTOIR_GENCODE := -gencode arch=lto_$(GPU_CC),code=lto_$(GPU_CC)
3333

34-
# In CI we use sccache. Note that sccache does not support generating fatbin or ltoir.
34+
# In CI we use sccache
3535
ifeq ($(shell command -v sccache 2>&1 >/dev/null; echo $$?),0)
3636
SCCACHE := sccache
3737
else
@@ -62,10 +62,10 @@ $(OUTPUT_DIR)/test_device_functions.cubin: test_device_functions.cu
6262
$(SCCACHE) nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ $<
6363

6464
$(OUTPUT_DIR)/test_device_functions.fatbin: test_device_functions.cu
65-
nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ $<
65+
$(SCCACHE) nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ $<
6666

6767
$(OUTPUT_DIR)/test_device_functions_multi.fatbin: test_device_functions.cu
68-
nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ $<
68+
$(SCCACHE) nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ $<
6969

7070
$(OUTPUT_DIR)/test_device_functions.ptx: test_device_functions.cu
7171
$(SCCACHE) nvcc $(NVCC_FLAGS) $(PTX_FLAGS) -o $@ $<
@@ -77,7 +77,7 @@ $(OUTPUT_DIR)/test_device_functions.a: test_device_functions.cu
7777
nvcc $(NVCC_FLAGS) $(LIBRARY_FLAGS) -o $@ $<
7878

7979
$(OUTPUT_DIR)/test_device_functions.ltoir.o: test_device_functions.cu
80-
nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ $<
80+
$(SCCACHE) nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ $<
8181

8282
$(OUTPUT_DIR)/test_device_functions.ltoir: test_device_functions.cu
8383
# Generate LTO-IR in a "raw" LTO-IR container
@@ -96,10 +96,10 @@ $(OUTPUT_DIR)/nrt_extern.cubin: nrt_extern.cu
9696
$(SCCACHE) nvcc $(NVCC_FLAGS) $(CUBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
9797

9898
$(OUTPUT_DIR)/nrt_extern.fatbin: nrt_extern.cu
99-
nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
99+
$(SCCACHE) nvcc $(NVCC_FLAGS) $(FATBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
100100

101101
$(OUTPUT_DIR)/nrt_extern_multi.fatbin: nrt_extern.cu
102-
nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
102+
$(SCCACHE) nvcc $(NVCC_FLAGS) $(MULTI_FATBIN_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
103103

104104
$(OUTPUT_DIR)/nrt_extern.ptx: nrt_extern.cu
105105
$(SCCACHE) nvcc $(NVCC_FLAGS) $(PTX_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
@@ -111,7 +111,7 @@ $(OUTPUT_DIR)/nrt_extern.a: nrt_extern.cu
111111
nvcc $(NVCC_FLAGS) $(LIBRARY_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
112112

113113
$(OUTPUT_DIR)/nrt_extern.ltoir.o: nrt_extern.cu
114-
nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
114+
$(SCCACHE) nvcc $(NVCC_FLAGS) $(LTOIR_FLAGS) -o $@ $< -I$(NRT_INCLUDE_DIR)
115115

116116
$(OUTPUT_DIR)/nrt_extern.ltoir: nrt_extern.cu
117117
python generate_raw_ltoir.py --arch sm_$(GPU_CC) -o $@ $< --nrt

0 commit comments

Comments
 (0)