gloo
gloo copied to clipboard
No way to use a ReductionFunction in CUDAAllreduce?
I noticed that the constructor does not take a reduction function, and there's no way to set it.
https://github.com/facebookincubator/gloo/blob/master/gloo/cuda_allreduce_halving_doubling.h#L75
Is this intended?
This is not intentional; it has not been needed so far so nobody noticed it missing :)
I found this TODO that I added myself about this very problem.
Could you put up a pull request adding this to the allreduce builder? If you add the reduction type as optional argument to the CUDA algorithm constructors then it will be backwards compatible. Adding arguments to a constructor is not great, but with the builder being the preferred way of constructing them it is acceptable in my opinion.
We don't currently need it either, I probably won't submit a PR until we actually need this feature.