Cleanup compiler plugin directory and include paths. (#16691)

Progress on https://github.com/openxla/iree/issues/15468 (saw these
issues while working on migrating each plugin, finally got around to
forming a clear opinion and fixing)

* Qualify include paths relative to the repository root, not the plugin
root or some artificial prefix like `torch-iree/`
* Collapse directory structures, e.g. `StableHLO/stablehlo-iree/` to ->
`StableHLO/`
* Generate more CMake files from Bazel (still needed a few TableGen
tweaks though)
* Fixup `# ifdef` guards after code moves
* Fixup a few copyright headers that were using LLVM format instead of
IREE
diff --git a/compiler/plugins/input/StableHLO/BUILD.bazel b/compiler/plugins/input/StableHLO/BUILD.bazel
index 522ca5d..e40ee37 100644
--- a/compiler/plugins/input/StableHLO/BUILD.bazel
+++ b/compiler/plugins/input/StableHLO/BUILD.bazel
@@ -4,8 +4,32 @@
 # See https://llvm.org/LICENSE.txt for license information.
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library", "iree_compiler_register_plugin")
+
 package(
     default_visibility = ["//visibility:public"],
     features = ["layering_check"],
     licenses = ["notice"],  # Apache 2.0
 )
+
+iree_compiler_register_plugin(
+    plugin_id = "input_stablehlo",
+    target = ":registration",
+)
+
+iree_compiler_cc_library(
+    name = "registration",
+    srcs = [
+        "PluginRegistration.cpp",
+    ],
+    deps = [
+        "//compiler/plugins/input/StableHLO/Conversion",
+        "//compiler/src/iree/compiler/PluginAPI",
+        "@llvm-project//mlir:ConversionPasses",
+        "@llvm-project//mlir:IR",
+        "@llvm-project//mlir:Pass",
+        "@llvm-project//mlir:Transforms",
+        "@stablehlo//:chlo_ops",
+        "@stablehlo//:stablehlo_ops",
+    ],
+)
diff --git a/compiler/plugins/input/StableHLO/CMakeLists.txt b/compiler/plugins/input/StableHLO/CMakeLists.txt
index e6efac5..11eb2a4 100644
--- a/compiler/plugins/input/StableHLO/CMakeLists.txt
+++ b/compiler/plugins/input/StableHLO/CMakeLists.txt
@@ -1,22 +1,40 @@
-# Copyright 2023 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-set(IREE_PACKAGE_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set(IREE_PACKAGE_ROOT_PREFIX "")
 set(IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")
+list(APPEND IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${IREE_SOURCE_DIR}/third_party/stablehlo")
 
-add_library(stablehlo-iree_compiler_defs INTERFACE)
-target_include_directories(stablehlo-iree_compiler_defs
-  INTERFACE
-  ${CMAKE_CURRENT_SOURCE_DIR}
-  ${CMAKE_CURRENT_BINARY_DIR}
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_ABOVE_THIS_LINE ###
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/plugins/input/StableHLO/BUILD.bazel                                 #
+#                                                                              #
+# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
+# CMake-only content.                                                          #
+#                                                                              #
+# To disable autogeneration for this file entirely, delete this header.        #
+################################################################################
+
+iree_add_all_subdirs()
+
+iree_compiler_register_plugin(
+  PLUGIN_ID
+    input_stablehlo
+  TARGET
+    ::registration
 )
 
-# Configures all iree_cc_* targets to take this implicit dep,
-# which provides common includes and copts for the tree.
-set(IREE_IMPLICIT_DEFS_CC_DEPS stablehlo-iree_compiler_defs)
+iree_cc_library(
+  NAME
+    registration
+  SRCS
+    "PluginRegistration.cpp"
+  DEPS
+    ChloOps
+    MLIRIR
+    MLIRPass
+    MLIRTransforms
+    StablehloOps
+    iree::compiler::PluginAPI
+    iree::compiler::plugins::input::StableHLO::Conversion
+  PUBLIC
+)
 
-add_subdirectory(stablehlo-iree)
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel b/compiler/plugins/input/StableHLO/Conversion/BUILD.bazel
similarity index 89%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel
rename to compiler/plugins/input/StableHLO/Conversion/BUILD.bazel
index 4f6b80b..30d19e6 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel
+++ b/compiler/plugins/input/StableHLO/Conversion/BUILD.bazel
@@ -35,10 +35,6 @@
         "Passes.h.inc",
         "Rewriters.h",
     ],
-    copts = [
-        "-Icompiler/plugins/input/StableHLO",
-        "-I$(GENDIR)/compiler/plugins/input/StableHLO",
-    ],
     deps = [
         ":PassesIncGen",
         "@llvm-project//mlir:Pass",
@@ -86,14 +82,10 @@
         "TypeConversion.h",
         "VerifyCompilerInputLegality.cpp",
     ],
-    copts = [
-        "-Icompiler/plugins/input/StableHLO",
-        "-I$(GENDIR)/compiler/plugins/input/StableHLO",
-    ],
     deps = [
         ":CHLODecompositionPatterns",
         ":PassHeaders",
-        "//compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing",
+        "//compiler/plugins/input/StableHLO/Conversion/Preprocessing",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
@@ -139,14 +131,10 @@
     hdrs = [
         "Passes.h",
     ],
-    copts = [
-        "-Icompiler/plugins/input/StableHLO",
-        "-I$(GENDIR)/compiler/plugins/input/StableHLO",
-    ],
     deps = [
         ":PassHeaders",
         ":StableHLOLegalization",
-        "//compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing",
+        "//compiler/plugins/input/StableHLO/Conversion/Preprocessing",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CHLODecompositionPatterns.td b/compiler/plugins/input/StableHLO/Conversion/CHLODecompositionPatterns.td
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CHLODecompositionPatterns.td
rename to compiler/plugins/input/StableHLO/Conversion/CHLODecompositionPatterns.td
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt b/compiler/plugins/input/StableHLO/Conversion/CMakeLists.txt
similarity index 73%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt
rename to compiler/plugins/input/StableHLO/Conversion/CMakeLists.txt
index 09889a5..c750692 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt
+++ b/compiler/plugins/input/StableHLO/Conversion/CMakeLists.txt
@@ -1,8 +1,12 @@
-# TODO(scotttodd): generate this file
-#     Need a mapping for stablehlo-iree::Conversion::Preprocessing
-
-# Add this tablegen include to support CHLO rewrites with DRR.
-list(APPEND IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${IREE_SOURCE_DIR}/third_party/stablehlo")
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/plugins/input/StableHLO/Conversion/BUILD.bazel                      #
+#                                                                              #
+# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
+# CMake-only content.                                                          #
+#                                                                              #
+# To disable autogeneration for this file entirely, delete this header.        #
+################################################################################
 
 iree_add_all_subdirs()
 
@@ -18,9 +22,6 @@
 iree_cc_library(
   NAME
     PassHeaders
-  COPTS
-    "-Icompiler/plugins/input/StableHLO"
-    "-I$(GENDIR)/compiler/plugins/input/StableHLO"
   HDRS
     "PassDetail.h"
     "Passes.h"
@@ -45,9 +46,6 @@
 iree_cc_library(
   NAME
     StableHLOLegalization
-  COPTS
-    "-Icompiler/plugins/input/StableHLO"
-    "-I$(GENDIR)/compiler/plugins/input/StableHLO"
   SRCS
     "ConvertCollectives.cpp"
     "LegalizeCHLO.cpp"
@@ -105,16 +103,13 @@
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
     iree::compiler::Utils
-    stablehlo-iree::Conversion::Preprocessing
+    iree::compiler::plugins::input::StableHLO::Conversion::Preprocessing
   PUBLIC
 )
 
 iree_cc_library(
   NAME
     Conversion
-  COPTS
-    "-Icompiler/plugins/input/StableHLO"
-    "-I$(GENDIR)/compiler/plugins/input/StableHLO"
   HDRS
     "Passes.h"
   SRCS
@@ -138,6 +133,8 @@
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
     iree::compiler::InputConversion::Common
-    stablehlo-iree::Conversion::Preprocessing
+    iree::compiler::plugins::input::StableHLO::Conversion::Preprocessing
   PUBLIC
 )
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/ConvertCollectives.cpp b/compiler/plugins/input/StableHLO/Conversion/ConvertCollectives.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/ConvertCollectives.cpp
rename to compiler/plugins/input/StableHLO/Conversion/ConvertCollectives.cpp
index 65851fa..2150afa 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/ConvertCollectives.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/ConvertCollectives.cpp
@@ -7,6 +7,7 @@
 // Implements IREE-specific logic for lowering StableHLO collective ops to Flow
 // dialect ops.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowTypes.h"
@@ -16,7 +17,6 @@
 #include "mlir/IR/BuiltinAttributes.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeCHLO.cpp b/compiler/plugins/input/StableHLO/Conversion/LegalizeCHLO.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeCHLO.cpp
rename to compiler/plugins/input/StableHLO/Conversion/LegalizeCHLO.cpp
index 8e2739b..a57bafe 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeCHLO.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/LegalizeCHLO.cpp
@@ -7,6 +7,9 @@
 // Implements logic for lowering CHLO ops to StableHLO and Shape dialect ops,
 // taking care of CHLO's broadcasting semantics
 
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Complex/IR/Complex.h"
 #include "mlir/Dialect/SCF/IR/SCF.h"
@@ -18,9 +21,6 @@
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/BroadcastUtils.h"
 #include "stablehlo/dialect/ChloOps.h"
 #include "stablehlo/dialect/StablehloOps.h"
@@ -28,7 +28,7 @@
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_LEGALIZECHLO
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 
@@ -2225,7 +2225,7 @@
 } // namespace
 
 namespace {
-#include "stablehlo-iree/Conversion/CHLODecompositionPatterns.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/CHLODecompositionPatterns.h.inc"
 } // end anonymous namespace
 
 namespace {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeControlFlow.cpp b/compiler/plugins/input/StableHLO/Conversion/LegalizeControlFlow.cpp
similarity index 97%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeControlFlow.cpp
rename to compiler/plugins/input/StableHLO/Conversion/LegalizeControlFlow.cpp
index ff6ceca..33289b1 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeControlFlow.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/LegalizeControlFlow.cpp
@@ -6,20 +6,20 @@
 
 // Implements logic for lowering StableHLO dialect ops to the SCF dialect.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "mlir/Dialect/SCF/IR/SCF.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Value.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_LEGALIZECONTROLFLOW
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 // All transformations in this file take stablehlo blocks which end with
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeShapeComputations.cpp b/compiler/plugins/input/StableHLO/Conversion/LegalizeShapeComputations.cpp
similarity index 96%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeShapeComputations.cpp
rename to compiler/plugins/input/StableHLO/Conversion/LegalizeShapeComputations.cpp
index 6b8e15b..5de2b9c 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeShapeComputations.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/LegalizeShapeComputations.cpp
@@ -6,21 +6,21 @@
 
 // Implements logic for lowering StableHLO dialect to scalar shape operations.
 
+#include "compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/MapStableHLOToScalarOp.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_LEGALIZESHAPECOMPUTATIONS
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeToLinalgUtils.cpp b/compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.cpp
similarity index 98%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeToLinalgUtils.cpp
rename to compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.cpp
index 5ace28d..992a8e7 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeToLinalgUtils.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.cpp
@@ -6,7 +6,7 @@
 
 // Implements utilities for lowering StableHLO dialect to Linalg dialect.
 
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
 
 #include <algorithm>
 #include <numeric>
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeToLinalgUtils.h b/compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h
similarity index 92%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeToLinalgUtils.h
rename to compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h
index 6055b8b..2b74488 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/LegalizeToLinalgUtils.h
+++ b/compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h
@@ -6,8 +6,8 @@
 
 // Utils for lowering of the StableHLO dialect to the Linalg dialect.
 
-#ifndef STABLEHLO_IREE_CONVERSION_LEGALIZE_TO_LINALG_UTILS_H_
-#define STABLEHLO_IREE_CONVERSION_LEGALIZE_TO_LINALG_UTILS_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_LEGALIZE_TO_LINALG_UTILS_H_
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_LEGALIZE_TO_LINALG_UTILS_H_
 
 #include <algorithm>
 #include <numeric>
@@ -15,6 +15,7 @@
 #include <string>
 #include <utility>
 
+#include "compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringSet.h"
@@ -34,7 +35,6 @@
 #include "mlir/Support/LLVM.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/MapStableHLOToScalarOp.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
@@ -120,4 +120,4 @@
 
 } // namespace mlir::iree_compiler::stablehlo
 
-#endif // STABLEHLO_IREE_CONVERSION_LEGALIZE_TO_LINALG_UTILS_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_LEGALIZE_TO_LINALG_UTILS_H_
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/MapStableHLOToScalarOp.h b/compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/MapStableHLOToScalarOp.h
rename to compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h
index 848f0ff..8dbf025 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/MapStableHLOToScalarOp.h
+++ b/compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_MAP_STABLEHLO_TO_SCALAR_OP_H
-#define STABLEHLO_IREE_CONVERSION_MAP_STABLEHLO_TO_SCALAR_OP_H
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_MAP_STABLEHLO_TO_SCALAR_OP_H
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_MAP_STABLEHLO_TO_SCALAR_OP_H
 
 #include <optional>
 
@@ -1306,4 +1306,4 @@
 } // namespace stablehlo
 } // namespace mlir
 
-#endif // STABLEHLO_IREE_CONVERSION_MAP_STABLEHLO_TO_SCALAR_OP_H
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_MAP_STABLEHLO_TO_SCALAR_OP_H
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/PassDetail.h b/compiler/plugins/input/StableHLO/Conversion/PassDetail.h
similarity index 61%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/PassDetail.h
rename to compiler/plugins/input/StableHLO/Conversion/PassDetail.h
index e9eeae9..bc76525 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/PassDetail.h
+++ b/compiler/plugins/input/StableHLO/Conversion/PassDetail.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_PASSDETAIL_H_
-#define STABLEHLO_IREE_CONVERSION_PASSDETAIL_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSDETAIL_H_
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSDETAIL_H_
 
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
@@ -14,8 +14,8 @@
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DECL
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 } // namespace mlir::iree_compiler::stablehlo
 
-#endif // STABLEHLO_IREE_CONVERSION_PASSDETAIL_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSDETAIL_H_
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.cpp b/compiler/plugins/input/StableHLO/Conversion/Passes.cpp
similarity index 95%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Passes.cpp
index 0f22670..69d98e5 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Passes.cpp
@@ -4,8 +4,9 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "stablehlo-iree/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
 #include "iree/compiler/InputConversion/Common/Passes.h"
 #include "mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h"
@@ -18,12 +19,11 @@
 #include "mlir/Pass/PassOptions.h"
 #include "mlir/Pass/PassRegistry.h"
 #include "mlir/Transforms/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
 
 namespace mlir::iree_compiler::stablehlo {
 namespace {
 #define GEN_PASS_REGISTRATION
-#include "stablehlo-iree/Conversion/Passes.h.inc" // IWYU pragma: export
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc" // IWYU pragma: export
 } // namespace
 
 namespace {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.h b/compiler/plugins/input/StableHLO/Conversion/Passes.h
similarity index 83%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.h
rename to compiler/plugins/input/StableHLO/Conversion/Passes.h
index 5a37bcd..e463294 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.h
+++ b/compiler/plugins/input/StableHLO/Conversion/Passes.h
@@ -4,11 +4,11 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_PASSES_H_
-#define STABLEHLO_IREE_CONVERSION_PASSES_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSES_H_
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSES_H_
 
+#include "compiler/plugins/input/StableHLO/Conversion/PassDetail.h"
 #include "mlir/Pass/Pass.h"
-#include "stablehlo-iree/Conversion/PassDetail.h"
 
 namespace mlir {
 class TypeConverter;
@@ -43,4 +43,4 @@
 } // namespace iree_compiler::stablehlo
 } // namespace mlir
 
-#endif // STABLEHLO_IREE_CONVERSION_PASSES_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSES_H_
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.td b/compiler/plugins/input/StableHLO/Conversion/Passes.td
similarity index 92%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.td
rename to compiler/plugins/input/StableHLO/Conversion/Passes.td
index 6821588..7855f8c 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Passes.td
+++ b/compiler/plugins/input/StableHLO/Conversion/Passes.td
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_PASSES
-#define STABLEHLO_IREE_CONVERSION_PASSES
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSES
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSES
 
 include "mlir/Pass/PassBase.td"
 
@@ -67,4 +67,4 @@
       "Verifies that only supported IR constructs are passed to the compiler";
 }
 
-#endif // STABLEHLO_IREE_CONVERSION_PASSES
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PASSES
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/BUILD.bazel b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/BUILD.bazel
similarity index 95%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/BUILD.bazel
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/BUILD.bazel
index 397001e..5a19574 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/BUILD.bazel
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/BUILD.bazel
@@ -75,10 +75,6 @@
         "Passes.h",
         "Rewriters.h",
     ],
-    copts = [
-        "-Icompiler/plugins/input/StableHLO",
-        "-I$(GENDIR)/compiler/plugins/input/StableHLO",
-    ],
     deps = [
         ":ComplexLoweringPatterns",
         ":PassHeaders",
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/CMakeLists.txt b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/CMakeLists.txt
similarity index 82%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/CMakeLists.txt
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/CMakeLists.txt
index 71c6584..dbaf38d 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/CMakeLists.txt
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/CMakeLists.txt
@@ -1,10 +1,6 @@
-# Add this tablegen include to support stablehlo rewrites with DRR.
-list(APPEND IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${IREE_SOURCE_DIR}/third_party/stablehlo")
-
-### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_ABOVE_THIS_LINE ###
 ################################################################################
 # Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
-# compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/BUILD.bazel#
+# compiler/plugins/input/StableHLO/Conversion/Preprocessing/BUILD.bazel        #
 #                                                                              #
 # Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
 # CMake-only content.                                                          #
@@ -49,9 +45,6 @@
 iree_cc_library(
   NAME
     Preprocessing
-  COPTS
-    "-Icompiler/plugins/input/StableHLO"
-    "-I$(GENDIR)/compiler/plugins/input/StableHLO"
   HDRS
     "Passes.h"
     "Rewriters.h"
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Canonicalization.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Canonicalization.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Canonicalization.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/Canonicalization.cpp
index 8158c21..5bbc5f2 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Canonicalization.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Canonicalization.cpp
@@ -10,6 +10,8 @@
 #include <functional>
 #include <numeric>
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "llvm/ADT/APFloat.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/STLExtras.h"
@@ -26,14 +28,12 @@
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_STABLEHLOCANONICALIZE
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/ComplexLoweringPatterns.td b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/ComplexLoweringPatterns.td
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/ComplexLoweringPatterns.td
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/ComplexLoweringPatterns.td
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/DotGeneralToDot.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/DotGeneralToDot.cpp
similarity index 98%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/DotGeneralToDot.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/DotGeneralToDot.cpp
index a6aba2f..de46043 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/DotGeneralToDot.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/DotGeneralToDot.cpp
@@ -6,20 +6,20 @@
 
 // Implements logic for lowering the StableHLO general dot op to the dot op.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/ImplicitLocOpBuilder.h"
 #include "mlir/IR/Value.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_DOTGENERALTODOT
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 Value transposeReshape(Value arg, Location loc,
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/EinsumToDotGeneral.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/EinsumToDotGeneral.cpp
similarity index 96%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/EinsumToDotGeneral.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/EinsumToDotGeneral.cpp
index 84f5d26..8ca503f 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/EinsumToDotGeneral.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/EinsumToDotGeneral.cpp
@@ -6,16 +6,16 @@
 
 // Implements logic for lowering StableHLO einsum op to dot_general ops.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_EINSUMTODOTGENERAL
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/FlattenTuplesInCFG.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/FlattenTuplesInCFG.cpp
similarity index 97%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/FlattenTuplesInCFG.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/FlattenTuplesInCFG.cpp
index 86b3caf..d9a89d7 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/FlattenTuplesInCFG.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/FlattenTuplesInCFG.cpp
@@ -6,6 +6,8 @@
 
 // Implements IREE-specific preprocessing for XLA inputs.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
@@ -18,14 +20,12 @@
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_FLATTENTUPLESINCFG
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 // Given a set of types, unpack to a list of a types, removing all tuples.
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/FlattenTuplesInSCF.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/FlattenTuplesInSCF.cpp
similarity index 97%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/FlattenTuplesInSCF.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/FlattenTuplesInSCF.cpp
index f3cc53a..28ee53b 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/FlattenTuplesInSCF.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/FlattenTuplesInSCF.cpp
@@ -6,6 +6,8 @@
 
 // Implements IREE-specific preprocessing for XLA inputs.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
@@ -19,14 +21,12 @@
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_FLATTENTUPLESINSCF
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 // Given a set of types, unpack to a list of a types, removing all tuples.
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/GatherToTorchIndexSelect.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/GatherToTorchIndexSelect.cpp
similarity index 95%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/GatherToTorchIndexSelect.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/GatherToTorchIndexSelect.cpp
index 998c9d6..e1ca9cd 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/GatherToTorchIndexSelect.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/GatherToTorchIndexSelect.cpp
@@ -6,17 +6,17 @@
 
 // Implements logic for lowering StableHLO gather to torch_index_select.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "mlir/IR/MLIRContext.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_GATHERTOTORCHINDEXSELECT
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 struct GatherIsTorchIndexSelectPattern final
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/LowerComplex.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/LowerComplex.cpp
similarity index 93%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/LowerComplex.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/LowerComplex.cpp
index 334ffe4..1e69b57 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/LowerComplex.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/LowerComplex.cpp
@@ -8,16 +8,16 @@
 // operations. This does not include removing complex values from function
 // argument or return types.
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_LOWERCOMPLEX
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 
@@ -114,7 +114,7 @@
 } // end anonymous namespace
 
 namespace {
-#include "stablehlo-iree/Conversion/Preprocessing/ComplexLoweringPatterns.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/ComplexLoweringPatterns.h.inc"
 } // end anonymous namespace
 
 void populatePreprocessingComplexPatterns(MLIRContext *context,
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.cpp
similarity index 71%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.cpp
index b438691..8089efe 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.cpp
@@ -4,12 +4,12 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
 
 namespace mlir::iree_compiler::stablehlo {
 namespace {
 #define GEN_PASS_REGISTRATION
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc" // IWYU pragma: export
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc" // IWYU pragma: export
 } // namespace
 
 void registerStableHLOPreprocessingPasses() {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.h b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h
similarity index 67%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.h
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h
index 282ac25..64b6976 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.h
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_PREPROCESSING_PASSES_H_
-#define STABLEHLO_IREE_CONVERSION_PREPROCESSING_PASSES_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_PASSES_H_
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_PASSES_H_
 
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
@@ -14,7 +14,7 @@
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DECL
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 //===----------------------------------------------------------------------===//
 // Register all Passes
@@ -24,4 +24,4 @@
 
 } // namespace mlir::iree_compiler::stablehlo
 
-#endif // STABLEHLO_IREE_CONVERSION_PREPROCESSING_PASSES_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_PASSES_H_
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.td b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.td
similarity index 89%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.td
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.td
index c8762ba..c8a7aff 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Passes.td
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.td
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_PREPROCESSING_PASSES
-#define STABLEHLO_IREE_CONVERSION_PREPROCESSING_PASSES
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_PASSES
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_PASSES
 
 include "mlir/Pass/PassBase.td"
 
@@ -58,4 +58,4 @@
   let summary = "Materializes 'broadcast_dimensions' attributes";
 }
 
-#endif // STABLEHLO_IREE_CONVERSION_PREPROCESSING_PASSES
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_PASSES
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Rewriters.h b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h
similarity index 88%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Rewriters.h
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h
index bd5347d..6f11ec8 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/Rewriters.h
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_PREPROCESSING_REWRITERS_H_
-#define STABLEHLO_IREE_CONVERSION_PREPROCESSING_REWRITERS_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_REWRITERS_H_
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_REWRITERS_H_
 
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -46,4 +46,4 @@
 
 } // namespace mlir::iree_compiler::stablehlo
 
-#endif // STABLEHLO_IREE_CONVERSION_PREPROCESSING_REWRITERS_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_PREPROCESSING_REWRITERS_H_
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/StableHLOToStableHLO.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/StableHLOToStableHLO.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp
index 0f3d82e..7370b2c 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/StableHLOToStableHLO.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp
@@ -9,6 +9,8 @@
 #include <numeric>
 #include <random>
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Func/IR/FuncOps.h"
@@ -20,15 +22,13 @@
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/ChloOps.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_STABLEHLOTOSTABLEHLOPREPROCESSING
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/UnfuseBatchNorm.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/UnfuseBatchNorm.cpp
similarity index 98%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/UnfuseBatchNorm.cpp
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/UnfuseBatchNorm.cpp
index 3b0ed03..9ab29c3 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/UnfuseBatchNorm.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/UnfuseBatchNorm.cpp
@@ -4,6 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
@@ -11,14 +13,12 @@
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_UNFUSEBATCHNORM
-#include "stablehlo-iree/Conversion/Preprocessing/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Passes.h.inc"
 
 namespace {
 // Broadcasts the 1D value tensor 'value_1d' to the shape of 'result_type'. If
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/BUILD.bazel b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/BUILD.bazel
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/BUILD.bazel
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/BUILD.bazel
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/CMakeLists.txt b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/CMakeLists.txt
similarity index 92%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/CMakeLists.txt
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/CMakeLists.txt
index 92e4c89..28ba0c3 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/CMakeLists.txt
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/CMakeLists.txt
@@ -1,6 +1,6 @@
 ################################################################################
 # Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
-# compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/BUILD.bazel#
+# compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/BUILD.bazel   #
 #                                                                              #
 # Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
 # CMake-only content.                                                          #
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/canonicalization.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/canonicalization.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/canonicalization.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/canonicalization.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/canonicalize_dot_general.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/canonicalize_dot_general.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/canonicalize_dot_general.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/canonicalize_dot_general.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/complex_lowering.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/complex_lowering.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/complex_lowering.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/complex_lowering.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/dot_general_to_dot.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/dot_general_to_dot.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/dot_general_to_dot.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/dot_general_to_dot.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/einsum_to_dot_general.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/einsum_to_dot_general.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/einsum_to_dot_general.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/einsum_to_dot_general.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/flatten_tuples_in_scf.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_scf.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/flatten_tuples_in_scf.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_scf.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/gather_to_torch_index_select.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/gather_to_torch_index_select.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/gather_to_torch_index_select.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/gather_to_torch_index_select.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/stablehlo_to_stablehlo.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/stablehlo_to_stablehlo.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/stablehlo_to_stablehlo.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/stablehlo_to_stablehlo.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/unfuse_batch_norm.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/unfuse_batch_norm.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing/test/unfuse_batch_norm.mlir
rename to compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/unfuse_batch_norm.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Rewriters.h b/compiler/plugins/input/StableHLO/Conversion/Rewriters.h
similarity index 95%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Rewriters.h
rename to compiler/plugins/input/StableHLO/Conversion/Rewriters.h
index 69d025d..8a43802 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Rewriters.h
+++ b/compiler/plugins/input/StableHLO/Conversion/Rewriters.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_REWRITERS_H_
-#define STABLEHLO_IREE_CONVERSION_REWRITERS_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_REWRITERS_H_
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_REWRITERS_H_
 
 #include "mlir/Transforms/DialectConversion.h"
 
@@ -99,4 +99,4 @@
 
 } // namespace mlir::iree_compiler::stablehlo
 
-#endif // STABLEHLO_IREE_CONVERSION_REWRITERS_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_REWRITERS_H_
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOCustomCalls.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOCustomCalls.cpp
similarity index 96%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOCustomCalls.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOCustomCalls.cpp
index 1f94039..c410f71 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOCustomCalls.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOCustomCalls.cpp
@@ -7,6 +7,9 @@
 // Implements logic for lowering CHLO ops to StableHLO and Shape dialect ops,
 // taking care of CHLO's broadcasting semantics
 
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
@@ -18,9 +21,6 @@
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/BroadcastUtils.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
@@ -29,7 +29,7 @@
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_LEGALIZESTABLEHLOCUSTOMCALLS
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToArith.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToArith.cpp
similarity index 96%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToArith.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToArith.cpp
index 6fac082..7a62ec2 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToArith.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToArith.cpp
@@ -6,13 +6,13 @@
 
 // Implements logic for lowering scalar StableHLO ops to arith dialect.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/TypeConversion.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
-#include "stablehlo-iree/Conversion/TypeConversion.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToIREEInputDialects.cpp
similarity index 97%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToIREEInputDialects.cpp
index ae93778..1103337 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToIREEInputDialects.cpp
@@ -7,6 +7,12 @@
 // Implements IREE-specific logic for lowering StableHLO dialect to
 // IREE dialects: Linalg, Arith, Math, Tensor, Util, ML Program, etc.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/PassDetail.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Preprocessing/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/TypeConversion.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
@@ -29,19 +35,13 @@
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/PassDetail.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Preprocessing/Rewriters.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
-#include "stablehlo-iree/Conversion/TypeConversion.h"
 #include "stablehlo/dialect/ChloOps.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_CONVERTSTABLEHLOTOIREEINPUTDIALECTS
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalg.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalg.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalg.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalg.cpp
index e775a44..da4d752 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalg.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalg.cpp
@@ -10,6 +10,10 @@
 #include <cstdint>
 #include <string>
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/TypeConversion.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
@@ -41,16 +45,12 @@
 #include "mlir/Support/LLVM.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
-#include "stablehlo-iree/Conversion/TypeConversion.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_CONVERTSTABLEHLOTOLINALG
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 Value getResultValue(Operation *op) { return op->getResult(0); }
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgConvolution.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgConvolution.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgConvolution.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgConvolution.cpp
index 5d68d62..04ced37 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgConvolution.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgConvolution.cpp
@@ -6,12 +6,12 @@
 
 // Implements logic for lowering StableHLO convolution ops to Linalg dialect.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgDotProd.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgDotProd.cpp
similarity index 98%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgDotProd.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgDotProd.cpp
index a2bca09..0db4faf 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgDotProd.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgDotProd.cpp
@@ -8,12 +8,12 @@
 // These patterns are separated out to their own file to save on the compilation
 // times, given that we instantiate a large number of class templates here.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgExt.cpp
similarity index 98%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgExt.cpp
index 52c287d..d5ecc66 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgExt.cpp
@@ -11,6 +11,11 @@
 #include <complex>
 #include <memory>
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h"
+#include "compiler/plugins/input/StableHLO/Conversion/PassDetail.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
@@ -27,18 +32,13 @@
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/MapStableHLOToScalarOp.h"
-#include "stablehlo-iree/Conversion/PassDetail.h"
-#include "stablehlo-iree/Conversion/Passes.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/ChloOps.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_CONVERTSTABLEHLOTOLINALGEXT
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgPointwise.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgPointwise.cpp
similarity index 97%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgPointwise.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgPointwise.cpp
index 53ea368..6f2985a 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgPointwise.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgPointwise.cpp
@@ -8,13 +8,13 @@
 // These patterns are separated out to their own file to save on the compilation
 // times, given that we instantiate a large number of class templates here.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/MapStableHLOToScalarOp.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
+#include "compiler/plugins/input/StableHLO/Conversion/TypeConversion.h"
 #include "mlir/IR/ValueRange.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/MapStableHLOToScalarOp.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
-#include "stablehlo-iree/Conversion/TypeConversion.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgRandom.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgRandom.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgRandom.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgRandom.cpp
index 033dd69..1e06632 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgRandom.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgRandom.cpp
@@ -7,12 +7,12 @@
 // Implements logic for lowering StableHLO random number generation to Linalg
 // dialect.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgReduce.cpp b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgReduce.cpp
similarity index 99%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgReduce.cpp
rename to compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgReduce.cpp
index 632dbb5..8f43f12 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgReduce.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/StableHLOToLinalgReduce.cpp
@@ -8,12 +8,12 @@
 // These patterns are separated out to their own file to save on the compilation
 // times.
 
+#include "compiler/plugins/input/StableHLO/Conversion/LegalizeToLinalgUtils.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Rewriters.h"
 #include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/LegalizeToLinalgUtils.h"
-#include "stablehlo-iree/Conversion/Rewriters.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/TypeConversion.cpp b/compiler/plugins/input/StableHLO/Conversion/TypeConversion.cpp
similarity index 97%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/TypeConversion.cpp
rename to compiler/plugins/input/StableHLO/Conversion/TypeConversion.cpp
index b823ead..6b2ef75 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/TypeConversion.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/TypeConversion.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "stablehlo-iree/Conversion/TypeConversion.h"
+#include "compiler/plugins/input/StableHLO/Conversion/TypeConversion.h"
 
 #include <optional>
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/TypeConversion.h b/compiler/plugins/input/StableHLO/Conversion/TypeConversion.h
similarity index 81%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/TypeConversion.h
rename to compiler/plugins/input/StableHLO/Conversion/TypeConversion.h
index bb94343..d7b4ce0 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/TypeConversion.h
+++ b/compiler/plugins/input/StableHLO/Conversion/TypeConversion.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef STABLEHLO_IREE_CONVERSION_TYPE_CONVERSION_H
-#define STABLEHLO_IREE_CONVERSION_TYPE_CONVERSION_H
+#ifndef IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_TYPE_CONVERSION_H
+#define IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_TYPE_CONVERSION_H
 
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Dialect.h"
@@ -31,4 +31,4 @@
 
 } // namespace mlir::iree_compiler::stablehlo
 
-#endif // STABLEHLO_IREE_CONVERSION_TYPE_CONVERSION_H
+#endif // IREE_COMPILER_PLUGINS_INPUT_STABLEHLO_CONVERSION_TYPE_CONVERSION_H
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/VerifyCompilerInputLegality.cpp b/compiler/plugins/input/StableHLO/Conversion/VerifyCompilerInputLegality.cpp
similarity index 92%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/VerifyCompilerInputLegality.cpp
rename to compiler/plugins/input/StableHLO/Conversion/VerifyCompilerInputLegality.cpp
index 7345e80..aa9bea7 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/VerifyCompilerInputLegality.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/VerifyCompilerInputLegality.cpp
@@ -4,18 +4,18 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include "compiler/plugins/input/StableHLO/Conversion/PassDetail.h"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
 #include "mlir/IR/MLIRContext.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "stablehlo-iree/Conversion/PassDetail.h"
-#include "stablehlo-iree/Conversion/Passes.h"
 #include "stablehlo/dialect/ChloOps.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
 namespace mlir::iree_compiler::stablehlo {
 
 #define GEN_PASS_DEF_VERIFYCOMPILERSTABLEHLOINPUTLEGALITY
-#include "stablehlo-iree/Conversion/Passes.h.inc"
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h.inc"
 
 namespace {
 
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/BUILD.bazel b/compiler/plugins/input/StableHLO/Conversion/test/BUILD.bazel
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/BUILD.bazel
rename to compiler/plugins/input/StableHLO/Conversion/test/BUILD.bazel
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/CMakeLists.txt b/compiler/plugins/input/StableHLO/Conversion/test/CMakeLists.txt
similarity index 94%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/CMakeLists.txt
rename to compiler/plugins/input/StableHLO/Conversion/test/CMakeLists.txt
index 3faf84a..7b41288 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/CMakeLists.txt
+++ b/compiler/plugins/input/StableHLO/Conversion/test/CMakeLists.txt
@@ -1,6 +1,6 @@
 ################################################################################
 # Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
-# compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/BUILD.bazel  #
+# compiler/plugins/input/StableHLO/Conversion/test/BUILD.bazel                 #
 #                                                                              #
 # Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
 # CMake-only content.                                                          #
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/auto_input_conversion.mlir b/compiler/plugins/input/StableHLO/Conversion/test/auto_input_conversion.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/auto_input_conversion.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/auto_input_conversion.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/convert_collectives.mlir b/compiler/plugins/input/StableHLO/Conversion/test/convert_collectives.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/convert_collectives.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/convert_collectives.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_chlo_decomposition.mlir b/compiler/plugins/input/StableHLO/Conversion/test/legalize_chlo_decomposition.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_chlo_decomposition.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/legalize_chlo_decomposition.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_chlo_no_broadcast.mlir b/compiler/plugins/input/StableHLO/Conversion/test/legalize_chlo_no_broadcast.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_chlo_no_broadcast.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/legalize_chlo_no_broadcast.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_chlo_with_broadcast.mlir b/compiler/plugins/input/StableHLO/Conversion/test/legalize_chlo_with_broadcast.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_chlo_with_broadcast.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/legalize_chlo_with_broadcast.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_control_flow.mlir b/compiler/plugins/input/StableHLO/Conversion/test/legalize_control_flow.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_control_flow.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/legalize_control_flow.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_shape_computations.mlir b/compiler/plugins/input/StableHLO/Conversion/test/legalize_shape_computations.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/legalize_shape_computations.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/legalize_shape_computations.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_custom_calls.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_custom_calls.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_custom_calls.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_custom_calls.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_iree_input_dialects.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_iree_input_dialects.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_iree_input_dialects.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_iree_input_dialects.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_convolution.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_convolution.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_convolution.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_convolution.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_dot_prod.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_dot_prod.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_dot_prod.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_dot_prod.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_ext.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_ext.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_ext.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_ext.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_gather.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_gather.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_gather.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_gather.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_pointwise.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_pointwise.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_pointwise.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_pointwise.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_random.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_random.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_random.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_random.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_reduce.mlir b/compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_reduce.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/stablehlo_to_linalg_reduce.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_linalg_reduce.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/verify_compiler_input_legality.mlir b/compiler/plugins/input/StableHLO/Conversion/test/verify_compiler_input_legality.mlir
similarity index 100%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/test/verify_compiler_input_legality.mlir
rename to compiler/plugins/input/StableHLO/Conversion/test/verify_compiler_input_legality.mlir
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/PluginRegistration.cpp b/compiler/plugins/input/StableHLO/PluginRegistration.cpp
similarity index 98%
rename from compiler/plugins/input/StableHLO/stablehlo-iree/PluginRegistration.cpp
rename to compiler/plugins/input/StableHLO/PluginRegistration.cpp
index 7e93ad3..d714310 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/PluginRegistration.cpp
+++ b/compiler/plugins/input/StableHLO/PluginRegistration.cpp
@@ -4,6 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include "compiler/plugins/input/StableHLO/Conversion/Passes.h"
 #include "iree/compiler/PluginAPI/Client.h"
 #include "mlir/Conversion/Passes.h"
 #include "mlir/IR/BuiltinOps.h"
@@ -11,8 +12,6 @@
 #include "stablehlo/dialect/ChloOps.h"
 #include "stablehlo/dialect/StablehloOps.h"
 
-#include "stablehlo-iree/Conversion/Passes.h"
-
 namespace mlir::iree_compiler::stablehlo {
 
 namespace {
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/BUILD.bazel b/compiler/plugins/input/StableHLO/stablehlo-iree/BUILD.bazel
deleted file mode 100644
index 3d4e563..0000000
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/BUILD.bazel
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2023 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library", "iree_compiler_register_plugin")
-
-package(
-    default_visibility = ["//visibility:public"],
-    features = ["layering_check"],
-    licenses = ["notice"],  # Apache 2.0
-)
-
-iree_compiler_register_plugin(
-    plugin_id = "input_stablehlo",
-    target = ":registration",
-)
-
-iree_compiler_cc_library(
-    name = "registration",
-    srcs = [
-        "PluginRegistration.cpp",
-    ],
-    copts = [
-        "-Icompiler/plugins/input/StableHLO",
-        "-I$(GENDIR)/compiler/plugins/input/StableHLO",
-    ],
-    deps = [
-        "//compiler/plugins/input/StableHLO/stablehlo-iree/Conversion",
-        "//compiler/src/iree/compiler/PluginAPI",
-        "@llvm-project//mlir:ConversionPasses",
-        "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:Transforms",
-        "@stablehlo//:chlo_ops",
-        "@stablehlo//:stablehlo_ops",
-    ],
-)
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/CMakeLists.txt b/compiler/plugins/input/StableHLO/stablehlo-iree/CMakeLists.txt
deleted file mode 100644
index a38dd6c..0000000
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-iree_add_all_subdirs()
-
-iree_compiler_register_plugin(
-  PLUGIN_ID
-    input_stablehlo
-  TARGET
-    ::registration
-)
-
-iree_cc_library(
-  NAME
-    registration
-  SRCS
-    "PluginRegistration.cpp"
-  DEPS
-    MLIRIR
-    MLIRPass
-    MLIRTransforms
-    iree::compiler::PluginAPI
-    stablehlo-iree::Conversion::Conversion
-  PUBLIC
-)
diff --git a/compiler/plugins/input/TOSA/BUILD.bazel b/compiler/plugins/input/TOSA/BUILD.bazel
index 522ca5d..40dd5a3 100644
--- a/compiler/plugins/input/TOSA/BUILD.bazel
+++ b/compiler/plugins/input/TOSA/BUILD.bazel
@@ -4,8 +4,35 @@
 # See https://llvm.org/LICENSE.txt for license information.
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library", "iree_compiler_register_plugin")
+
 package(
     default_visibility = ["//visibility:public"],
     features = ["layering_check"],
     licenses = ["notice"],  # Apache 2.0
 )
+
+iree_compiler_register_plugin(
+    plugin_id = "input_tosa",
+    target = ":registration",
+)
+
+iree_compiler_cc_library(
+    name = "registration",
+    srcs = [
+        "PluginRegistration.cpp",
+    ],
+    deps = [
+        "//compiler/plugins/input/TOSA/InputConversion",
+        "//compiler/src/iree/compiler/PluginAPI",
+        "@llvm-project//mlir:ConversionPasses",
+        "@llvm-project//mlir:IR",
+        "@llvm-project//mlir:Pass",
+        "@llvm-project//mlir:TosaDialect",
+        "@llvm-project//mlir:TosaToArith",
+        "@llvm-project//mlir:TosaToLinalg",
+        "@llvm-project//mlir:TosaToSCF",
+        "@llvm-project//mlir:TosaToTensor",
+        "@llvm-project//mlir:Transforms",
+    ],
+)
diff --git a/compiler/plugins/input/TOSA/CMakeLists.txt b/compiler/plugins/input/TOSA/CMakeLists.txt
index e5c29d4..7830e18 100644
--- a/compiler/plugins/input/TOSA/CMakeLists.txt
+++ b/compiler/plugins/input/TOSA/CMakeLists.txt
@@ -1,22 +1,39 @@
-# Copyright 2023 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/plugins/input/TOSA/BUILD.bazel                                      #
+#                                                                              #
+# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
+# CMake-only content.                                                          #
+#                                                                              #
+# To disable autogeneration for this file entirely, delete this header.        #
+################################################################################
 
-set(IREE_PACKAGE_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set(IREE_PACKAGE_ROOT_PREFIX "")
-set(IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")
+iree_add_all_subdirs()
 
-add_library(tosa-iree_compiler_defs INTERFACE)
-target_include_directories(tosa-iree_compiler_defs
-  INTERFACE
-  ${CMAKE_CURRENT_SOURCE_DIR}
-  ${CMAKE_CURRENT_BINARY_DIR}
+iree_compiler_register_plugin(
+  PLUGIN_ID
+    input_tosa
+  TARGET
+    ::registration
 )
 
-# Configures all iree_cc_* targets to take this implicit dep,
-# which provides common includes and copts for the tree.
-set(IREE_IMPLICIT_DEFS_CC_DEPS tosa-iree_compiler_defs)
+iree_cc_library(
+  NAME
+    registration
+  SRCS
+    "PluginRegistration.cpp"
+  DEPS
+    MLIRIR
+    MLIRPass
+    MLIRTosaDialect
+    MLIRTosaToArith
+    MLIRTosaToLinalg
+    MLIRTosaToSCF
+    MLIRTosaToTensor
+    MLIRTransforms
+    iree::compiler::PluginAPI
+    iree::compiler::plugins::input::TOSA::InputConversion
+  PUBLIC
+)
 
-add_subdirectory(tosa-iree)
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel b/compiler/plugins/input/TOSA/InputConversion/BUILD.bazel
similarity index 91%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel
rename to compiler/plugins/input/TOSA/InputConversion/BUILD.bazel
index 8834f2e..d0f0117 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel
+++ b/compiler/plugins/input/TOSA/InputConversion/BUILD.bazel
@@ -34,10 +34,6 @@
         "Passes.h",
         "Passes.h.inc",
     ],
-    copts = [
-        "-Icompiler/plugins/input/TOSA",
-        "-I$(GENDIR)/compiler/plugins/input/TOSA",
-    ],
     deps = [
         ":PassesIncGen",
         "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
@@ -63,10 +59,6 @@
     hdrs = [
         "Passes.h",
     ],
-    copts = [
-        "-Icompiler/plugins/input/TOSA",
-        "-I$(GENDIR)/compiler/plugins/input/TOSA",
-    ],
     deps = [
         ":PassHeaders",
         ":PassesIncGen",
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt b/compiler/plugins/input/TOSA/InputConversion/CMakeLists.txt
similarity index 87%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt
rename to compiler/plugins/input/TOSA/InputConversion/CMakeLists.txt
index 4897917..a1dc1ea 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt
+++ b/compiler/plugins/input/TOSA/InputConversion/CMakeLists.txt
@@ -1,6 +1,6 @@
 ################################################################################
 # Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
-# compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel            #
+# compiler/plugins/input/TOSA/InputConversion/BUILD.bazel                      #
 #                                                                              #
 # Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
 # CMake-only content.                                                          #
@@ -22,9 +22,6 @@
 iree_cc_library(
   NAME
     PassHeaders
-  COPTS
-    "-Icompiler/plugins/input/TOSA"
-    "-I$(GENDIR)/compiler/plugins/input/TOSA"
   HDRS
     "PassDetail.h"
     "Passes.h"
@@ -45,9 +42,6 @@
 iree_cc_library(
   NAME
     InputConversion
-  COPTS
-    "-Icompiler/plugins/input/TOSA"
-    "-I$(GENDIR)/compiler/plugins/input/TOSA"
   HDRS
     "Passes.h"
   SRCS
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Converti48Toi64.cpp b/compiler/plugins/input/TOSA/InputConversion/Converti48Toi64.cpp
similarity index 93%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/Converti48Toi64.cpp
rename to compiler/plugins/input/TOSA/InputConversion/Converti48Toi64.cpp
index 8e4bb36..570982c 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Converti48Toi64.cpp
+++ b/compiler/plugins/input/TOSA/InputConversion/Converti48Toi64.cpp
@@ -1,16 +1,10 @@
-//===- Converti48Toi64.cpp --------------------------------------------===//
+// Copyright 2023 The IREE Authors
 //
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Convert all i48 types to i64.
-//
-//===----------------------------------------------------------------------===//
 
-#include "tosa-iree/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/TOSA/InputConversion/PassDetail.h"
 
 #include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h b/compiler/plugins/input/TOSA/InputConversion/PassDetail.h
similarity index 68%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h
rename to compiler/plugins/input/TOSA/InputConversion/PassDetail.h
index 07422cc..6444c75 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h
+++ b/compiler/plugins/input/TOSA/InputConversion/PassDetail.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef TOSA_IREE_INPUTCONVERSION_PASSDETAIL_H_
-#define TOSA_IREE_INPUTCONVERSION_PASSDETAIL_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSDETAIL_H_
+#define IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSDETAIL_H_
 
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
@@ -18,8 +18,8 @@
 namespace mlir::iree_compiler {
 
 #define GEN_PASS_CLASSES
-#include "tosa-iree/InputConversion/Passes.h.inc"
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h.inc"
 
 } // namespace mlir::iree_compiler
 
-#endif // TOSA_IREE_INPUTCONVERSION_PASSDETAIL_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSDETAIL_H_
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.cpp b/compiler/plugins/input/TOSA/InputConversion/Passes.cpp
similarity index 95%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.cpp
rename to compiler/plugins/input/TOSA/InputConversion/Passes.cpp
index 4c46e56..85a8cac 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.cpp
+++ b/compiler/plugins/input/TOSA/InputConversion/Passes.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "tosa-iree/InputConversion/Passes.h"
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h"
 
 #include "iree/compiler/InputConversion/Common/Passes.h"
 #include "mlir/Conversion/TosaToArith/TosaToArith.h"
@@ -79,7 +79,7 @@
 
 namespace {
 #define GEN_PASS_REGISTRATION
-#include "tosa-iree/InputConversion/Passes.h.inc" // IWYU pragma: export
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h.inc" // IWYU pragma: export
 } // namespace
 
 void registerTOSAConversionPasses() {
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.h b/compiler/plugins/input/TOSA/InputConversion/Passes.h
similarity index 90%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.h
rename to compiler/plugins/input/TOSA/InputConversion/Passes.h
index b67e4d1..f47e4b1 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.h
+++ b/compiler/plugins/input/TOSA/InputConversion/Passes.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef TOSA_IREE_INPUTCONVERSION_PASSES_H_
-#define TOSA_IREE_INPUTCONVERSION_PASSES_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSES_H_
+#define IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSES_H_
 
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
@@ -54,4 +54,4 @@
 
 } // namespace mlir::iree_compiler
 
-#endif // TOSA_IREE_INPUTCONVERSION_PASSES_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSES_H_
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.td b/compiler/plugins/input/TOSA/InputConversion/Passes.td
similarity index 87%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.td
rename to compiler/plugins/input/TOSA/InputConversion/Passes.td
index 19ba4e5..7ea82d1 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/Passes.td
+++ b/compiler/plugins/input/TOSA/InputConversion/Passes.td
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef TOSA_IREE_INPUTCONVERSION_PASSES
-#define TOSA_IREE_INPUTCONVERSION_PASSES
+#ifndef IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSES
+#define IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSES
 
 include "mlir/Pass/PassBase.td"
 
@@ -39,4 +39,4 @@
   let constructor = "mlir::iree_compiler::createVerifyCompilerTOSAInputLegality()";
 }
 
-#endif // TOSA_IREE_INPUTCONVERSION_PASSES
+#endif // IREE_COMPILER_PLUGINS_INPUT_TOSA_INPUTCONVERSION_PASSES
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/StripSignedness.cpp b/compiler/plugins/input/TOSA/InputConversion/StripSignedness.cpp
similarity index 96%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/StripSignedness.cpp
rename to compiler/plugins/input/TOSA/InputConversion/StripSignedness.cpp
index c133a98..dc3ba5b 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/StripSignedness.cpp
+++ b/compiler/plugins/input/TOSA/InputConversion/StripSignedness.cpp
@@ -4,11 +4,11 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include "compiler/plugins/input/TOSA/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "tosa-iree/InputConversion/PassDetail.h"
-#include "tosa-iree/InputConversion/Passes.h"
 
 namespace mlir::iree_compiler {
 
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp b/compiler/plugins/input/TOSA/InputConversion/TosaToLinalgExt.cpp
similarity index 93%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp
rename to compiler/plugins/input/TOSA/InputConversion/TosaToLinalgExt.cpp
index f762d74..799dd04 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp
+++ b/compiler/plugins/input/TOSA/InputConversion/TosaToLinalgExt.cpp
@@ -1,15 +1,11 @@
-//===- TosaToLinalgExt.cpp --------------------------------------------===//
+// Copyright 2023 The IREE Authors
 //
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Convert TOSA operations to their LinalgExt equivalent.
-//
-//===----------------------------------------------------------------------===//
 
+#include "compiler/plugins/input/TOSA/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
@@ -19,8 +15,6 @@
 #include "mlir/Dialect/Tosa/Transforms/Passes.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "tosa-iree/InputConversion/PassDetail.h"
-#include "tosa-iree/InputConversion/Passes.h"
 
 using namespace mlir;
 using namespace mlir::tosa;
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/VerifyCompilerTOSAInputLegality.cpp b/compiler/plugins/input/TOSA/InputConversion/VerifyCompilerTOSAInputLegality.cpp
similarity index 95%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/VerifyCompilerTOSAInputLegality.cpp
rename to compiler/plugins/input/TOSA/InputConversion/VerifyCompilerTOSAInputLegality.cpp
index 67a0b2a..dd0f275 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/VerifyCompilerTOSAInputLegality.cpp
+++ b/compiler/plugins/input/TOSA/InputConversion/VerifyCompilerTOSAInputLegality.cpp
@@ -4,12 +4,12 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include "compiler/plugins/input/TOSA/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassManager.h"
 #include "mlir/Transforms/DialectConversion.h"
-#include "tosa-iree/InputConversion/PassDetail.h"
-#include "tosa-iree/InputConversion/Passes.h"
 
 namespace mlir::iree_compiler {
 
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/BUILD.bazel b/compiler/plugins/input/TOSA/InputConversion/test/BUILD.bazel
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/BUILD.bazel
rename to compiler/plugins/input/TOSA/InputConversion/test/BUILD.bazel
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/CMakeLists.txt b/compiler/plugins/input/TOSA/InputConversion/test/CMakeLists.txt
similarity index 92%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/CMakeLists.txt
rename to compiler/plugins/input/TOSA/InputConversion/test/CMakeLists.txt
index c61f067..6c58e41 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/CMakeLists.txt
+++ b/compiler/plugins/input/TOSA/InputConversion/test/CMakeLists.txt
@@ -1,6 +1,6 @@
 ################################################################################
 # Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
-# compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/BUILD.bazel       #
+# compiler/plugins/input/TOSA/InputConversion/test/BUILD.bazel                 #
 #                                                                              #
 # Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
 # CMake-only content.                                                          #
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/apply_pdl_patterns_tosa.mlir b/compiler/plugins/input/TOSA/InputConversion/test/apply_pdl_patterns_tosa.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/apply_pdl_patterns_tosa.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/apply_pdl_patterns_tosa.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/auto_input_conversion.mlir b/compiler/plugins/input/TOSA/InputConversion/test/auto_input_conversion.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/auto_input_conversion.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/auto_input_conversion.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/convert_i48_to_i64.mlir b/compiler/plugins/input/TOSA/InputConversion/test/convert_i48_to_i64.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/convert_i48_to_i64.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/convert_i48_to_i64.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/strip_signedness.mlir b/compiler/plugins/input/TOSA/InputConversion/test/strip_signedness.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/strip_signedness.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/strip_signedness.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/tosa.pdl.mlir b/compiler/plugins/input/TOSA/InputConversion/test/tosa.pdl.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/tosa.pdl.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/tosa.pdl.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/tosa_to_linalg_ext.mlir b/compiler/plugins/input/TOSA/InputConversion/test/tosa_to_linalg_ext.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/tosa_to_linalg_ext.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/tosa_to_linalg_ext.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/verify_compiler_tosa_input_legality.mlir b/compiler/plugins/input/TOSA/InputConversion/test/verify_compiler_tosa_input_legality.mlir
similarity index 100%
rename from compiler/plugins/input/TOSA/tosa-iree/InputConversion/test/verify_compiler_tosa_input_legality.mlir
rename to compiler/plugins/input/TOSA/InputConversion/test/verify_compiler_tosa_input_legality.mlir
diff --git a/compiler/plugins/input/TOSA/tosa-iree/PluginRegistration.cpp b/compiler/plugins/input/TOSA/PluginRegistration.cpp
similarity index 96%
rename from compiler/plugins/input/TOSA/tosa-iree/PluginRegistration.cpp
rename to compiler/plugins/input/TOSA/PluginRegistration.cpp
index 8021918..b31d410 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/PluginRegistration.cpp
+++ b/compiler/plugins/input/TOSA/PluginRegistration.cpp
@@ -11,7 +11,7 @@
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/PassManager.h"
 
-#include "tosa-iree/InputConversion/Passes.h"
+#include "compiler/plugins/input/TOSA/InputConversion/Passes.h"
 
 namespace mlir::iree_compiler {
 
diff --git a/compiler/plugins/input/TOSA/tosa-iree/BUILD.bazel b/compiler/plugins/input/TOSA/tosa-iree/BUILD.bazel
deleted file mode 100644
index 1e8d443..0000000
--- a/compiler/plugins/input/TOSA/tosa-iree/BUILD.bazel
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2023 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_library", "iree_compiler_register_plugin")
-
-package(
-    default_visibility = ["//visibility:public"],
-    features = ["layering_check"],
-    licenses = ["notice"],  # Apache 2.0
-)
-
-iree_compiler_register_plugin(
-    plugin_id = "input_tosa",
-    target = ":registration",
-)
-
-iree_compiler_cc_library(
-    name = "registration",
-    srcs = [
-        "PluginRegistration.cpp",
-    ],
-    copts = ["-Icompiler/plugins/input/TOSA"],
-    deps = [
-        "//compiler/plugins/input/TOSA/tosa-iree/InputConversion",
-        "//compiler/src/iree/compiler/PluginAPI",
-        "@llvm-project//mlir:ConversionPasses",
-        "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:TosaDialect",
-        "@llvm-project//mlir:TosaToArith",
-        "@llvm-project//mlir:TosaToLinalg",
-        "@llvm-project//mlir:TosaToSCF",
-        "@llvm-project//mlir:TosaToTensor",
-        "@llvm-project//mlir:Transforms",
-    ],
-)
diff --git a/compiler/plugins/input/TOSA/tosa-iree/CMakeLists.txt b/compiler/plugins/input/TOSA/tosa-iree/CMakeLists.txt
deleted file mode 100644
index bfa618f..0000000
--- a/compiler/plugins/input/TOSA/tosa-iree/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-iree_add_all_subdirs()
-
-iree_compiler_register_plugin(
-  PLUGIN_ID
-    input_tosa
-  TARGET
-    ::registration
-)
-
-iree_cc_library(
-  NAME
-    registration
-  SRCS
-    "PluginRegistration.cpp"
-  DEPS
-    MLIRIR
-    MLIRPass
-    MLIRTosaDialect
-    MLIRTosaToArith
-    MLIRTosaToLinalg
-    MLIRTosaToSCF
-    MLIRTosaToTensor
-    MLIRTransforms
-    iree::compiler::PluginAPI
-    tosa-iree::InputConversion::InputConversion
-  PUBLIC
-)
diff --git a/compiler/plugins/input/Torch/CMakeLists.txt b/compiler/plugins/input/Torch/CMakeLists.txt
index 9f35001..33a1eb3 100644
--- a/compiler/plugins/input/Torch/CMakeLists.txt
+++ b/compiler/plugins/input/Torch/CMakeLists.txt
@@ -5,8 +5,6 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 set(TORCH_MLIR_ROOT_DIR "${IREE_SOURCE_DIR}/third_party/torch-mlir")
-set(IREE_PACKAGE_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set(IREE_PACKAGE_ROOT_PREFIX "")
 set(IREE_COMPILER_TABLEGEN_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")
 
 add_library(torch-iree_compiler_defs INTERFACE)
@@ -20,6 +18,34 @@
 # which provides common includes and copts for the tree.
 set(IREE_IMPLICIT_DEFS_CC_DEPS torch-iree_compiler_defs)
 
-add_subdirectory(torch-iree)
 add_subdirectory(torch-mlir)
 add_subdirectory(torch-mlir-dialects)
+
+add_subdirectory(InputConversion)
+
+iree_cc_library(
+  NAME
+    registration
+  SRCS
+    "PluginRegistration.cpp"
+  DEPS
+    MLIRIR
+    MLIRMLProgramDialect
+    MLIRPass
+    iree::compiler::PluginAPI
+    iree::compiler::plugins::input::Torch::InputConversion
+    iree::compiler::plugins::input::Torch::torch-mlir::TorchConversionDialectIR
+    iree::compiler::plugins::input::Torch::torch-mlir::TorchDialectIR
+    iree::compiler::plugins::input::Torch::torch-mlir::TorchDialectPasses
+    iree::compiler::plugins::input::Torch::torch-mlir::TorchOnnxToTorchPasses
+    iree::compiler::plugins::input::Torch::torch-mlir::ConversionPasses
+    iree::compiler::plugins::input::Torch::torch-mlir-dialects::TMTensorDialectIR
+  PUBLIC
+)
+
+iree_compiler_register_plugin(
+  PLUGIN_ID
+    input_torch
+  TARGET
+    ::registration
+)
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/BitCastQuantTensor.cpp b/compiler/plugins/input/Torch/InputConversion/BitCastQuantTensor.cpp
similarity index 93%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/BitCastQuantTensor.cpp
rename to compiler/plugins/input/Torch/InputConversion/BitCastQuantTensor.cpp
index d1f0d4c..cc9191b 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/BitCastQuantTensor.cpp
+++ b/compiler/plugins/input/Torch/InputConversion/BitCastQuantTensor.cpp
@@ -1,13 +1,10 @@
-//===----------------------------------------------------------------------===//
+// Copyright 2023 The IREE Authors
 //
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-// Also available under a BSD-style license. See LICENSE.
-//
-//===----------------------------------------------------------------------===//
 
-#include "PassDetail.h"
+#include "compiler/plugins/input/Torch/InputConversion/PassDetail.h"
 
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt b/compiler/plugins/input/Torch/InputConversion/CMakeLists.txt
similarity index 76%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt
rename to compiler/plugins/input/Torch/InputConversion/CMakeLists.txt
index dea35e1..53daa69 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt
+++ b/compiler/plugins/input/Torch/InputConversion/CMakeLists.txt
@@ -49,10 +49,10 @@
     MLIRPass
     MLIRTensorDialect
     MLIRTransforms
-    torch-mlir::ConversionPasses
-    torch-mlir::TorchConversionDialectIR
-    torch-mlir::TorchDialectPasses
-    torch-mlir-dialects::TMTensorDialectIR
+    iree::compiler::plugins::input::Torch::torch-mlir::ConversionPasses
+    iree::compiler::plugins::input::Torch::torch-mlir::TorchConversionDialectIR
+    iree::compiler::plugins::input::Torch::torch-mlir::TorchDialectPasses
+    iree::compiler::plugins::input::Torch::torch-mlir-dialects::TMTensorDialectIR
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::LinalgExt::IR
   PUBLIC
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/ConvertTMTensorToLinalgExt.cpp b/compiler/plugins/input/Torch/InputConversion/ConvertTMTensorToLinalgExt.cpp
similarity index 98%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/ConvertTMTensorToLinalgExt.cpp
rename to compiler/plugins/input/Torch/InputConversion/ConvertTMTensorToLinalgExt.cpp
index 72a787b..e09363f 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/ConvertTMTensorToLinalgExt.cpp
+++ b/compiler/plugins/input/Torch/InputConversion/ConvertTMTensorToLinalgExt.cpp
@@ -7,13 +7,13 @@
 #include <cstdint>
 #include <numeric>
 
+#include "compiler/plugins/input/Torch/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "torch-iree/InputConversion/PassDetail.h"
-#include "torch-iree/InputConversion/Passes.h"
 #include "torch-mlir-dialects/Dialect/TMTensor/IR/TMTensorOps.h"
 
 namespace mlir::iree_compiler::TorchInput {
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/FuncConversion.cpp b/compiler/plugins/input/Torch/InputConversion/FuncConversion.cpp
similarity index 99%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/FuncConversion.cpp
rename to compiler/plugins/input/Torch/InputConversion/FuncConversion.cpp
index e5d5635..00a1b05 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/FuncConversion.cpp
+++ b/compiler/plugins/input/Torch/InputConversion/FuncConversion.cpp
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "torch-iree/InputConversion/Passes.h"
-
+#include "compiler/plugins/input/Torch/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
@@ -17,7 +17,6 @@
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/IRMapping.h"
-#include "torch-iree/InputConversion/PassDetail.h"
 #include "torch-mlir/Dialect/Torch/IR/TorchOps.h"
 #include "torch-mlir/Dialect/Torch/IR/TorchTypes.h"
 #include "torch-mlir/Dialect/TorchConversion/IR/TorchConversionDialect.h"
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/PassDetail.h b/compiler/plugins/input/Torch/InputConversion/PassDetail.h
similarity index 61%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/PassDetail.h
rename to compiler/plugins/input/Torch/InputConversion/PassDetail.h
index 9c3529d..e3e68b1 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/PassDetail.h
+++ b/compiler/plugins/input/Torch/InputConversion/PassDetail.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef TORCH_IREE_INPUTCONVERSION_PASSDETAIL_H_
-#define TORCH_IREE_INPUTCONVERSION_PASSDETAIL_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSDETAIL_H_
+#define IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSDETAIL_H_
 
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
@@ -14,8 +14,8 @@
 namespace mlir::iree_compiler::TorchInput {
 
 #define GEN_PASS_CLASSES
-#include "torch-iree/InputConversion/Passes.h.inc"
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h.inc"
 
 } // namespace mlir::iree_compiler::TorchInput
 
-#endif // TORCH_IREE_INPUTCONVERSION_PASSDETAIL_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSDETAIL_H_
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.cpp b/compiler/plugins/input/Torch/InputConversion/Passes.cpp
similarity index 96%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.cpp
rename to compiler/plugins/input/Torch/InputConversion/Passes.cpp
index 722cb72..2dc4a92 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.cpp
+++ b/compiler/plugins/input/Torch/InputConversion/Passes.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "torch-iree/InputConversion/Passes.h"
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h"
 
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
@@ -23,7 +23,7 @@
 
 namespace {
 #define GEN_PASS_REGISTRATION
-#include "torch-iree/InputConversion/Passes.h.inc" // IWYU pragma: export
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h.inc" // IWYU pragma: export
 } // namespace
 
 void createTorchToIREEPipeline(
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.h b/compiler/plugins/input/Torch/InputConversion/Passes.h
similarity index 88%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.h
rename to compiler/plugins/input/Torch/InputConversion/Passes.h
index 8293b53..1abfab2 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.h
+++ b/compiler/plugins/input/Torch/InputConversion/Passes.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef TORCH_IREE_INPUTCONVERSION_PASSES_H_
-#define TORCH_IREE_INPUTCONVERSION_PASSES_H_
+#ifndef IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSES_H_
+#define IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSES_H_
 
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
@@ -45,4 +45,4 @@
 
 } // namespace mlir::iree_compiler::TorchInput
 
-#endif // TORCH_IREE_INPUTCONVERSION_PASSES_H_
+#endif // IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSES_H_
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.td b/compiler/plugins/input/Torch/InputConversion/Passes.td
similarity index 87%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.td
rename to compiler/plugins/input/Torch/InputConversion/Passes.td
index 25af601..dd527a1 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/Passes.td
+++ b/compiler/plugins/input/Torch/InputConversion/Passes.td
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef TORCH_IREE_INPUTCONVERSION_PASSES
-#define TORCH_IREE_INPUTCONVERSION_PASSES
+#ifndef IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSES
+#define IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSES
 
 include "mlir/Pass/PassBase.td"
 
@@ -32,9 +32,9 @@
   let summary = "Finalizes conversion from torch to IREE";
   let constructor = "mlir::iree_compiler::TorchInput::createFuncConversionPass()";
   let description = [{
-    Conversion pass for finalizing functions and ABI. Replaces the generic 
+    Conversion pass for finalizing functions and ABI. Replaces the generic
     torch-func-backend-type-conversion pass.
   }];
 }
 
-#endif // TORCH_IREE_INPUTCONVERSION_PASSES
+#endif // IREE_COMPILER_PLUGINS_INPUT_TORCH_INPUTCONVERSION_PASSES
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/SetStrictSymbolicShapes.cpp b/compiler/plugins/input/Torch/InputConversion/SetStrictSymbolicShapes.cpp
similarity index 90%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/SetStrictSymbolicShapes.cpp
rename to compiler/plugins/input/Torch/InputConversion/SetStrictSymbolicShapes.cpp
index 690051e..51dbc47 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/SetStrictSymbolicShapes.cpp
+++ b/compiler/plugins/input/Torch/InputConversion/SetStrictSymbolicShapes.cpp
@@ -12,9 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "compiler/plugins/input/Torch/InputConversion/PassDetail.h"
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h"
 #include "llvm/ADT/StringRef.h"
-#include "torch-iree/InputConversion/PassDetail.h"
-#include "torch-iree/InputConversion/Passes.h"
 
 static const llvm::StringLiteral kStrictSymbolsMarker =
     "torch.assume_strict_symbolic_shapes";
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/CMakeLists.txt b/compiler/plugins/input/Torch/InputConversion/test/CMakeLists.txt
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/CMakeLists.txt
rename to compiler/plugins/input/Torch/InputConversion/test/CMakeLists.txt
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/apply_pdl_patterns_torch.mlir b/compiler/plugins/input/Torch/InputConversion/test/apply_pdl_patterns_torch.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/apply_pdl_patterns_torch.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/apply_pdl_patterns_torch.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/assume_strict_symbols.mlir b/compiler/plugins/input/Torch/InputConversion/test/assume_strict_symbols.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/assume_strict_symbols.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/assume_strict_symbols.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/attention.mlir b/compiler/plugins/input/Torch/InputConversion/test/attention.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/attention.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/attention.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/auto_input_conversion.mlir b/compiler/plugins/input/Torch/InputConversion/test/auto_input_conversion.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/auto_input_conversion.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/auto_input_conversion.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/bitcast_quant_tensor.mlir b/compiler/plugins/input/Torch/InputConversion/test/bitcast_quant_tensor.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/bitcast_quant_tensor.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/bitcast_quant_tensor.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/func_conversion.mlir b/compiler/plugins/input/Torch/InputConversion/test/func_conversion.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/func_conversion.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/func_conversion.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/func_conversion_invalid.mlir b/compiler/plugins/input/Torch/InputConversion/test/func_conversion_invalid.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/func_conversion_invalid.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/func_conversion_invalid.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/scan.mlir b/compiler/plugins/input/Torch/InputConversion/test/scan.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/scan.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/scan.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/scatter.mlir b/compiler/plugins/input/Torch/InputConversion/test/scatter.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/scatter.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/scatter.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/sort.mlir b/compiler/plugins/input/Torch/InputConversion/test/sort.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/sort.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/sort.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/torch.pdl.mlir b/compiler/plugins/input/Torch/InputConversion/test/torch.pdl.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/torch.pdl.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/torch.pdl.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/test/torch_to_iree.mlir b/compiler/plugins/input/Torch/InputConversion/test/torch_to_iree.mlir
similarity index 100%
rename from compiler/plugins/input/Torch/torch-iree/InputConversion/test/torch_to_iree.mlir
rename to compiler/plugins/input/Torch/InputConversion/test/torch_to_iree.mlir
diff --git a/compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp b/compiler/plugins/input/Torch/PluginRegistration.cpp
similarity index 98%
rename from compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp
rename to compiler/plugins/input/Torch/PluginRegistration.cpp
index 965a146..b9a497f 100644
--- a/compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp
+++ b/compiler/plugins/input/Torch/PluginRegistration.cpp
@@ -4,12 +4,12 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
+#include "compiler/plugins/input/Torch/InputConversion/Passes.h"
 #include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/PluginAPI/Client.h"
 #include "mlir/Dialect/MLProgram/IR/MLProgram.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/PassManager.h"
-#include "torch-iree/InputConversion/Passes.h"
 #include "torch-mlir-dialects/Dialect/TMTensor/IR/TMTensorDialect.h"
 #include "torch-mlir/Conversion/Passes.h"
 #include "torch-mlir/Conversion/TorchOnnxToTorch/Passes.h"
diff --git a/compiler/plugins/input/Torch/torch-iree/CMakeLists.txt b/compiler/plugins/input/Torch/torch-iree/CMakeLists.txt
deleted file mode 100644
index 4e5a220..0000000
--- a/compiler/plugins/input/Torch/torch-iree/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2023 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-add_subdirectory(InputConversion)
-
-iree_cc_library(
-  NAME
-    registration
-  SRCS
-    "PluginRegistration.cpp"
-  DEPS
-    MLIRIR
-    MLIRMLProgramDialect
-    MLIRPass
-    iree::compiler::PluginAPI
-    torch-iree::InputConversion
-    torch-mlir::TorchConversionDialectIR
-    torch-mlir::TorchDialectIR
-    torch-mlir::TorchDialectPasses
-    torch-mlir::TorchOnnxToTorchPasses
-    torch-mlir::ConversionPasses
-    torch-mlir-dialects::TMTensorDialectIR
-  PUBLIC
-)
-
-iree_compiler_register_plugin(
-  PLUGIN_ID
-    input_torch
-  TARGET
-    ::registration
-)
diff --git a/compiler/plugins/input/Torch/torch-mlir/CMakeLists.txt b/compiler/plugins/input/Torch/torch-mlir/CMakeLists.txt
index c9c9302..0ae7932 100644
--- a/compiler/plugins/input/Torch/torch-mlir/CMakeLists.txt
+++ b/compiler/plugins/input/Torch/torch-mlir/CMakeLists.txt
@@ -176,7 +176,7 @@
     ::TorchConversionDialectTransformsGen
     ::TorchDialectIR
     ::ConversionPassesGen
-    torch-mlir-dialects::TMTensorDialectIR
+    iree::compiler::plugins::input::Torch::torch-mlir-dialects::TMTensorDialectIR
     MLIRArithDialect
     MLIRFuncDialect
     MLIRIR