smth:

import torch.multiprocessing as multiprocessing
multiprocessing.set_start_method(‘spawn’)


So this should work as-is?
#!/usr/bin/env python                                                                                                                                                                          

import torch
import torch.multiprocessing as multiprocessing

if torch.cuda.is_available():
    multiprocessing.set_start_method('spawn')

def create_one(batch_size):
    return torch.ByteTensor(batch_size, 128, 128)

pool = torch.multiprocessing.Pool(torch.multiprocessing.cpu_count())

data = pool.map(create_one, torch.LongTensor(1000).fill_(100))

Because it still does not:
  File "/home/fleuret/misc/anaconda3/lib/python3.5/multiprocessing/context.py", line 231, in set_start_method
    raise RuntimeError('context has already been set')
RuntimeError: context has already been set