File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ if [[ "${OS:-}" == "Windows_NT" ]]; then
1414 NVCC_EXTRA_FLAGS+=(-Xcompiler /Zc:preprocessor)
1515fi
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
2022ls -lah " ${SCRIPTPATH} /saxpy.o"
Original file line number Diff line number Diff line change @@ -189,15 +189,18 @@ def get_saxpy_object():
189189 obj_path = binaries_dir / "saxpy.o"
190190
191191 if not obj_path .is_file ():
192- if find_nvidia_binary_utility ("nvcc" ) is None :
192+ nvcc_path = find_nvidia_binary_utility ("nvcc" )
193+ if nvcc_path is None :
193194 pytest .skip (
194195 f"saxpy.o not found at { obj_path } and nvcc is unavailable. "
195196 "In CI this is downloaded from the build stage."
196197 )
198+ env = os .environ .copy ()
199+ env ["NVCC" ] = nvcc_path
197200 subprocess .run ( # noqa: S603
198201 ["bash" , str (binaries_dir / "build_test_binaries.sh" )], # noqa: S607
199202 check = True ,
200- env = os . environ ,
203+ env = env ,
201204 )
202205
203206 return obj_path .read_bytes ()
You can’t perform that action at this time.
0 commit comments