CUDA unknown runtime error

My code includes the following:

from torch.multiprocessing import set_start_method

from torch.multiprocessing import Pool
input_length = len(input_hashes)
with Pool(2) as worker_pool:
    embedding_loss = sum(worker_pool.starmap(
        zip(input_hashes, input_embeddings, [ngram_embeddings] * input_length,
            [latest_words] * input_length)))

Before the end of the first epoch, I get the following error:

Exception in thread Thread-19521:
Traceback (most recent call last):
  File "/usr/lib/python3.6/", line 916, in _bootstrap_inner
  File "/usr/lib/python3.6/", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/multiprocessing/", line 463, in _handle_results
    task = get()
  File "/usr/lib/python3.6/multiprocessing/", line 251, in recv
    return _ForkingPickler.loads(buf.getbuffer())
  File "/home/plvaudry/virtualenvs/aml/lib/python3.6/site-packages/torch/multiprocessing/", line 96, in rebuild_storage_cuda
    storage = cls._new_shared_cuda(device, handle, size, offset, view_size)
RuntimeError: cuda runtime error (30) : unknown error at /pytorch/torch/csrc/generic/StorageSharing.cpp:304