From 661886d2487ae73b368b095b7761133250a03ae9 Mon Sep 17 00:00:00 2001 From: vmoens Date: Fri, 5 Jan 2024 11:10:41 +0000 Subject: [PATCH] non_blocking=True --- tensordict/memmap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensordict/memmap.py b/tensordict/memmap.py index 4f5496dba..79242479c 100644 --- a/tensordict/memmap.py +++ b/tensordict/memmap.py @@ -204,7 +204,7 @@ def from_tensor( if copy_data: if isinstance(input, DTensor): input = input.full_tensor() - out.copy_(input) + out.copy_(input, non_blocking=True) return out @property