@@ -242,22 +242,15 @@ jobs:
242242 submodules : true
243243
244244 - name : Set up Python
245- uses : . /.github/actions/setup-hardened-python
245+ uses : $ /.github/actions/setup-hardened-python
246246 with :
247247 python-version : ${{ env.PY_VER }}
248248 venv : .venv
249+ stack-reserve : 8388608
249250
250251 - name : Set up MSVC
251252 uses : step-security/msvc-dev-cmd@22c98154b708dbd743e6f27a933cf6ceba3305c4 # v1.13.1
252253
253- - name : Raise the interpreter's stack reserve to 8 MiB
254- # Importing the coverage-built cuda.bindings.driver overflows the
255- # 2,000,000-byte main-thread stack of python-build-standalone (#3330).
256- run : |
257- base_py="$(.venv/Scripts/python -c 'import sys; print(sys._base_executable)')"
258- editbin -nologo -stack:8388608 "$base_py"
259- dumpbin -nologo -headers "$base_py" | grep -i "size of stack reserve"
260-
261254 - name : Set up mini CTK
262255 uses : ./.github/actions/fetch_ctk
263256 continue-on-error : false
@@ -381,10 +374,11 @@ jobs:
381374 nvidia-smi
382375
383376 - name : Set up Python
384- uses : . /.github/actions/setup-hardened-python
377+ uses : $ /.github/actions/setup-hardened-python
385378 with :
386379 python-version : ${{ env.PY_VER }}
387380 venv : .venv
381+ stack-reserve : 8388608
388382
389383 - name : Set up mini CTK
390384 uses : ./.github/actions/fetch_ctk
@@ -435,22 +429,22 @@ jobs:
435429 cd "${{ steps.install-root.outputs.INSTALL_ROOT }}"
436430 "$GITHUB_WORKSPACE/.venv/Scripts/pytest" -v --cov=./cuda --cov-append --cov-context=test --cov-config="$GITHUB_WORKSPACE/.coveragerc" "$GITHUB_WORKSPACE/cuda_pathfinder/tests"
437431
438- # Cython linetrace under coverage on Windows needs more stack than the
439- # default 1 MB thread size. The helper runs pytest on an 8 MB thread.
440- - name : Run cuda.bindings tests (with 8MB stack)
432+ # The patched interpreter provides the larger stack on the main thread
433+ # and in child interpreters. Deferred cleanup needs pytest on the main thread.
434+ - name : Run cuda.bindings tests
441435 continue-on-error : true
442436 run : |
443- "$GITHUB_WORKSPACE/.venv/Scripts/python" "$GITHUB_WORKSPACE/ci/tools/run_pytest_with_stack.py" \
444- --cwd "${{ steps.install-root.outputs.INSTALL_ROOT }}" \
437+ cd "${{ steps.install-root.outputs.INSTALL_ROOT }}"
438+ "$GITHUB_WORKSPACE/.venv/Scripts/python" -m pytest \
445439 -v --cov=./cuda --cov-append --cov-context=test \
446440 --cov-config="$GITHUB_WORKSPACE/.coveragerc" \
447441 "$GITHUB_WORKSPACE/cuda_bindings_13/tests"
448442
449- - name : Run cuda.core tests (with 8MB stack)
443+ - name : Run cuda.core tests
450444 continue-on-error : true
451445 run : |
452- "$GITHUB_WORKSPACE/.venv/Scripts/python" "$GITHUB_WORKSPACE/ci/tools/run_pytest_with_stack.py" \
453- --cwd "${{ steps.install-root.outputs.INSTALL_ROOT }}" \
446+ cd "${{ steps.install-root.outputs.INSTALL_ROOT }}"
447+ "$GITHUB_WORKSPACE/.venv/Scripts/python" -m pytest \
454448 -v --cov=./cuda --cov-append --cov-context=test \
455449 --cov-config="$GITHUB_WORKSPACE/.coveragerc" \
456450 "$GITHUB_WORKSPACE/cuda_core/tests"
0 commit comments