Skip to content

Commit

Permalink
Define AxisRefsList as SmallVector<SmallVector<AxisRefAttr> and use it.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 689864870
  • Loading branch information
Google-ML-Automation authored and copybara-github committed Oct 25, 2024
1 parent e5d73bd commit c048282
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ UpdateTensorShardings AggressiveFactorPropagation::propagateFactorShardings(
}

// Find the compatible major axes ignoring conflicts.
SmallVector<SmallVector<AxisRefAttr>> axesPerFactor;
AxesPerFactor axesPerFactor;
axesPerFactor.reserve(factorSizes.size());
bool allElementsAreEmpty = true;
for (int64_t i = 0; i < factorSizes.size(); ++i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ limitations under the License.
namespace mlir {
namespace sdy {

using AxesPerFactor = SmallVector<SmallVector<AxisRefAttr>>;

// Returns true if the `oldAxes` is a strict prefix of `newAxes`,
bool shouldUpdate(ArrayRef<AxisRefAttr> oldAxes, ArrayRef<AxisRefAttr> newAxes);

Expand Down

0 comments on commit c048282

Please sign in to comment.