Torch Distributed Class Definitions

Hi,

I am trying to locate ReduceOp definitions, referred in the following comment in the source.

(I did search the git source and local installation both)

I couldn’t find the class definition. Am I missing something here?

ReduceOp is a C++ enum, and is exposed to the python interface using pybind (https://github.com/pytorch/pytorch/blob/master/torch/csrc/distributed/c10d/init.cpp#L145). That enum is defined here: https://github.com/pytorch/pytorch/blob/master/torch/lib/c10d/Types.hpp#L8

1 Like