AttributeError: module 'torch.cuda' has no attribute '_UntypedStorage'

I haven’t found this issue anywhere else yet – I’m running pytorch3D (0.3.0), which requires pytorch (1.12.1). No issues running the same script for a different dataset. With the more extensive dataset, I receive the AttributeError in the subject header and RuntimeError: Pin memory threat exited unexpectedly after 8 iterations. The latter error is associated with the pytorch dataloader, but all suggested solutions say to update to pytorch >= 1.7, which I have. I’m wondering if my cuda setup is problematic?

Edit: running the same script with the less extensive dataset also produces the AttributeError in the subject. However, the error is not fatal.

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/site-packages/torch/utils/data/_utils/pin_memory.py", line 28, in _pin_memory_loop
    r = in_queue.get(timeout=MP_STATUS_CHECK_INTERVAL)
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/multiprocessing/queues.py", line 116, in get
    return _ForkingPickler.loads(res)
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 303, in rebuild_storage_fd
    shared_cache[fd_id(fd)] = StorageWeakRef(storage)
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 65, in __setitem__
    self.free_dead_references()
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 70, in free_dead_references
    if storage_ref.expired():
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/site-packages/torch/multiprocessing/reductions.py", line 35, in expired
    return torch.Storage._expired(self.cdata)  # type: ignore[attr-defined]
  File "/home/domattioli/miniconda3/envs/anerf/lib/python3.8/site-packages/torch/storage.py", line 757, in _expired
    return eval(cls.__module__)._UntypedStorage._expired(*args, **kwargs)
AttributeError: module 'torch.cuda' has no attribute '_UntypedStorage'

NVIDIA doesn’t develop, maintain, or support pytorch. You might want to ask pytorch questions on a pytorch forum.

If you are wondering whether you have a proper CUDA setup, that question belongs on the CUDA setup forum, and the verification steps are provided in the CUDA linux install guide.

Makes sense, thanks

NVIDIA most definitely does have a PyTorch team, but the PyTorch forums are still a great place to ask questions. As the PyTorch forum member with the most posts manages the PyTorch Core team @ NVIDIA.

On date 27/ 08/ 2022:

I got this error when working with Pytorch 1.12, but the error eliminated with Pytorch 1.10

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.