Is it possible to store not only tensors, but also list of strings for example?

Yep. But the feature is only available on master (will be released in v1.7). See the following code:

  
      github.com
  
  
    pytorch/pytorch/blob/cb26661fe4faf26386703180a9045e6ac6d157df/test/test_multiprocessing.py#L580-L600 1

def test_event_multiprocess(self):
    event = torch.cuda.Event(enable_timing=False, interprocess=True)
    self.assertTrue(event.query())

    ctx = mp.get_context('spawn')
    p2c = ctx.SimpleQueue()
    c2p = ctx.SimpleQueue()
    p = ctx.Process(
        target=TestMultiprocessing._test_event_multiprocess_child,
        args=(event, p2c, c2p))
    p.start()

    c2p.get()  # wait for until child process is ready
    torch.cuda._sleep(50000000)  # spin for about 50 ms
    event.record()
    p2c.put(0)  # notify child event is recorded

    self.assertFalse(event.query())
    c2p.get()  # wait for synchronization in child
    self.assertTrue(event.query())
    p.join()



  
  
    
    
  
  


If you need it now, you can copy the code change in distributed_c10d.py from this PR 2. It basically is a wrapper that converts strings to tensors.