From e9bcb283a9b3ea821291d06d96c0d7d8a24161a3 Mon Sep 17 00:00:00 2001 From: Zayd Date: Mon, 19 Jan 2026 18:38:50 -0800 Subject: [PATCH 1/2] docs: clarify NumPy to tensor conversion semantics --- beginner_source/basics/tensorqs_tutorial.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beginner_source/basics/tensorqs_tutorial.py b/beginner_source/basics/tensorqs_tutorial.py index 30e05cb10d0..55d8b62f084 100644 --- a/beginner_source/basics/tensorqs_tutorial.py +++ b/beginner_source/basics/tensorqs_tutorial.py @@ -44,6 +44,8 @@ # Tensors can be created from NumPy arrays (and vice versa - see :ref:`bridge-to-np-label`). np_array = np.array(data) x_np = torch.from_numpy(np_array) +# Note: torch.from_numpy shares memory with the NumPy array when possible. If you want a copy, use torch.tensor(np_array). +# torch.as_tensor(np_array) also avoids a copy when possible. ############################################################### From adec755ea3406a7a747168e458d5d6b7b17db1ea Mon Sep 17 00:00:00 2001 From: Zayd Date: Tue, 20 Jan 2026 13:56:57 -0800 Subject: [PATCH 2/2] ci: add NVIDIA PyPI index for CUDA deps --- .ci/docker/common/install_pip_requirements.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/docker/common/install_pip_requirements.sh b/.ci/docker/common/install_pip_requirements.sh index a548d200462..acd02da24ab 100644 --- a/.ci/docker/common/install_pip_requirements.sh +++ b/.ci/docker/common/install_pip_requirements.sh @@ -4,4 +4,4 @@ set -ex # Install pip packages pip install --upgrade pip -pip install -r ./requirements.txt +pip install --extra-index-url https://pypi.nvidia.com -r ./requirements.txt