Skip to content

Commit

Permalink
Reverts e07a6e3
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 724716446
  • Loading branch information
Google-ML-Automation committed Feb 8, 2025
1 parent 8bac4a2 commit 74f10af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xla/service/layout_assignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2427,9 +2427,8 @@ absl::Status LayoutAssignment::RunOnComputation(
// parameter layout constraints).
TF_RETURN_IF_ERROR(AddMandatoryConstraints(channel_constraints, constraints));

// Add any backend-specific constraints.
TF_RETURN_IF_ERROR(AddBackendConstraints(constraints));

// Custom call constraints should be propagated with more priority and
// carefully than mandatory constraints but not more that backend constraints.
for (HloInstruction* instruction :
constraints->computation()->MakeInstructionPostOrder()) {
if (!IsLayoutConstrainedCustomCall(instruction)) {
Expand Down Expand Up @@ -2457,6 +2456,9 @@ absl::Status LayoutAssignment::RunOnComputation(
}
}

// Add any backend-specific constraints.
TF_RETURN_IF_ERROR(AddBackendConstraints(constraints));

// Propagates layouts from mandatory and backend constraints.
TF_RETURN_IF_ERROR(PropagateConstraints(constraints));

Expand Down

0 comments on commit 74f10af

Please sign in to comment.