Seems like the “correct” way to subclass this class would have been to inherit from torch.multiprocessing.pool.Pool - but that’s not an option, since pool isn’t exposed in torch’s __init__.py.
So now I’m really stuck…
BTW - I did notice that torch is registering it’s reduction functions on ForkingPickler already during import torch, even if I don’t use torch’s Pool class by rather python’s usual multiprocessing.pool.Pool class.
What will happen if I’ll subclass python’s Pool directly? Would I still be able to efficiently share tensors between processes (using memory sharing, not serialization)?