This PR introduces some common convenience helper functions for DeviceMesh include size, at, etc. so that we rely less on accessing the underlying vector of DeviceIdxType. There are still a few places in csrc/multidevice/lower_communications.cpp that access the vector directly.
Eventually, these helper functions will be parameterized by the axis of the DeviceMesh.
This PR introduces some common convenience helper functions for DeviceMesh include
size
,at
, etc. so that we rely less on accessing the underlying vector of DeviceIdxType. There are still a few places incsrc/multidevice/lower_communications.cpp
that access the vector directly.Eventually, these helper functions will be parameterized by the axis of the DeviceMesh.