File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ cdef int _cuPythonInit() except -1 nogil:
519519 cdef char libPath[260]
520520
521521 with gil, __symbol_lock:
522- usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
522+ usePTDS = bool(int( os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)) )
523523
524524 # Load library
525525 libPath[0] = 0
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ cdef int _cudaPythonInit() except -1 nogil:
1515 global __usePTDS
1616
1717 with gil:
18- __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False )
18+ __usePTDS = bool(int( os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)) )
1919 __cudaPythonInit = True
2020 return __usePTDS
2121
Original file line number Diff line number Diff line change 1+ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+ .. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3+
4+ .. module :: cuda.bindings
5+
6+ ``cuda-bindings `` 13.2.1 Release notes
7+ ======================================
8+
9+ Bugfixes
10+ --------
11+
12+ * Per-thread default stream mode would be used whenever the
13+ ``CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM `` environment variable was set,
14+ even if it was set to ``0 ``.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
44# SPDX-License-Identifier: Apache-2.0
55
66set -euo pipefail
@@ -133,7 +133,7 @@ status_from_rc() {
133133run_pytest () {
134134 # Run pytest safely under set -e and return its exit code
135135 set +e
136- python -m pytest " ${PYTEST_FLAGS[@]} " " $@ "
136+ CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM=0 python -m pytest " ${PYTEST_FLAGS[@]} " " $@ "
137137 local rc=$?
138138 set -e
139139 return ${rc}
You can’t perform that action at this time.
0 commit comments