Apparently it has been fixed in the nightly build a few days ago:

  
      github.com/pytorch/pytorch
  
  
    
  
    
  

  
    
      Fix persistent_workers + pin_memory (#48543) 63
    

    
      
        committed 
        
          
        
        Jan 8, 2021
      
      

      
        
          
          SsnL
        
        
      

      
        
          +17
          -12
        
      
    

  



  
    Summary:
Fixes https://github.com/pytorch/pytorch/issues/48370 https://github.com/pytorch/pytorch/issues/47445
cc emcastillo who authored the original functionality.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48543
Reviewed By: bdhirsh
Differential Revision: D25277474
Pulled By: ejguan
fbshipit-source-id: 1967002124fb0fff57caca8982bc7df359a059a2