From 0894d7dea60b65f2c92b855a3a41c7f8c34ce5c2 Mon Sep 17 00:00:00 2001 From: Kevin Gleason Date: Fri, 27 Sep 2024 13:12:39 -0700 Subject: [PATCH] Fix windows only build failure on include filename. Between eliding third_party directory names in includes, and Windows being case insensitive on header include paths, the following include was ambiguous and resolved to (1), leading to issues in using the StableHLO header: ``` #include "stablehlo/transforms/Passes.h" // (1) tensorflow/compiler/mlir/lite/stablehlo/transforms/passes.h // (2) @stablehlo - third_party/stablehlo/stablehlo/transforms/Passes.h ``` PiperOrigin-RevId: 679703637 --- xla/mlir_hlo/BUILD | 1 - .../stablehlo_ext/transforms/passes.h | 6 ---- ...tablehlo_create_compatibility_expander.cpp | 35 ------------------- 3 files changed, 42 deletions(-) delete mode 100644 xla/mlir_hlo/stablehlo_ext/transforms/stablehlo_create_compatibility_expander.cpp diff --git a/xla/mlir_hlo/BUILD b/xla/mlir_hlo/BUILD index 30eb4a8fccf14..8b8f59da1a7cb 100644 --- a/xla/mlir_hlo/BUILD +++ b/xla/mlir_hlo/BUILD @@ -1147,7 +1147,6 @@ cc_library( srcs = [ "stablehlo_ext/transforms/chlo_recompose_ops.cpp", "stablehlo_ext/transforms/stablehlo_canonicalize_dynamism.cpp", - "stablehlo_ext/transforms/stablehlo_create_compatibility_expander.cpp", "stablehlo_ext/transforms/stablehlo_refine_shapes.cpp", ], hdrs = [ diff --git a/xla/mlir_hlo/stablehlo_ext/transforms/passes.h b/xla/mlir_hlo/stablehlo_ext/transforms/passes.h index c72a92f112b23..e2b77594141f0 100644 --- a/xla/mlir_hlo/stablehlo_ext/transforms/passes.h +++ b/xla/mlir_hlo/stablehlo_ext/transforms/passes.h @@ -32,12 +32,6 @@ namespace stablehlo_ext { void createChloLegalizeToStablehloPipeline(OpPassManager &pm); -// Expand backward compatibility with the given StableHLO version by decomposing -// newer StableHLO operations into equivalent operations supported by that older -// version. -std::unique_ptr createStablehloCreateCompatibilityExpanderPass( - std::string targetVersionOption); - } // namespace stablehlo_ext } // namespace mlir diff --git a/xla/mlir_hlo/stablehlo_ext/transforms/stablehlo_create_compatibility_expander.cpp b/xla/mlir_hlo/stablehlo_ext/transforms/stablehlo_create_compatibility_expander.cpp deleted file mode 100644 index 0db5fd4780b67..0000000000000 --- a/xla/mlir_hlo/stablehlo_ext/transforms/stablehlo_create_compatibility_expander.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2024 The StableHLO Authors. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#include -#include -#include - -#include "mlir/Pass/Pass.h" -#include "stablehlo/transforms/Passes.h" -#include "stablehlo_ext/transforms/passes.h" - -namespace mlir { -namespace stablehlo_ext { - -// TODO(b/369406385): remove this method (and file) once issue is resolved. - -std::unique_ptr<::mlir::Pass> createStablehloCreateCompatibilityExpanderPass( - std::string targetVersionOption) { - return mlir::stablehlo::createStablehloCreateCompatibilityExpanderPass( - {std::move(targetVersionOption)}); -} - -} // namespace stablehlo_ext -} // namespace mlir