diff --git a/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm.cc b/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm.cc index f2ad3562a9f3f..35e818ff8ef4f 100644 --- a/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm.cc +++ b/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm.cc @@ -362,13 +362,13 @@ class UnfuseBatchNormTrainingPattern // In combination with marking such ops as illegal, this allows backends that // do not have special support for fused batchnorm to use simpler arithmetic // primitives. -void populateUnfuseBatchNormInferencePattern(MLIRContext *context, - RewritePatternSet *patterns) { +static void populateUnfuseBatchNormInferencePattern( + MLIRContext *context, RewritePatternSet *patterns) { patterns->add(context); } -void populateUnfuseBatchNormTrainingPattern(MLIRContext *context, - RewritePatternSet *patterns) { +static void populateUnfuseBatchNormTrainingPattern( + MLIRContext *context, RewritePatternSet *patterns) { patterns->add(context); } diff --git a/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm_pass.cc b/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm_pass.cc index 285f056008da7..5bb8a7b36fade 100644 --- a/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm_pass.cc +++ b/xla/mlir_hlo/mhlo/transforms/unfuse_batch_norm/unfuse_batch_norm_pass.cc @@ -51,7 +51,7 @@ struct TestUnfuseBatchNormPass } // namespace -std::unique_ptr<::mlir::Pass> createTestUnfuseBatchNormPass() { +static std::unique_ptr<::mlir::Pass> createTestUnfuseBatchNormPass() { return std::make_unique(); }