Add custom distributed backend

Hi everyone,
I would like to know how to add a custom Torch distributed backend.
I added the C++ sources next to the already existing ones (ProcessGroupMPI.cpp and others), but they do not seem to be automatically included (I guess in the TORCH_SRCS cmake variable via a file(GLOB ...) mechanism).
Can someone suggest where I am being wrong?

EDIT: basically the issue is that CMake is not able to see that I added some .cpp sources to the tree, but it correctly added the target link dependency.

Found it, had to add an entry in build_variables.bzl.

Hi, I was looking for a guide on how to implement a custom backend for Torch distributed and I found your post here. Would you mind sharing the resources you used to implement the backend? Thanks