Skip to content

Commit dcc6a14

Browse files
authored
Merge branch 'main' into fix_663_b
2 parents 969a105 + 2780efd commit dcc6a14

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

cuda_core/tests/test_binaries/build_test_binaries.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ if [[ "${OS:-}" == "Windows_NT" ]]; then
1414
NVCC_EXTRA_FLAGS+=(-Xcompiler /Zc:preprocessor)
1515
fi
1616

17-
nvcc -dc "${NVCC_EXTRA_FLAGS[@]}" -arch=all-major \
17+
NVCC="${NVCC:-nvcc}"
18+
19+
"${NVCC}" -dc "${NVCC_EXTRA_FLAGS[@]}" -arch=all-major \
1820
-o "${SCRIPTPATH}/saxpy.o" "${SCRIPTPATH}/saxpy.cu"
1921

2022
if [[ "${OS:-}" == "Windows_NT" ]]; then

cuda_core/tests/test_module.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,18 @@ def _read_saxpy_rdc(kind: str) -> bytes:
193193
raise ValueError(f"unknown saxpy RDC kind: {kind!r}")
194194

195195
if not rdc_path.is_file():
196-
if find_nvidia_binary_utility("nvcc") is None:
196+
nvcc_path = find_nvidia_binary_utility("nvcc")
197+
if nvcc_path is None:
197198
pytest.skip(
198199
f"{rdc_path.name} not found at {rdc_path} and nvcc is unavailable. "
199200
"In CI this is downloaded from the build stage."
200201
)
202+
env = os.environ.copy()
203+
env["NVCC"] = nvcc_path
201204
subprocess.run( # noqa: S603
202205
["bash", str(binaries_dir / "build_test_binaries.sh")], # noqa: S607
203206
check=True,
204-
env=os.environ,
207+
env=env,
205208
)
206209
return rdc_path.read_bytes()
207210

0 commit comments

Comments
 (0)