From d2b86c319b9cfa2083c851a7fa43a83062a02c3f Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Sat, 2 Nov 2024 21:48:10 +0000 Subject: [PATCH] Update [ghstack-poisoned] --- test/test_tensordict.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_tensordict.py b/test/test_tensordict.py index fcd1626e1..f84585777 100644 --- a/test/test_tensordict.py +++ b/test/test_tensordict.py @@ -6392,6 +6392,8 @@ def test_to_device_dtype_inplace(self, td_name, device): ) elif td_name in ("permute_td", "unsqueezed_td", "squeezed_td", "td_h5"): cm = pytest.raises(TypeError, match="Cannot use inplace=True with") + elif td_name in ("memmap_td",) and dest.type == "cpu": + cm = contextlib.nullcontext() elif td.is_locked: cm = pytest.raises(RuntimeError, match="Cannot modify locked TensorDict.") else: