mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
fix empty Tensor mmap
This commit is contained in:
parent
d6bc2642e7
commit
43eaa28b9f
1 changed files with 4 additions and 0 deletions
|
|
@ -393,6 +393,10 @@ class TestMultiprocessing(TestCase):
|
|||
param = Parameter(torch.arange(1, 26).view(5, 5))
|
||||
self._test_autograd_sharing(param)
|
||||
|
||||
def test_empty_shared(self):
|
||||
t = torch.Tensor()
|
||||
t.share_memory_()
|
||||
|
||||
def _test_is_shared(self):
|
||||
t = torch.randn(5, 5)
|
||||
self.assertFalse(t.is_shared())
|
||||
|
|
|
|||
Loading…
Reference in a new issue