How to enable GPU Kernel peer to peer access

In Torch by doing the following, one could enable GPU kernel peer to peer access.

require 'cutorch'

How can I do the same with PyTorch?

cudaDeviceEnablePeerAccess function is used to enable P2P access. An example of using this function is shown in But I would like to know if PyTorch provides any mechanisms to enable Kernel P2P access.

p2p is enabled in PyTorch (and cutorch) by default.

Thanks for your answer. I observed this behavior but I couldn’t find any information in the documentation.

Note that PyTorch enables P2P copies by default, but NOT P2P kernel access.

1 Like