Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 717094015
  • Loading branch information
Google-ML-Automation committed Jan 19, 2025
1 parent b21aaff commit 2c793ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ struct ClampWithBroadcastConvert : public OpRewritePattern<ClampOp> {

} // namespace

void setupMaterializeBroadcastsLegality(MLIRContext * /*context*/,
ConversionTarget *conversionTarget) {
static void setupMaterializeBroadcastsLegality(
MLIRContext * /*context*/, ConversionTarget *conversionTarget) {
conversionTarget->addDynamicallyLegalOp<ClampOp>([](ClampOp op) {
return op.getMax().getType() == op.getOperand().getType() &&
op.getMin().getType() == op.getOperand().getType();
});
}

void populateMaterializeBroadcastsPatterns(MLIRContext *context,
RewritePatternSet *patterns) {
static void populateMaterializeBroadcastsPatterns(MLIRContext *context,
RewritePatternSet *patterns) {
// ClampOp. This op has a special case where it accepts either same-shaped
// inputs or scalars (a restricted form of broadcasting). This makes the
// broadcast explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct TestMaterializeBroadcastsPass

} // namespace

std::unique_ptr<::mlir::Pass> createTestMaterializeBroadcastsPass() {
static std::unique_ptr<::mlir::Pass> createTestMaterializeBroadcastsPass() {
return std::make_unique<TestMaterializeBroadcastsPass>();
}

Expand Down

0 comments on commit 2c793ef

Please sign in to comment.