Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed compilation on Windows. #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ UpdateTensorShardings AggressiveFactorPropagation::propagateFactorShardings(
ArrayRef<int64_t> factorSizes, MeshAttr mesh, Operation* op,
bool conservativePropagation) const {
UpdateTensorShardings result{
.updateOperands = BitVector(projection.getNumOperands()),
.updateResults = BitVector(projection.getNumResults())};
/* .updateOperands = */ BitVector(projection.getNumOperands()),
/* .updateResults = */ BitVector(projection.getNumResults())};
if (direction == PropagationDirection::NONE) {
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ UpdateTensorShardings BasicFactorPropagation::propagateFactorShardings(
ArrayRef<int64_t> factorSizes, MeshAttr mesh, Operation* op,
bool conservativePropagation) const {
UpdateTensorShardings result{
.updateOperands = BitVector(projection.getNumOperands()),
.updateResults = BitVector(projection.getNumResults())};
/* .updateOperands = */ BitVector(projection.getNumOperands()),
/* .updateResults = */ BitVector(projection.getNumResults())};

// We propagate each factor separately.
for (auto [factorIndex, factorSize] : llvm::enumerate(factorSizes)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ LogicalResult BasicPropagationPassImpl::propagate(
// convergence), since we make sure ops whose sharding changes are
// added back to the worklist.
GreedyRewriteConfig config{
.useTopDownTraversal = true,
.enableRegionSimplification = mlir::GreedySimplifyRegionLevel::Disabled};
/* .useTopDownTraversal = */ true,
/* .enableRegionSimplification = */ mlir::GreedySimplifyRegionLevel::Disabled};
if (failed(applyPatternsAndFoldGreedily(moduleOp, std::move(patterns),
config))) {
return failure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ TensorShardingAttr TensorFactorShardings::createTensorShardingAttr(

UpdateShardings ShardingProjection::updateSharding(
int64_t factorIndex, ArrayRef<AxisRefAttr> newAxes) {
UpdateShardings result{.updateOperands = BitVector(getNumOperands()),
.updateResults = BitVector(getNumResults())};
UpdateShardings result{/* .updateOperands = */ BitVector(getNumOperands()),
/* .updateResults = */ BitVector(getNumResults())};
for (auto [i, tensor] : llvm::enumerate(operands)) {
result.updateOperands[i] = tensor.updateShardingAxes(factorIndex, newAxes);
}
Expand Down Expand Up @@ -188,8 +188,8 @@ std::optional<AxisRefInfo> getAxisRefInfo(ArrayRef<AxisRefAttr> axes,
AxisRefAttr axisRef = axes[axisIndex];
SubAxisInfoAttr splitInfo = axisRef.getSubAxisInfo();
return AxisRefInfo{
.size = axisRef.getSize(mesh),
.splitPreSize = splitInfo ? std::make_optional(splitInfo.getPreSize())
/* .size = */ axisRef.getSize(mesh),
/* .splitPreSize = */ splitInfo ? std::make_optional(splitInfo.getPreSize())
: std::nullopt};
}

Expand Down