gloo icon indicating copy to clipboard operation
gloo copied to clipboard

No way to use a ReductionFunction in CUDAAllreduce?

Open ebetica opened this issue 6 years ago • 2 comments

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?

ebetica avatar Mar 27 '18 16:03 ebetica

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.

pietern avatar Apr 02 '18 21:04 pietern

We don't currently need it either, I probably won't submit a PR until we actually need this feature.

ebetica avatar Apr 04 '18 18:04 ebetica