Is there a way to specify which device transport to use when initializing?

The situation is that our project is running on top of Gramine, which only supports a subset of all the syscalls.

When I try to run PyTorch on top of Gramine, an error occurred, which basically caused by the use of socket with domain “AF_NETLINK”. After investigation, I thought that it was caused by the use of RDMA in gloo::transport::ibverbs::Device.

The Gramine is a LibOS, and it does not support this domain socket.

At the same time, I notice that there are four different types of devices, namely:
gloo::transport::ibverbs::Device
gloo::transport::tcp::Device
gloo::transport::tcp::tls::Device
gloo::transport::uv::device

So is there a way to specify which device to use when running PyTorch with gloo backend?

I notice that PyTorch checks a environment variable called GLOO_DEVICE_TRANSPORT, is this the right way to specify which device to use in gloo?

@osalpekar I wonder if you have any suggestion? Thanks a lot!