Collapse LinalgExt into the main source tree (#16407)

The revision moves LinalgExt to compiler/Dialect, and fixes styles. The
python binding support is removed. It does not trigger any issues at
this moment. We can add it back if needed.

It retires an "unused" LinalgExt op (i.e.,`do_not_dce_operands`), which
is only used by TransformInterpreter. The TransformInterpreter.cpp
should be deprecated soon because we already have transform dialect
setup in IREE main tree.

The step to generate the revision:


https://github.com/openxla/iree/pull/16407/commits/502ca323af981ed8b2313fa958b3002b04115f6f:
Retire LinalgExt do_not_dce_operands op.


https://github.com/openxla/iree/pull/16407/commits/fddc0e51546e280c603d68070d6fee9cc7149be3:
Run `git mv` to move files; manually create BILD.bazel


https://github.com/openxla/iree/pull/16407/commits/66ce8a2d84888ad0962221e9bf5e02c17cf62c1e:
Remove LinalgExt from `llvm-external-projects/iree-dialects`.


https://github.com/openxla/iree/pull/16407/commits/37be17a27ff3258ad4763828ce9bfd214d752136
Update BUILD.bazel files with below commands:

```
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtDialect/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/IR/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtTransforms/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/Transforms/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtUtils/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/Utils/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtPasses/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/Transforms/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtTransformOps/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/TransformExtensions:LinalgExtExtensions/g" **/BUILD.bazel
```


https://github.com/openxla/iree/pull/16407/commits/a8b6dd0de47b28e88eddaca1b6a1c07d10b82f0d:
Manually fix BUILD and CMakeLists.txt
- They are not modeled by bazel_to_cmake.py
- LinalgExt/Transforms/BUILD.bazel missed a dep


https://github.com/openxla/iree/pull/16407/commits/e89ac64c73524527b62df0a3ec1d7cbc73309699:
Run below commands to fix includes.

```
sed -i '' -e "s/iree-dialects\/Dialect\/LinalgExt/iree\/compiler\/Dialect\/LinalgExt/g" **/*.td
sed -i '' -e "s/iree-dialects\/Dialect\/LinalgExt/iree\/compiler\/Dialect\/LinalgExt/g" **/*.h
sed -i '' -e "s/iree-dialects\/Dialect\/LinalgExt/iree\/compiler\/Dialect\/LinalgExt/g" **/*.cpp
sed -i '' -e "s/Dialect\/LinalgExt\/Passes/Dialect\/LinalgExt\/Transforms/g" **/*.cpp
sed -i '' -e "s/Dialect\/LinalgExt\/Passes/Dialect\/LinalgExt\/Transforms/g" **/*.h
sed -i '' -e "s/Dialect\/LinalgExt\/TransformOps\/LinalgExtTransformOps/Dialect\/LinalgExt\/TransformExtensions\/LinalgExtExtensionsOps/g" **/*.h
sed -i '' -e "s/Dialect\/LinalgExt\/TransformOps\/LinalgExtTransformOps/Dialect\/LinalgExt\/TransformExtensions\/LinalgExtExtensionsOps/g" **/*.cpp
```


https://github.com/openxla/iree/pull/16407/commits/c10e8ef5a7ee70fd155426915915c4bf3d9b1e37:
Replace iree-dialects-opt with iree-opt for LinalgExt tests


https://github.com/openxla/iree/pull/16407/commits/37a315b3452f63239a29f122f99de307f937a910:
Add iree. prefix to LinalgExtExtensionsOps.td and fix tests


https://github.com/openxla/iree/pull/16407/commits/f236ddb993ff1784ce5db4a653870b7f95d98307:
Run `buildifier compiler/**/BUILD.bazel`


https://github.com/openxla/iree/pull/16407/commits/1d10a1ebd29c9199e4f88c5d6bd8510730d844c7:
Run clang-format to fix headers


https://github.com/openxla/iree/pull/16407/commits/cdbf3ead407f49b9b45781314cadbb81d28a7002:
Fixed indef in headers with below commands.

```
sed -i '' -e "s/IREE_DIALECTS/IREE_COMPILER/g" **/*.h
```

Manually fixes the style:

-
https://github.com/openxla/iree/pull/16407/commits/4f8cf66948192f4d96e5110f8ec37fa65ef23551:
Add braces on simple single-statement bodies of if/else/loop
-
https://github.com/openxla/iree/pull/16407/commits/ee6236f4d28da26c9269e827665cc0ecc160de53:
Changing compiler namespaces to the new single-line syntax.
-
https://github.com/openxla/iree/pull/16407/commits/61e0fa9d222a307dfade1b654846a9dea03272af:
Use structured binding for llvm::enumerate
-
https://github.com/openxla/iree/pull/16407/commits/be5327d2b305b1249db75e9bab2e18cc0879d21d:
Replace llvm::zip with llvm::zip_equal

---------

Co-authored-by: Scott Todd <Scott.Todd@amd.com>
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel
index c3ab95f..4f6b80b 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel
+++ b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/BUILD.bazel
@@ -95,10 +95,10 @@
         ":PassHeaders",
         "//compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/Preprocessing",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:AffineUtils",
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt
index da10b25..09889a5 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt
+++ b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/CMakeLists.txt
@@ -73,7 +73,6 @@
     ::CHLODecompositionPatterns
     ::PassHeaders
     ChloOps
-    IREELinalgExtDialect
     LLVMSupport
     MLIRAffineDialect
     MLIRAffineUtils
@@ -102,6 +101,7 @@
     StablehloBroadcastUtils
     StablehloOps
     iree::compiler::Dialect::Flow::IR
+    iree::compiler::Dialect::LinalgExt::IR
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
     iree::compiler::Utils
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp
index 4778c34..ae93778 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp
+++ b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToIREEInputDialects.cpp
@@ -7,8 +7,8 @@
 // Implements IREE-specific logic for lowering StableHLO dialect to
 // IREE dialects: Linalg, Arith, Math, Tensor, Util, ML Program, etc.
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.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"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Utils/ConversionUtils.h"
diff --git a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp
index cc27b85..0505d26 100644
--- a/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp
+++ b/compiler/plugins/input/StableHLO/stablehlo-iree/Conversion/StableHLOToLinalgExt.cpp
@@ -11,10 +11,10 @@
 #include <complex>
 #include <memory>
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.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"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel
index 348c58b..8834f2e 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel
+++ b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/BUILD.bazel
@@ -40,7 +40,7 @@
     ],
     deps = [
         ":PassesIncGen",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "@llvm-project//mlir:ArithDialect",
         "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:FunctionInterfaces",
@@ -70,8 +70,8 @@
     deps = [
         ":PassHeaders",
         ":PassesIncGen",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/InputConversion/Common",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "@llvm-project//mlir:ArithDialect",
         "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:FunctionInterfaces",
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt
index cb9a27d..4897917 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt
+++ b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/CMakeLists.txt
@@ -31,7 +31,6 @@
     "Passes.h.inc"
   DEPS
     ::PassesIncGen
-    IREELinalgExtDialect
     MLIRArithDialect
     MLIRFuncDialect
     MLIRFunctionInterfaces
@@ -39,6 +38,7 @@
     MLIRPass
     MLIRTensorDialect
     MLIRTransforms
+    iree::compiler::Dialect::LinalgExt::IR
   PUBLIC
 )
 
@@ -59,7 +59,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
     MLIRArithDialect
     MLIRFuncDialect
     MLIRFunctionInterfaces
@@ -75,6 +74,7 @@
     MLIRTosaToSCF
     MLIRTosaToTensor
     MLIRTransforms
+    iree::compiler::Dialect::LinalgExt::IR
     iree::compiler::InputConversion::Common
   PUBLIC
 )
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h
index 498b4d3..07422cc 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h
+++ b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/PassDetail.h
@@ -7,7 +7,7 @@
 #ifndef TOSA_IREE_INPUTCONVERSION_PASSDETAIL_H_
 #define TOSA_IREE_INPUTCONVERSION_PASSDETAIL_H_
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp
index ac58d1e..f762d74 100644
--- a/compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp
+++ b/compiler/plugins/input/TOSA/tosa-iree/InputConversion/TosaToLinalgExt.cpp
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt b/compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt
index bf26ac3..dedf298 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt
+++ b/compiler/plugins/input/Torch/torch-iree/InputConversion/CMakeLists.txt
@@ -42,7 +42,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
     MLIRFuncDialect
     MLIRIR
     MLIRMemRefDialect
@@ -54,5 +53,6 @@
     torch-mlir::TorchDialectPasses
     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/torch-iree/InputConversion/ConvertTMTensorToLinalgExt.cpp
index fa51b55..72a787b 100644
--- a/compiler/plugins/input/Torch/torch-iree/InputConversion/ConvertTMTensorToLinalgExt.cpp
+++ b/compiler/plugins/input/Torch/torch-iree/InputConversion/ConvertTMTensorToLinalgExt.cpp
@@ -7,8 +7,8 @@
 #include <cstdint>
 #include <numeric>
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.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"
diff --git a/compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp b/compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp
index e360f0b..a0a9a08 100644
--- a/compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp
+++ b/compiler/plugins/input/Torch/torch-iree/PluginRegistration.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.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"
diff --git a/compiler/plugins/target/VMVX/BUILD.bazel b/compiler/plugins/target/VMVX/BUILD.bazel
index 5d4979e..6d6c7d7 100644
--- a/compiler/plugins/target/VMVX/BUILD.bazel
+++ b/compiler/plugins/target/VMVX/BUILD.bazel
@@ -26,6 +26,7 @@
         "//compiler/src/iree/compiler/Codegen/Dialect/Codegen/IR:IREECodegenDialect",
         "//compiler/src/iree/compiler/Codegen/VMVX",
         "//compiler/src/iree/compiler/Dialect/HAL/Target",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/Dialect/VM/Conversion",
         "//compiler/src/iree/compiler/Dialect/VM/IR",
         "//compiler/src/iree/compiler/Dialect/VM/Target/Bytecode",
@@ -33,7 +34,6 @@
         "//compiler/src/iree/compiler/Dialect/VMVX/IR:VMVXDialect",
         "//compiler/src/iree/compiler/Dialect/VMVX/Transforms",
         "//compiler/src/iree/compiler/PluginAPI",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
diff --git a/compiler/plugins/target/VMVX/CMakeLists.txt b/compiler/plugins/target/VMVX/CMakeLists.txt
index 9a19bd9..a3124f3 100644
--- a/compiler/plugins/target/VMVX/CMakeLists.txt
+++ b/compiler/plugins/target/VMVX/CMakeLists.txt
@@ -23,7 +23,6 @@
   SRCS
     "VMVXTarget.cpp"
   DEPS
-    IREELinalgExtDialect
     LLVMSupport
     MLIRIR
     MLIRPass
@@ -31,6 +30,7 @@
     iree::compiler::Codegen::Dialect::Codegen::IR::IREECodegenDialect
     iree::compiler::Codegen::VMVX
     iree::compiler::Dialect::HAL::Target
+    iree::compiler::Dialect::LinalgExt::IR
     iree::compiler::Dialect::VM::Conversion
     iree::compiler::Dialect::VM::IR
     iree::compiler::Dialect::VM::Target::Bytecode
diff --git a/compiler/plugins/target/VMVX/VMVXTarget.cpp b/compiler/plugins/target/VMVX/VMVXTarget.cpp
index b402586..bd5eae4 100644
--- a/compiler/plugins/target/VMVX/VMVXTarget.cpp
+++ b/compiler/plugins/target/VMVX/VMVXTarget.cpp
@@ -4,10 +4,10 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/VMVX/Passes.h"
 #include "iree/compiler/Dialect/HAL/Target/TargetRegistry.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Dialect/VM/Conversion/ConversionTarget.h"
 #include "iree/compiler/Dialect/VM/IR/VMDialect.h"
 #include "iree/compiler/Dialect/VM/Target/Bytecode/BytecodeModuleTarget.h"
diff --git a/compiler/src/iree/compiler/API/api_exports.c b/compiler/src/iree/compiler/API/api_exports.c
index b27c81f..29f09c8 100644
--- a/compiler/src/iree/compiler/API/api_exports.c
+++ b/compiler/src/iree/compiler/API/api_exports.c
@@ -17,10 +17,12 @@
 extern void ireeCompilerGetRevision();
 extern void ireeCompilerGlobalInitialize();
 extern void ireeCompilerGlobalShutdown();
+extern void ireeCompilerInitializeContext();
 extern void ireeCompilerInvocationCreate();
 extern void ireeCompilerInvocationDestroy();
 extern void ireeCompilerInvocationEnableCallbackDiagnostics();
 extern void ireeCompilerInvocationEnableConsoleDiagnostics();
+extern void ireeCompilerInvocationExportStealModule();
 extern void ireeCompilerInvocationImportBorrowModule();
 extern void ireeCompilerInvocationImportStealModule();
 extern void ireeCompilerInvocationOutputHALExecutable();
@@ -58,6 +60,7 @@
 extern void ireeCompilerSourceWrapBuffer();
 extern void ireeMlirLspServerRunMain();
 extern void ireeOptRunMain();
+extern void ireeReduceRunMain();
 extern void ireeRegisterTransformExtensions();
 extern void mlirAffineAddExprGet();
 extern void mlirAffineBinaryOpExprGetLHS();
@@ -126,6 +129,9 @@
 extern void mlirArrayAttrGetElement();
 extern void mlirArrayAttrGetNumElements();
 extern void mlirArrayAttrGetTypeID();
+extern void mlirAsmStateCreateForOperation();
+extern void mlirAsmStateCreateForValue();
+extern void mlirAsmStateDestroy();
 extern void mlirAttributeDump();
 extern void mlirAttributeEqual();
 extern void mlirAttributeGetContext();
@@ -146,6 +152,7 @@
 extern void mlirAttributeIsADenseI64Array();
 extern void mlirAttributeIsADenseI8Array();
 extern void mlirAttributeIsADenseIntElements();
+extern void mlirAttributeIsADenseResourceElements();
 extern void mlirAttributeIsADictionary();
 extern void mlirAttributeIsAElements();
 extern void mlirAttributeIsAFlatSymbolRef();
@@ -339,6 +346,7 @@
 extern void mlirFloatAttrGetTypeID();
 extern void mlirFloatAttrGetValueDouble();
 extern void mlirFloatTF32TypeGetTypeID();
+extern void mlirFloatTypeGetWidth();
 extern void mlirFunctionTypeGet();
 extern void mlirFunctionTypeGetInput();
 extern void mlirFunctionTypeGetNumInputs();
@@ -346,7 +354,6 @@
 extern void mlirFunctionTypeGetResult();
 extern void mlirFunctionTypeGetTypeID();
 extern void mlirGetDialectHandle__iree_input__();
-extern void mlirGetDialectHandle__iree_linalg_ext__();
 extern void mlirGetDialectHandle__transform__();
 extern void mlirIREELinalgTransformRegisterPasses();
 extern void mlirIREETransformRegisterPasses();
@@ -411,6 +418,7 @@
 extern void mlirMemRefTypeGetChecked();
 extern void mlirMemRefTypeGetLayout();
 extern void mlirMemRefTypeGetMemorySpace();
+extern void mlirMemRefTypeGetStridesAndOffset();
 extern void mlirMemRefTypeGetTypeID();
 extern void mlirModuleCreateEmpty();
 extern void mlirModuleCreateParse();
@@ -425,6 +433,7 @@
 extern void mlirOpOperandGetNextUse();
 extern void mlirOpOperandGetOperandNumber();
 extern void mlirOpOperandGetOwner();
+extern void mlirOpOperandGetValue();
 extern void mlirOpOperandIsNull();
 extern void mlirOpPassManagerAddOwnedPass();
 extern void mlirOpPassManagerAddPipeline();
@@ -456,11 +465,15 @@
 extern void mlirOperationGetAttributeByName();
 extern void mlirOperationGetBlock();
 extern void mlirOperationGetContext();
+extern void mlirOperationGetDiscardableAttribute();
+extern void mlirOperationGetDiscardableAttributeByName();
 extern void mlirOperationGetFirstRegion();
+extern void mlirOperationGetInherentAttributeByName();
 extern void mlirOperationGetLocation();
 extern void mlirOperationGetName();
 extern void mlirOperationGetNextInBlock();
 extern void mlirOperationGetNumAttributes();
+extern void mlirOperationGetNumDiscardableAttributes();
 extern void mlirOperationGetNumOperands();
 extern void mlirOperationGetNumRegions();
 extern void mlirOperationGetNumResults();
@@ -471,17 +484,23 @@
 extern void mlirOperationGetResult();
 extern void mlirOperationGetSuccessor();
 extern void mlirOperationGetTypeID();
+extern void mlirOperationHasInherentAttributeByName();
 extern void mlirOperationImplementsInterface();
 extern void mlirOperationImplementsInterfaceStatic();
 extern void mlirOperationMoveAfter();
 extern void mlirOperationMoveBefore();
 extern void mlirOperationPrint();
 extern void mlirOperationPrintWithFlags();
+extern void mlirOperationPrintWithState();
 extern void mlirOperationRemoveAttributeByName();
+extern void mlirOperationRemoveDiscardableAttributeByName();
 extern void mlirOperationRemoveFromParent();
 extern void mlirOperationSetAttributeByName();
+extern void mlirOperationSetDiscardableAttributeByName();
+extern void mlirOperationSetInherentAttributeByName();
 extern void mlirOperationSetOperand();
 extern void mlirOperationSetOperands();
+extern void mlirOperationSetSuccessor();
 extern void mlirOperationStateAddAttributes();
 extern void mlirOperationStateAddOperands();
 extern void mlirOperationStateAddOwnedRegions();
@@ -490,6 +509,7 @@
 extern void mlirOperationStateEnableResultTypeInference();
 extern void mlirOperationStateGet();
 extern void mlirOperationVerify();
+extern void mlirOperationWalk();
 extern void mlirOperationWriteBytecode();
 extern void mlirOperationWriteBytecodeWithConfig();
 extern void mlirPDLAttributeTypeGet();
@@ -566,9 +586,17 @@
 extern void mlirSymbolTableWalkSymbolTables();
 extern void mlirTF32TypeGet();
 extern void mlirTransformAnyOpTypeGet();
+extern void mlirTransformAnyOpTypeGetTypeID();
+extern void mlirTransformAnyParamTypeGet();
+extern void mlirTransformAnyParamTypeGetTypeID();
+extern void mlirTransformAnyValueTypeGet();
+extern void mlirTransformAnyValueTypeGetTypeID();
 extern void mlirTransformOperationTypeGet();
 extern void mlirTransformOperationTypeGetOperationName();
 extern void mlirTransformOperationTypeGetTypeID();
+extern void mlirTransformParamTypeGet();
+extern void mlirTransformParamTypeGetType();
+extern void mlirTransformParamTypeGetTypeID();
 extern void mlirTupleTypeGet();
 extern void mlirTupleTypeGetNumTypes();
 extern void mlirTupleTypeGetType();
@@ -592,6 +620,7 @@
 extern void mlirTypeIsAF16();
 extern void mlirTypeIsAF32();
 extern void mlirTypeIsAF64();
+extern void mlirTypeIsAFloat();
 extern void mlirTypeIsAFloat8E4M3B11FNUZ();
 extern void mlirTypeIsAFloat8E4M3FN();
 extern void mlirTypeIsAFloat8E4M3FNUZ();
@@ -614,7 +643,10 @@
 extern void mlirTypeIsATF32();
 extern void mlirTypeIsATensor();
 extern void mlirTypeIsATransformAnyOpType();
+extern void mlirTypeIsATransformAnyParamType();
+extern void mlirTypeIsATransformAnyValueType();
 extern void mlirTypeIsATransformOperationType();
+extern void mlirTypeIsATransformParamType();
 extern void mlirTypeIsATuple();
 extern void mlirTypeIsAUnrankedMemRef();
 extern void mlirTypeIsAUnrankedTensor();
@@ -630,6 +662,7 @@
 extern void mlirUnmanagedDenseInt32ResourceElementsAttrGet();
 extern void mlirUnmanagedDenseInt64ResourceElementsAttrGet();
 extern void mlirUnmanagedDenseInt8ResourceElementsAttrGet();
+extern void mlirUnmanagedDenseResourceElementsAttrGet();
 extern void mlirUnmanagedDenseUInt16ResourceElementsAttrGet();
 extern void mlirUnmanagedDenseUInt32ResourceElementsAttrGet();
 extern void mlirUnmanagedDenseUInt64ResourceElementsAttrGet();
@@ -653,7 +686,11 @@
 extern void mlirValueSetType();
 extern void mlirVectorTypeGet();
 extern void mlirVectorTypeGetChecked();
+extern void mlirVectorTypeGetScalable();
+extern void mlirVectorTypeGetScalableChecked();
 extern void mlirVectorTypeGetTypeID();
+extern void mlirVectorTypeIsDimScalable();
+extern void mlirVectorTypeIsScalable();
 
 uintptr_t __iree_compiler_hidden_force_extern() {
   uintptr_t x = 0;
@@ -666,10 +703,12 @@
   x += (uintptr_t)&ireeCompilerGetRevision;
   x += (uintptr_t)&ireeCompilerGlobalInitialize;
   x += (uintptr_t)&ireeCompilerGlobalShutdown;
+  x += (uintptr_t)&ireeCompilerInitializeContext;
   x += (uintptr_t)&ireeCompilerInvocationCreate;
   x += (uintptr_t)&ireeCompilerInvocationDestroy;
   x += (uintptr_t)&ireeCompilerInvocationEnableCallbackDiagnostics;
   x += (uintptr_t)&ireeCompilerInvocationEnableConsoleDiagnostics;
+  x += (uintptr_t)&ireeCompilerInvocationExportStealModule;
   x += (uintptr_t)&ireeCompilerInvocationImportBorrowModule;
   x += (uintptr_t)&ireeCompilerInvocationImportStealModule;
   x += (uintptr_t)&ireeCompilerInvocationOutputHALExecutable;
@@ -707,6 +746,7 @@
   x += (uintptr_t)&ireeCompilerSourceWrapBuffer;
   x += (uintptr_t)&ireeMlirLspServerRunMain;
   x += (uintptr_t)&ireeOptRunMain;
+  x += (uintptr_t)&ireeReduceRunMain;
   x += (uintptr_t)&ireeRegisterTransformExtensions;
   x += (uintptr_t)&mlirAffineAddExprGet;
   x += (uintptr_t)&mlirAffineBinaryOpExprGetLHS;
@@ -775,6 +815,9 @@
   x += (uintptr_t)&mlirArrayAttrGetElement;
   x += (uintptr_t)&mlirArrayAttrGetNumElements;
   x += (uintptr_t)&mlirArrayAttrGetTypeID;
+  x += (uintptr_t)&mlirAsmStateCreateForOperation;
+  x += (uintptr_t)&mlirAsmStateCreateForValue;
+  x += (uintptr_t)&mlirAsmStateDestroy;
   x += (uintptr_t)&mlirAttributeDump;
   x += (uintptr_t)&mlirAttributeEqual;
   x += (uintptr_t)&mlirAttributeGetContext;
@@ -795,6 +838,7 @@
   x += (uintptr_t)&mlirAttributeIsADenseI64Array;
   x += (uintptr_t)&mlirAttributeIsADenseI8Array;
   x += (uintptr_t)&mlirAttributeIsADenseIntElements;
+  x += (uintptr_t)&mlirAttributeIsADenseResourceElements;
   x += (uintptr_t)&mlirAttributeIsADictionary;
   x += (uintptr_t)&mlirAttributeIsAElements;
   x += (uintptr_t)&mlirAttributeIsAFlatSymbolRef;
@@ -988,6 +1032,7 @@
   x += (uintptr_t)&mlirFloatAttrGetTypeID;
   x += (uintptr_t)&mlirFloatAttrGetValueDouble;
   x += (uintptr_t)&mlirFloatTF32TypeGetTypeID;
+  x += (uintptr_t)&mlirFloatTypeGetWidth;
   x += (uintptr_t)&mlirFunctionTypeGet;
   x += (uintptr_t)&mlirFunctionTypeGetInput;
   x += (uintptr_t)&mlirFunctionTypeGetNumInputs;
@@ -995,7 +1040,6 @@
   x += (uintptr_t)&mlirFunctionTypeGetResult;
   x += (uintptr_t)&mlirFunctionTypeGetTypeID;
   x += (uintptr_t)&mlirGetDialectHandle__iree_input__;
-  x += (uintptr_t)&mlirGetDialectHandle__iree_linalg_ext__;
   x += (uintptr_t)&mlirGetDialectHandle__transform__;
   x += (uintptr_t)&mlirIREELinalgTransformRegisterPasses;
   x += (uintptr_t)&mlirIREETransformRegisterPasses;
@@ -1060,6 +1104,7 @@
   x += (uintptr_t)&mlirMemRefTypeGetChecked;
   x += (uintptr_t)&mlirMemRefTypeGetLayout;
   x += (uintptr_t)&mlirMemRefTypeGetMemorySpace;
+  x += (uintptr_t)&mlirMemRefTypeGetStridesAndOffset;
   x += (uintptr_t)&mlirMemRefTypeGetTypeID;
   x += (uintptr_t)&mlirModuleCreateEmpty;
   x += (uintptr_t)&mlirModuleCreateParse;
@@ -1074,6 +1119,7 @@
   x += (uintptr_t)&mlirOpOperandGetNextUse;
   x += (uintptr_t)&mlirOpOperandGetOperandNumber;
   x += (uintptr_t)&mlirOpOperandGetOwner;
+  x += (uintptr_t)&mlirOpOperandGetValue;
   x += (uintptr_t)&mlirOpOperandIsNull;
   x += (uintptr_t)&mlirOpPassManagerAddOwnedPass;
   x += (uintptr_t)&mlirOpPassManagerAddPipeline;
@@ -1105,11 +1151,15 @@
   x += (uintptr_t)&mlirOperationGetAttributeByName;
   x += (uintptr_t)&mlirOperationGetBlock;
   x += (uintptr_t)&mlirOperationGetContext;
+  x += (uintptr_t)&mlirOperationGetDiscardableAttribute;
+  x += (uintptr_t)&mlirOperationGetDiscardableAttributeByName;
   x += (uintptr_t)&mlirOperationGetFirstRegion;
+  x += (uintptr_t)&mlirOperationGetInherentAttributeByName;
   x += (uintptr_t)&mlirOperationGetLocation;
   x += (uintptr_t)&mlirOperationGetName;
   x += (uintptr_t)&mlirOperationGetNextInBlock;
   x += (uintptr_t)&mlirOperationGetNumAttributes;
+  x += (uintptr_t)&mlirOperationGetNumDiscardableAttributes;
   x += (uintptr_t)&mlirOperationGetNumOperands;
   x += (uintptr_t)&mlirOperationGetNumRegions;
   x += (uintptr_t)&mlirOperationGetNumResults;
@@ -1120,17 +1170,23 @@
   x += (uintptr_t)&mlirOperationGetResult;
   x += (uintptr_t)&mlirOperationGetSuccessor;
   x += (uintptr_t)&mlirOperationGetTypeID;
+  x += (uintptr_t)&mlirOperationHasInherentAttributeByName;
   x += (uintptr_t)&mlirOperationImplementsInterface;
   x += (uintptr_t)&mlirOperationImplementsInterfaceStatic;
   x += (uintptr_t)&mlirOperationMoveAfter;
   x += (uintptr_t)&mlirOperationMoveBefore;
   x += (uintptr_t)&mlirOperationPrint;
   x += (uintptr_t)&mlirOperationPrintWithFlags;
+  x += (uintptr_t)&mlirOperationPrintWithState;
   x += (uintptr_t)&mlirOperationRemoveAttributeByName;
+  x += (uintptr_t)&mlirOperationRemoveDiscardableAttributeByName;
   x += (uintptr_t)&mlirOperationRemoveFromParent;
   x += (uintptr_t)&mlirOperationSetAttributeByName;
+  x += (uintptr_t)&mlirOperationSetDiscardableAttributeByName;
+  x += (uintptr_t)&mlirOperationSetInherentAttributeByName;
   x += (uintptr_t)&mlirOperationSetOperand;
   x += (uintptr_t)&mlirOperationSetOperands;
+  x += (uintptr_t)&mlirOperationSetSuccessor;
   x += (uintptr_t)&mlirOperationStateAddAttributes;
   x += (uintptr_t)&mlirOperationStateAddOperands;
   x += (uintptr_t)&mlirOperationStateAddOwnedRegions;
@@ -1139,6 +1195,7 @@
   x += (uintptr_t)&mlirOperationStateEnableResultTypeInference;
   x += (uintptr_t)&mlirOperationStateGet;
   x += (uintptr_t)&mlirOperationVerify;
+  x += (uintptr_t)&mlirOperationWalk;
   x += (uintptr_t)&mlirOperationWriteBytecode;
   x += (uintptr_t)&mlirOperationWriteBytecodeWithConfig;
   x += (uintptr_t)&mlirPDLAttributeTypeGet;
@@ -1215,9 +1272,17 @@
   x += (uintptr_t)&mlirSymbolTableWalkSymbolTables;
   x += (uintptr_t)&mlirTF32TypeGet;
   x += (uintptr_t)&mlirTransformAnyOpTypeGet;
+  x += (uintptr_t)&mlirTransformAnyOpTypeGetTypeID;
+  x += (uintptr_t)&mlirTransformAnyParamTypeGet;
+  x += (uintptr_t)&mlirTransformAnyParamTypeGetTypeID;
+  x += (uintptr_t)&mlirTransformAnyValueTypeGet;
+  x += (uintptr_t)&mlirTransformAnyValueTypeGetTypeID;
   x += (uintptr_t)&mlirTransformOperationTypeGet;
   x += (uintptr_t)&mlirTransformOperationTypeGetOperationName;
   x += (uintptr_t)&mlirTransformOperationTypeGetTypeID;
+  x += (uintptr_t)&mlirTransformParamTypeGet;
+  x += (uintptr_t)&mlirTransformParamTypeGetType;
+  x += (uintptr_t)&mlirTransformParamTypeGetTypeID;
   x += (uintptr_t)&mlirTupleTypeGet;
   x += (uintptr_t)&mlirTupleTypeGetNumTypes;
   x += (uintptr_t)&mlirTupleTypeGetType;
@@ -1241,6 +1306,7 @@
   x += (uintptr_t)&mlirTypeIsAF16;
   x += (uintptr_t)&mlirTypeIsAF32;
   x += (uintptr_t)&mlirTypeIsAF64;
+  x += (uintptr_t)&mlirTypeIsAFloat;
   x += (uintptr_t)&mlirTypeIsAFloat8E4M3B11FNUZ;
   x += (uintptr_t)&mlirTypeIsAFloat8E4M3FN;
   x += (uintptr_t)&mlirTypeIsAFloat8E4M3FNUZ;
@@ -1263,7 +1329,10 @@
   x += (uintptr_t)&mlirTypeIsATF32;
   x += (uintptr_t)&mlirTypeIsATensor;
   x += (uintptr_t)&mlirTypeIsATransformAnyOpType;
+  x += (uintptr_t)&mlirTypeIsATransformAnyParamType;
+  x += (uintptr_t)&mlirTypeIsATransformAnyValueType;
   x += (uintptr_t)&mlirTypeIsATransformOperationType;
+  x += (uintptr_t)&mlirTypeIsATransformParamType;
   x += (uintptr_t)&mlirTypeIsATuple;
   x += (uintptr_t)&mlirTypeIsAUnrankedMemRef;
   x += (uintptr_t)&mlirTypeIsAUnrankedTensor;
@@ -1279,6 +1348,7 @@
   x += (uintptr_t)&mlirUnmanagedDenseInt32ResourceElementsAttrGet;
   x += (uintptr_t)&mlirUnmanagedDenseInt64ResourceElementsAttrGet;
   x += (uintptr_t)&mlirUnmanagedDenseInt8ResourceElementsAttrGet;
+  x += (uintptr_t)&mlirUnmanagedDenseResourceElementsAttrGet;
   x += (uintptr_t)&mlirUnmanagedDenseUInt16ResourceElementsAttrGet;
   x += (uintptr_t)&mlirUnmanagedDenseUInt32ResourceElementsAttrGet;
   x += (uintptr_t)&mlirUnmanagedDenseUInt64ResourceElementsAttrGet;
@@ -1302,6 +1372,10 @@
   x += (uintptr_t)&mlirValueSetType;
   x += (uintptr_t)&mlirVectorTypeGet;
   x += (uintptr_t)&mlirVectorTypeGetChecked;
+  x += (uintptr_t)&mlirVectorTypeGetScalable;
+  x += (uintptr_t)&mlirVectorTypeGetScalableChecked;
   x += (uintptr_t)&mlirVectorTypeGetTypeID;
+  x += (uintptr_t)&mlirVectorTypeIsDimScalable;
+  x += (uintptr_t)&mlirVectorTypeIsScalable;
   return x;
 }
diff --git a/compiler/src/iree/compiler/API/api_exports.def b/compiler/src/iree/compiler/API/api_exports.def
index e016464..614194d 100644
--- a/compiler/src/iree/compiler/API/api_exports.def
+++ b/compiler/src/iree/compiler/API/api_exports.def
@@ -9,10 +9,12 @@
   ireeCompilerGetRevision
   ireeCompilerGlobalInitialize
   ireeCompilerGlobalShutdown
+  ireeCompilerInitializeContext
   ireeCompilerInvocationCreate
   ireeCompilerInvocationDestroy
   ireeCompilerInvocationEnableCallbackDiagnostics
   ireeCompilerInvocationEnableConsoleDiagnostics
+  ireeCompilerInvocationExportStealModule
   ireeCompilerInvocationImportBorrowModule
   ireeCompilerInvocationImportStealModule
   ireeCompilerInvocationOutputHALExecutable
@@ -50,6 +52,7 @@
   ireeCompilerSourceWrapBuffer
   ireeMlirLspServerRunMain
   ireeOptRunMain
+  ireeReduceRunMain
   ireeRegisterTransformExtensions
   mlirAffineAddExprGet
   mlirAffineBinaryOpExprGetLHS
@@ -118,6 +121,9 @@
   mlirArrayAttrGetElement
   mlirArrayAttrGetNumElements
   mlirArrayAttrGetTypeID
+  mlirAsmStateCreateForOperation
+  mlirAsmStateCreateForValue
+  mlirAsmStateDestroy
   mlirAttributeDump
   mlirAttributeEqual
   mlirAttributeGetContext
@@ -138,6 +144,7 @@
   mlirAttributeIsADenseI64Array
   mlirAttributeIsADenseI8Array
   mlirAttributeIsADenseIntElements
+  mlirAttributeIsADenseResourceElements
   mlirAttributeIsADictionary
   mlirAttributeIsAElements
   mlirAttributeIsAFlatSymbolRef
@@ -331,6 +338,7 @@
   mlirFloatAttrGetTypeID
   mlirFloatAttrGetValueDouble
   mlirFloatTF32TypeGetTypeID
+  mlirFloatTypeGetWidth
   mlirFunctionTypeGet
   mlirFunctionTypeGetInput
   mlirFunctionTypeGetNumInputs
@@ -338,7 +346,6 @@
   mlirFunctionTypeGetResult
   mlirFunctionTypeGetTypeID
   mlirGetDialectHandle__iree_input__
-  mlirGetDialectHandle__iree_linalg_ext__
   mlirGetDialectHandle__transform__
   mlirIREELinalgTransformRegisterPasses
   mlirIREETransformRegisterPasses
@@ -403,6 +410,7 @@
   mlirMemRefTypeGetChecked
   mlirMemRefTypeGetLayout
   mlirMemRefTypeGetMemorySpace
+  mlirMemRefTypeGetStridesAndOffset
   mlirMemRefTypeGetTypeID
   mlirModuleCreateEmpty
   mlirModuleCreateParse
@@ -417,6 +425,7 @@
   mlirOpOperandGetNextUse
   mlirOpOperandGetOperandNumber
   mlirOpOperandGetOwner
+  mlirOpOperandGetValue
   mlirOpOperandIsNull
   mlirOpPassManagerAddOwnedPass
   mlirOpPassManagerAddPipeline
@@ -448,11 +457,15 @@
   mlirOperationGetAttributeByName
   mlirOperationGetBlock
   mlirOperationGetContext
+  mlirOperationGetDiscardableAttribute
+  mlirOperationGetDiscardableAttributeByName
   mlirOperationGetFirstRegion
+  mlirOperationGetInherentAttributeByName
   mlirOperationGetLocation
   mlirOperationGetName
   mlirOperationGetNextInBlock
   mlirOperationGetNumAttributes
+  mlirOperationGetNumDiscardableAttributes
   mlirOperationGetNumOperands
   mlirOperationGetNumRegions
   mlirOperationGetNumResults
@@ -463,17 +476,23 @@
   mlirOperationGetResult
   mlirOperationGetSuccessor
   mlirOperationGetTypeID
+  mlirOperationHasInherentAttributeByName
   mlirOperationImplementsInterface
   mlirOperationImplementsInterfaceStatic
   mlirOperationMoveAfter
   mlirOperationMoveBefore
   mlirOperationPrint
   mlirOperationPrintWithFlags
+  mlirOperationPrintWithState
   mlirOperationRemoveAttributeByName
+  mlirOperationRemoveDiscardableAttributeByName
   mlirOperationRemoveFromParent
   mlirOperationSetAttributeByName
+  mlirOperationSetDiscardableAttributeByName
+  mlirOperationSetInherentAttributeByName
   mlirOperationSetOperand
   mlirOperationSetOperands
+  mlirOperationSetSuccessor
   mlirOperationStateAddAttributes
   mlirOperationStateAddOperands
   mlirOperationStateAddOwnedRegions
@@ -482,6 +501,7 @@
   mlirOperationStateEnableResultTypeInference
   mlirOperationStateGet
   mlirOperationVerify
+  mlirOperationWalk
   mlirOperationWriteBytecode
   mlirOperationWriteBytecodeWithConfig
   mlirPDLAttributeTypeGet
@@ -558,9 +578,17 @@
   mlirSymbolTableWalkSymbolTables
   mlirTF32TypeGet
   mlirTransformAnyOpTypeGet
+  mlirTransformAnyOpTypeGetTypeID
+  mlirTransformAnyParamTypeGet
+  mlirTransformAnyParamTypeGetTypeID
+  mlirTransformAnyValueTypeGet
+  mlirTransformAnyValueTypeGetTypeID
   mlirTransformOperationTypeGet
   mlirTransformOperationTypeGetOperationName
   mlirTransformOperationTypeGetTypeID
+  mlirTransformParamTypeGet
+  mlirTransformParamTypeGetType
+  mlirTransformParamTypeGetTypeID
   mlirTupleTypeGet
   mlirTupleTypeGetNumTypes
   mlirTupleTypeGetType
@@ -584,6 +612,7 @@
   mlirTypeIsAF16
   mlirTypeIsAF32
   mlirTypeIsAF64
+  mlirTypeIsAFloat
   mlirTypeIsAFloat8E4M3B11FNUZ
   mlirTypeIsAFloat8E4M3FN
   mlirTypeIsAFloat8E4M3FNUZ
@@ -606,7 +635,10 @@
   mlirTypeIsATF32
   mlirTypeIsATensor
   mlirTypeIsATransformAnyOpType
+  mlirTypeIsATransformAnyParamType
+  mlirTypeIsATransformAnyValueType
   mlirTypeIsATransformOperationType
+  mlirTypeIsATransformParamType
   mlirTypeIsATuple
   mlirTypeIsAUnrankedMemRef
   mlirTypeIsAUnrankedTensor
@@ -622,6 +654,7 @@
   mlirUnmanagedDenseInt32ResourceElementsAttrGet
   mlirUnmanagedDenseInt64ResourceElementsAttrGet
   mlirUnmanagedDenseInt8ResourceElementsAttrGet
+  mlirUnmanagedDenseResourceElementsAttrGet
   mlirUnmanagedDenseUInt16ResourceElementsAttrGet
   mlirUnmanagedDenseUInt32ResourceElementsAttrGet
   mlirUnmanagedDenseUInt64ResourceElementsAttrGet
@@ -645,4 +678,8 @@
   mlirValueSetType
   mlirVectorTypeGet
   mlirVectorTypeGetChecked
+  mlirVectorTypeGetScalable
+  mlirVectorTypeGetScalableChecked
   mlirVectorTypeGetTypeID
+  mlirVectorTypeIsDimScalable
+  mlirVectorTypeIsScalable
diff --git a/compiler/src/iree/compiler/API/api_exports.ld b/compiler/src/iree/compiler/API/api_exports.ld
index 8f1cdb4..6d2c287 100644
--- a/compiler/src/iree/compiler/API/api_exports.ld
+++ b/compiler/src/iree/compiler/API/api_exports.ld
@@ -10,10 +10,12 @@
     ireeCompilerGetRevision;
     ireeCompilerGlobalInitialize;
     ireeCompilerGlobalShutdown;
+    ireeCompilerInitializeContext;
     ireeCompilerInvocationCreate;
     ireeCompilerInvocationDestroy;
     ireeCompilerInvocationEnableCallbackDiagnostics;
     ireeCompilerInvocationEnableConsoleDiagnostics;
+    ireeCompilerInvocationExportStealModule;
     ireeCompilerInvocationImportBorrowModule;
     ireeCompilerInvocationImportStealModule;
     ireeCompilerInvocationOutputHALExecutable;
@@ -51,6 +53,7 @@
     ireeCompilerSourceWrapBuffer;
     ireeMlirLspServerRunMain;
     ireeOptRunMain;
+    ireeReduceRunMain;
     ireeRegisterTransformExtensions;
     mlirAffineAddExprGet;
     mlirAffineBinaryOpExprGetLHS;
@@ -119,6 +122,9 @@
     mlirArrayAttrGetElement;
     mlirArrayAttrGetNumElements;
     mlirArrayAttrGetTypeID;
+    mlirAsmStateCreateForOperation;
+    mlirAsmStateCreateForValue;
+    mlirAsmStateDestroy;
     mlirAttributeDump;
     mlirAttributeEqual;
     mlirAttributeGetContext;
@@ -139,6 +145,7 @@
     mlirAttributeIsADenseI64Array;
     mlirAttributeIsADenseI8Array;
     mlirAttributeIsADenseIntElements;
+    mlirAttributeIsADenseResourceElements;
     mlirAttributeIsADictionary;
     mlirAttributeIsAElements;
     mlirAttributeIsAFlatSymbolRef;
@@ -332,6 +339,7 @@
     mlirFloatAttrGetTypeID;
     mlirFloatAttrGetValueDouble;
     mlirFloatTF32TypeGetTypeID;
+    mlirFloatTypeGetWidth;
     mlirFunctionTypeGet;
     mlirFunctionTypeGetInput;
     mlirFunctionTypeGetNumInputs;
@@ -339,7 +347,6 @@
     mlirFunctionTypeGetResult;
     mlirFunctionTypeGetTypeID;
     mlirGetDialectHandle__iree_input__;
-    mlirGetDialectHandle__iree_linalg_ext__;
     mlirGetDialectHandle__transform__;
     mlirIREELinalgTransformRegisterPasses;
     mlirIREETransformRegisterPasses;
@@ -404,6 +411,7 @@
     mlirMemRefTypeGetChecked;
     mlirMemRefTypeGetLayout;
     mlirMemRefTypeGetMemorySpace;
+    mlirMemRefTypeGetStridesAndOffset;
     mlirMemRefTypeGetTypeID;
     mlirModuleCreateEmpty;
     mlirModuleCreateParse;
@@ -418,6 +426,7 @@
     mlirOpOperandGetNextUse;
     mlirOpOperandGetOperandNumber;
     mlirOpOperandGetOwner;
+    mlirOpOperandGetValue;
     mlirOpOperandIsNull;
     mlirOpPassManagerAddOwnedPass;
     mlirOpPassManagerAddPipeline;
@@ -449,11 +458,15 @@
     mlirOperationGetAttributeByName;
     mlirOperationGetBlock;
     mlirOperationGetContext;
+    mlirOperationGetDiscardableAttribute;
+    mlirOperationGetDiscardableAttributeByName;
     mlirOperationGetFirstRegion;
+    mlirOperationGetInherentAttributeByName;
     mlirOperationGetLocation;
     mlirOperationGetName;
     mlirOperationGetNextInBlock;
     mlirOperationGetNumAttributes;
+    mlirOperationGetNumDiscardableAttributes;
     mlirOperationGetNumOperands;
     mlirOperationGetNumRegions;
     mlirOperationGetNumResults;
@@ -464,17 +477,23 @@
     mlirOperationGetResult;
     mlirOperationGetSuccessor;
     mlirOperationGetTypeID;
+    mlirOperationHasInherentAttributeByName;
     mlirOperationImplementsInterface;
     mlirOperationImplementsInterfaceStatic;
     mlirOperationMoveAfter;
     mlirOperationMoveBefore;
     mlirOperationPrint;
     mlirOperationPrintWithFlags;
+    mlirOperationPrintWithState;
     mlirOperationRemoveAttributeByName;
+    mlirOperationRemoveDiscardableAttributeByName;
     mlirOperationRemoveFromParent;
     mlirOperationSetAttributeByName;
+    mlirOperationSetDiscardableAttributeByName;
+    mlirOperationSetInherentAttributeByName;
     mlirOperationSetOperand;
     mlirOperationSetOperands;
+    mlirOperationSetSuccessor;
     mlirOperationStateAddAttributes;
     mlirOperationStateAddOperands;
     mlirOperationStateAddOwnedRegions;
@@ -483,6 +502,7 @@
     mlirOperationStateEnableResultTypeInference;
     mlirOperationStateGet;
     mlirOperationVerify;
+    mlirOperationWalk;
     mlirOperationWriteBytecode;
     mlirOperationWriteBytecodeWithConfig;
     mlirPDLAttributeTypeGet;
@@ -559,9 +579,17 @@
     mlirSymbolTableWalkSymbolTables;
     mlirTF32TypeGet;
     mlirTransformAnyOpTypeGet;
+    mlirTransformAnyOpTypeGetTypeID;
+    mlirTransformAnyParamTypeGet;
+    mlirTransformAnyParamTypeGetTypeID;
+    mlirTransformAnyValueTypeGet;
+    mlirTransformAnyValueTypeGetTypeID;
     mlirTransformOperationTypeGet;
     mlirTransformOperationTypeGetOperationName;
     mlirTransformOperationTypeGetTypeID;
+    mlirTransformParamTypeGet;
+    mlirTransformParamTypeGetType;
+    mlirTransformParamTypeGetTypeID;
     mlirTupleTypeGet;
     mlirTupleTypeGetNumTypes;
     mlirTupleTypeGetType;
@@ -585,6 +613,7 @@
     mlirTypeIsAF16;
     mlirTypeIsAF32;
     mlirTypeIsAF64;
+    mlirTypeIsAFloat;
     mlirTypeIsAFloat8E4M3B11FNUZ;
     mlirTypeIsAFloat8E4M3FN;
     mlirTypeIsAFloat8E4M3FNUZ;
@@ -607,7 +636,10 @@
     mlirTypeIsATF32;
     mlirTypeIsATensor;
     mlirTypeIsATransformAnyOpType;
+    mlirTypeIsATransformAnyParamType;
+    mlirTypeIsATransformAnyValueType;
     mlirTypeIsATransformOperationType;
+    mlirTypeIsATransformParamType;
     mlirTypeIsATuple;
     mlirTypeIsAUnrankedMemRef;
     mlirTypeIsAUnrankedTensor;
@@ -623,6 +655,7 @@
     mlirUnmanagedDenseInt32ResourceElementsAttrGet;
     mlirUnmanagedDenseInt64ResourceElementsAttrGet;
     mlirUnmanagedDenseInt8ResourceElementsAttrGet;
+    mlirUnmanagedDenseResourceElementsAttrGet;
     mlirUnmanagedDenseUInt16ResourceElementsAttrGet;
     mlirUnmanagedDenseUInt32ResourceElementsAttrGet;
     mlirUnmanagedDenseUInt64ResourceElementsAttrGet;
@@ -646,7 +679,11 @@
     mlirValueSetType;
     mlirVectorTypeGet;
     mlirVectorTypeGetChecked;
+    mlirVectorTypeGetScalable;
+    mlirVectorTypeGetScalableChecked;
     mlirVectorTypeGetTypeID;
+    mlirVectorTypeIsDimScalable;
+    mlirVectorTypeIsScalable;
   local:
     *;
 };
diff --git a/compiler/src/iree/compiler/API/api_exports.macos.lst b/compiler/src/iree/compiler/API/api_exports.macos.lst
index dc13969..575406c 100644
--- a/compiler/src/iree/compiler/API/api_exports.macos.lst
+++ b/compiler/src/iree/compiler/API/api_exports.macos.lst
@@ -8,10 +8,12 @@
 _ireeCompilerGetRevision
 _ireeCompilerGlobalInitialize
 _ireeCompilerGlobalShutdown
+_ireeCompilerInitializeContext
 _ireeCompilerInvocationCreate
 _ireeCompilerInvocationDestroy
 _ireeCompilerInvocationEnableCallbackDiagnostics
 _ireeCompilerInvocationEnableConsoleDiagnostics
+_ireeCompilerInvocationExportStealModule
 _ireeCompilerInvocationImportBorrowModule
 _ireeCompilerInvocationImportStealModule
 _ireeCompilerInvocationOutputHALExecutable
@@ -49,6 +51,7 @@
 _ireeCompilerSourceWrapBuffer
 _ireeMlirLspServerRunMain
 _ireeOptRunMain
+_ireeReduceRunMain
 _ireeRegisterTransformExtensions
 _mlirAffineAddExprGet
 _mlirAffineBinaryOpExprGetLHS
@@ -117,6 +120,9 @@
 _mlirArrayAttrGetElement
 _mlirArrayAttrGetNumElements
 _mlirArrayAttrGetTypeID
+_mlirAsmStateCreateForOperation
+_mlirAsmStateCreateForValue
+_mlirAsmStateDestroy
 _mlirAttributeDump
 _mlirAttributeEqual
 _mlirAttributeGetContext
@@ -137,6 +143,7 @@
 _mlirAttributeIsADenseI64Array
 _mlirAttributeIsADenseI8Array
 _mlirAttributeIsADenseIntElements
+_mlirAttributeIsADenseResourceElements
 _mlirAttributeIsADictionary
 _mlirAttributeIsAElements
 _mlirAttributeIsAFlatSymbolRef
@@ -330,6 +337,7 @@
 _mlirFloatAttrGetTypeID
 _mlirFloatAttrGetValueDouble
 _mlirFloatTF32TypeGetTypeID
+_mlirFloatTypeGetWidth
 _mlirFunctionTypeGet
 _mlirFunctionTypeGetInput
 _mlirFunctionTypeGetNumInputs
@@ -337,7 +345,6 @@
 _mlirFunctionTypeGetResult
 _mlirFunctionTypeGetTypeID
 _mlirGetDialectHandle__iree_input__
-_mlirGetDialectHandle__iree_linalg_ext__
 _mlirGetDialectHandle__transform__
 _mlirIREELinalgTransformRegisterPasses
 _mlirIREETransformRegisterPasses
@@ -402,6 +409,7 @@
 _mlirMemRefTypeGetChecked
 _mlirMemRefTypeGetLayout
 _mlirMemRefTypeGetMemorySpace
+_mlirMemRefTypeGetStridesAndOffset
 _mlirMemRefTypeGetTypeID
 _mlirModuleCreateEmpty
 _mlirModuleCreateParse
@@ -416,6 +424,7 @@
 _mlirOpOperandGetNextUse
 _mlirOpOperandGetOperandNumber
 _mlirOpOperandGetOwner
+_mlirOpOperandGetValue
 _mlirOpOperandIsNull
 _mlirOpPassManagerAddOwnedPass
 _mlirOpPassManagerAddPipeline
@@ -447,11 +456,15 @@
 _mlirOperationGetAttributeByName
 _mlirOperationGetBlock
 _mlirOperationGetContext
+_mlirOperationGetDiscardableAttribute
+_mlirOperationGetDiscardableAttributeByName
 _mlirOperationGetFirstRegion
+_mlirOperationGetInherentAttributeByName
 _mlirOperationGetLocation
 _mlirOperationGetName
 _mlirOperationGetNextInBlock
 _mlirOperationGetNumAttributes
+_mlirOperationGetNumDiscardableAttributes
 _mlirOperationGetNumOperands
 _mlirOperationGetNumRegions
 _mlirOperationGetNumResults
@@ -462,17 +475,23 @@
 _mlirOperationGetResult
 _mlirOperationGetSuccessor
 _mlirOperationGetTypeID
+_mlirOperationHasInherentAttributeByName
 _mlirOperationImplementsInterface
 _mlirOperationImplementsInterfaceStatic
 _mlirOperationMoveAfter
 _mlirOperationMoveBefore
 _mlirOperationPrint
 _mlirOperationPrintWithFlags
+_mlirOperationPrintWithState
 _mlirOperationRemoveAttributeByName
+_mlirOperationRemoveDiscardableAttributeByName
 _mlirOperationRemoveFromParent
 _mlirOperationSetAttributeByName
+_mlirOperationSetDiscardableAttributeByName
+_mlirOperationSetInherentAttributeByName
 _mlirOperationSetOperand
 _mlirOperationSetOperands
+_mlirOperationSetSuccessor
 _mlirOperationStateAddAttributes
 _mlirOperationStateAddOperands
 _mlirOperationStateAddOwnedRegions
@@ -481,6 +500,7 @@
 _mlirOperationStateEnableResultTypeInference
 _mlirOperationStateGet
 _mlirOperationVerify
+_mlirOperationWalk
 _mlirOperationWriteBytecode
 _mlirOperationWriteBytecodeWithConfig
 _mlirPDLAttributeTypeGet
@@ -557,9 +577,17 @@
 _mlirSymbolTableWalkSymbolTables
 _mlirTF32TypeGet
 _mlirTransformAnyOpTypeGet
+_mlirTransformAnyOpTypeGetTypeID
+_mlirTransformAnyParamTypeGet
+_mlirTransformAnyParamTypeGetTypeID
+_mlirTransformAnyValueTypeGet
+_mlirTransformAnyValueTypeGetTypeID
 _mlirTransformOperationTypeGet
 _mlirTransformOperationTypeGetOperationName
 _mlirTransformOperationTypeGetTypeID
+_mlirTransformParamTypeGet
+_mlirTransformParamTypeGetType
+_mlirTransformParamTypeGetTypeID
 _mlirTupleTypeGet
 _mlirTupleTypeGetNumTypes
 _mlirTupleTypeGetType
@@ -583,6 +611,7 @@
 _mlirTypeIsAF16
 _mlirTypeIsAF32
 _mlirTypeIsAF64
+_mlirTypeIsAFloat
 _mlirTypeIsAFloat8E4M3B11FNUZ
 _mlirTypeIsAFloat8E4M3FN
 _mlirTypeIsAFloat8E4M3FNUZ
@@ -605,7 +634,10 @@
 _mlirTypeIsATF32
 _mlirTypeIsATensor
 _mlirTypeIsATransformAnyOpType
+_mlirTypeIsATransformAnyParamType
+_mlirTypeIsATransformAnyValueType
 _mlirTypeIsATransformOperationType
+_mlirTypeIsATransformParamType
 _mlirTypeIsATuple
 _mlirTypeIsAUnrankedMemRef
 _mlirTypeIsAUnrankedTensor
@@ -621,6 +653,7 @@
 _mlirUnmanagedDenseInt32ResourceElementsAttrGet
 _mlirUnmanagedDenseInt64ResourceElementsAttrGet
 _mlirUnmanagedDenseInt8ResourceElementsAttrGet
+_mlirUnmanagedDenseResourceElementsAttrGet
 _mlirUnmanagedDenseUInt16ResourceElementsAttrGet
 _mlirUnmanagedDenseUInt32ResourceElementsAttrGet
 _mlirUnmanagedDenseUInt64ResourceElementsAttrGet
@@ -644,4 +677,8 @@
 _mlirValueSetType
 _mlirVectorTypeGet
 _mlirVectorTypeGetChecked
+_mlirVectorTypeGetScalable
+_mlirVectorTypeGetScalableChecked
 _mlirVectorTypeGetTypeID
+_mlirVectorTypeIsDimScalable
+_mlirVectorTypeIsScalable
diff --git a/compiler/src/iree/compiler/API/generate_exports.py b/compiler/src/iree/compiler/API/generate_exports.py
index b3c81d9..35f2e2a 100755
--- a/compiler/src/iree/compiler/API/generate_exports.py
+++ b/compiler/src/iree/compiler/API/generate_exports.py
@@ -71,7 +71,6 @@
     # MLIR registration functions that are part of generated code.
     "mlirRegisterLinalgPasses",
     "mlirGetDialectHandle__iree_input__",
-    "mlirGetDialectHandle__iree_linalg_ext__",
     "mlirGetDialectHandle__transform__",
 ]
 
diff --git a/compiler/src/iree/compiler/Codegen/BUILD.bazel b/compiler/src/iree/compiler/Codegen/BUILD.bazel
index 6dac3ae..31af81b 100644
--- a/compiler/src/iree/compiler/Codegen/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/BUILD.bazel
@@ -30,7 +30,7 @@
         "//compiler/src/iree/compiler/Codegen/SPIRV",
         "//compiler/src/iree/compiler/Codegen/VMVX",
         "//compiler/src/iree/compiler/Codegen/WGSL",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "@llvm-project//mlir:Pass",
     ],
 )
diff --git a/compiler/src/iree/compiler/Codegen/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/CMakeLists.txt
index 7c0d0c8..ae59fc6 100644
--- a/compiler/src/iree/compiler/Codegen/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/CMakeLists.txt
@@ -18,7 +18,6 @@
   SRCS
     "Passes.cpp"
   DEPS
-    IREELinalgExtPasses
     MLIRPass
     iree::compiler::Codegen::Common
     iree::compiler::Codegen::Common::CPU::CommonCPUPasses
@@ -29,6 +28,7 @@
     iree::compiler::Codegen::SPIRV
     iree::compiler::Codegen::VMVX
     iree::compiler::Codegen::WGSL
+    iree::compiler::Dialect::LinalgExt::Transforms
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Common/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Common/BUILD.bazel
index aa9f4e9..6ffd603 100644
--- a/compiler/src/iree/compiler/Codegen/Common/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Common/BUILD.bazel
@@ -144,10 +144,10 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
         "//llvm-external-projects/iree-dialects:IREEVectorExtDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineAnalysis",
@@ -221,8 +221,8 @@
         "//compiler/src/iree/compiler/Codegen/Dialect/Codegen/IR:IREECodegenDialect",
         "//compiler/src/iree/compiler/Codegen/Dialect/GPU/IR:IREEGPUDialect",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransformOps",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions:LinalgExtExtensions",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "//llvm-external-projects/iree-dialects:IREEVectorExtDialect",
         "@llvm-project//mlir:AffineDialect",
diff --git a/compiler/src/iree/compiler/Codegen/Common/BufferizationAnalysis.cpp b/compiler/src/iree/compiler/Codegen/Common/BufferizationAnalysis.cpp
index 0721893..579d564 100644
--- a/compiler/src/iree/compiler/Codegen/Common/BufferizationAnalysis.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/BufferizationAnalysis.cpp
@@ -13,11 +13,11 @@
 //===----------------------------------------------------------------------===//
 #include "iree/compiler/Codegen/Common/BufferizationAnalysis.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowTypes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Common/CMakeLists.txt
index 85d9ea0..fc63660 100644
--- a/compiler/src/iree/compiler/Codegen/Common/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Common/CMakeLists.txt
@@ -117,8 +117,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtTransforms
     IREEVectorExtDialect
     LLVMSupport
     MLIRAffineAnalysis
@@ -173,6 +171,8 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Dialect::Util::IR
     iree::compiler::Utils
   PUBLIC
@@ -190,8 +190,6 @@
     ::PassHeaders
     ::PassesIncGen
     IREEDialectsTransforms
-    IREELinalgExtDialect
-    IREELinalgExtTransformOps
     IREELinalgTransformDialect
     IREEVectorExtDialect
     LLVMSupport
@@ -244,6 +242,8 @@
     iree::compiler::Codegen::TransformStrategies::Common::TransformStrategies
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::Flow::TransformExtensions::FlowExtensions
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
     iree::compiler::Utils
   PUBLIC
 )
diff --git a/compiler/src/iree/compiler/Codegen/Common/CPU/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Common/CPU/BUILD.bazel
index 3025ec2..fb5a82a 100644
--- a/compiler/src/iree/compiler/Codegen/Common/CPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Common/CPU/BUILD.bazel
@@ -61,9 +61,9 @@
         "//compiler/src/iree/compiler/Codegen/Transforms",
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtUtils",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
         "//runtime/src/iree/builtins/ukernel:exported_bits",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
diff --git a/compiler/src/iree/compiler/Codegen/Common/CPU/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Common/CPU/CMakeLists.txt
index 4c7ba9e..c20c0d3 100644
--- a/compiler/src/iree/compiler/Codegen/Common/CPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Common/CPU/CMakeLists.txt
@@ -48,9 +48,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtTransforms
-    IREELinalgExtUtils
     LLVMSupport
     MLIRAffineDialect
     MLIRAffineTransforms
@@ -84,6 +81,9 @@
     iree::compiler::Codegen::Transforms
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
+    iree::compiler::Dialect::LinalgExt::Utils
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Common/CPU/CPULowerToUKernels.cpp b/compiler/src/iree/compiler/Codegen/Common/CPU/CPULowerToUKernels.cpp
index caec971..8b85b7c 100644
--- a/compiler/src/iree/compiler/Codegen/Common/CPU/CPULowerToUKernels.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/CPU/CPULowerToUKernels.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/builtins/ukernel/exported_bits.h"
 #include "iree/compiler/Codegen/Common/CPU/PassDetail.h"
 #include "iree/compiler/Codegen/Common/CPU/Passes.h"
@@ -13,6 +12,7 @@
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenOps.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/UKernelOps.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/CPU/CPUMaterializeEncodingPass.cpp b/compiler/src/iree/compiler/Codegen/Common/CPU/CPUMaterializeEncodingPass.cpp
index 276b3ed..1ab144e 100644
--- a/compiler/src/iree/compiler/Codegen/Common/CPU/CPUMaterializeEncodingPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/CPU/CPUMaterializeEncodingPass.cpp
@@ -4,8 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/CPU/PassDetail.h"
 #include "iree/compiler/Codegen/Common/CPU/Passes.h"
 #include "iree/compiler/Codegen/Common/EncodingUtils.h"
@@ -13,6 +11,8 @@
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenOps.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/MathExtras.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/CommonDialectRegistration.cpp b/compiler/src/iree/compiler/Codegen/Common/CommonDialectRegistration.cpp
index 6bb7b49..8a38c43 100644
--- a/compiler/src/iree/compiler/Codegen/Common/CommonDialectRegistration.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/CommonDialectRegistration.cpp
@@ -4,8 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 #include "iree-dialects/Dialect/VectorExt/IR/VectorExtDialect.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
@@ -17,6 +15,8 @@
 #include "iree/compiler/Codegen/LLVMGPU/TransformExtensions/LLVMGPUExtensions.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/TransformExtensions/FlowExtensions.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/TransformOps/AffineTransformOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/ConvertToDestinationPassingStylePass.cpp b/compiler/src/iree/compiler/Codegen/Common/ConvertToDestinationPassingStylePass.cpp
index 9bd4562..ddf2750 100644
--- a/compiler/src/iree/compiler/Codegen/Common/ConvertToDestinationPassingStylePass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/ConvertToDestinationPassingStylePass.cpp
@@ -12,7 +12,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/BufferizationAnalysis.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
@@ -21,6 +20,7 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowTypes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/DenseSet.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/EncodingUtils.h b/compiler/src/iree/compiler/Codegen/Common/EncodingUtils.h
index 04d72b6..0f38857 100644
--- a/compiler/src/iree/compiler/Codegen/Common/EncodingUtils.h
+++ b/compiler/src/iree/compiler/Codegen/Common/EncodingUtils.h
@@ -7,8 +7,8 @@
 #ifndef IREE_COMPILER_SRC_IREE_COMPILER_CODEGEN_COMMON_ENCODINGUTILS_H_
 #define IREE_COMPILER_SRC_IREE_COMPILER_CODEGEN_COMMON_ENCODINGUTILS_H_
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Transforms/DialectConversion.h"
 
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Common/GPU/BUILD.bazel
index 4cd91f8..8d6b4aa 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/BUILD.bazel
@@ -87,8 +87,8 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Codegen/Utils:VectorOpUtils",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//llvm-external-projects/iree-dialects:IREEVectorExtDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AMDGPUDialect",
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Common/GPU/CMakeLists.txt
index 0e6362b..d582e0b 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/CMakeLists.txt
@@ -72,8 +72,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtTransforms
     IREEVectorExtDialect
     LLVMSupport
     MLIRAMDGPUDialect
@@ -115,6 +113,8 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Codegen::Utils::VectorOpUtils
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUDistributeSharedMemoryCopy.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUDistributeSharedMemoryCopy.cpp
index f3b6d9d..0a90282 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUDistributeSharedMemoryCopy.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUDistributeSharedMemoryCopy.cpp
@@ -7,13 +7,13 @@
 #include <algorithm>
 #include <numeric>
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/Common/GPU/PassDetail.h"
 #include "iree/compiler/Codegen/Common/GPU/Passes.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/GPULowerToUKernels.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/GPULowerToUKernels.cpp
index 7d65ec4..b71efb1 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/GPULowerToUKernels.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/GPULowerToUKernels.cpp
@@ -4,13 +4,13 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/GPU/PassDetail.h"
 #include "iree/compiler/Codegen/Common/GPU/Passes.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenOps.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/UKernelOps.h"
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUPatterns.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUPatterns.cpp
index 17041bd..675e02d 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUPatterns.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUPatterns.cpp
@@ -6,9 +6,9 @@
 
 #include "iree/compiler/Codegen/Common/GPU/GPUPatterns.h"
 
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp
index 97c6a22..0a3ed27 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/GPUTensorTile.cpp
@@ -6,13 +6,13 @@
 
 #include <numeric>
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/Common/GPU/PassDetail.h"
 #include "iree/compiler/Codegen/Common/GPU/Passes.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupSpecializationPass.cpp b/compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupSpecializationPass.cpp
index fceca2f..6f4e094 100644
--- a/compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupSpecializationPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupSpecializationPass.cpp
@@ -28,10 +28,10 @@
 //
 //===---------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/GPU/PassDetail.h"
 #include "iree/compiler/Codegen/Common/GPU/Passes.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp b/compiler/src/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp
index 345b459..a77b3c0 100644
--- a/compiler/src/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp
@@ -10,12 +10,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/Interfaces/BufferizationInterfaces.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoNop.cpp b/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoNop.cpp
index ce18152..903714e 100644
--- a/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoNop.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoNop.cpp
@@ -4,11 +4,11 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/EncodingUtils.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/MemRef/Transforms/Transforms.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoPackUnPack.cpp b/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoPackUnPack.cpp
index 2ded82a..3f1c3a0 100644
--- a/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoPackUnPack.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/MaterializeEncodingIntoPackUnPack.cpp
@@ -8,14 +8,14 @@
 // Pass to materialize the encoding of tensor based on target information.
 //===---------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/EncodingUtils.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/SmallVectorExtras.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/TileAndDistributeToWorkgroupsPass.cpp b/compiler/src/iree/compiler/Codegen/Common/TileAndDistributeToWorkgroupsPass.cpp
index 8ccb7e9..d94d995 100644
--- a/compiler/src/iree/compiler/Codegen/Common/TileAndDistributeToWorkgroupsPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/TileAndDistributeToWorkgroupsPass.cpp
@@ -14,8 +14,6 @@
 //
 //===---------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/EncodingUtils.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
@@ -27,6 +25,8 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Analysis/SliceAnalysis.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/BUILD.bazel
index 1d6f7f8..3d5956d 100644
--- a/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/BUILD.bazel
@@ -69,8 +69,8 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//llvm-external-projects/iree-dialects:IREEDialectsTransforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "//llvm-external-projects/iree-dialects:IREEVectorExtDialect",
         "@llvm-project//llvm:Support",
diff --git a/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CMakeLists.txt
index c165c93..aa10c8f 100644
--- a/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CMakeLists.txt
@@ -32,7 +32,6 @@
   DEPS
     ::CommonExtensionsOpGen
     IREEDialectsTransforms
-    IREELinalgExtDialect
     IREELinalgTransformDialect
     IREEVectorExtDialect
     LLVMSupport
@@ -71,6 +70,7 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CommonExtensions.cpp b/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CommonExtensions.cpp
index 78a8666..efefcaf 100644
--- a/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CommonExtensions.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/TransformExtensions/CommonExtensions.cpp
@@ -6,7 +6,6 @@
 
 #include "CommonExtensions.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/SimplePatternRewriter.h"
 #include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 #include "iree-dialects/Transforms/TransformMatchers.h"
@@ -23,6 +22,7 @@
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Conversion/VectorToGPU/VectorToGPU.h"
diff --git a/compiler/src/iree/compiler/Codegen/Common/Transforms.h b/compiler/src/iree/compiler/Codegen/Common/Transforms.h
index d652a13..e0d84f3 100644
--- a/compiler/src/iree/compiler/Codegen/Common/Transforms.h
+++ b/compiler/src/iree/compiler/Codegen/Common/Transforms.h
@@ -7,10 +7,10 @@
 #ifndef IREE_COMPILER_CODEGEN_COMMON_TRANSFORMS_H_
 #define IREE_COMPILER_CODEGEN_COMMON_TRANSFORMS_H_
 
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/Interfaces/BufferizationInterfaces.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 
 namespace mlir::bufferization {
diff --git a/compiler/src/iree/compiler/Codegen/Common/TypePropagationPass.cpp b/compiler/src/iree/compiler/Codegen/Common/TypePropagationPass.cpp
index 0225830..2917e66 100644
--- a/compiler/src/iree/compiler/Codegen/Common/TypePropagationPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/Common/TypePropagationPass.cpp
@@ -24,10 +24,10 @@
 //
 //===---------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/PassDetail.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Utils/ElementPackingUtils.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/Interfaces/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Interfaces/BUILD.bazel
index 86b80b8..453e420 100644
--- a/compiler/src/iree/compiler/Codegen/Interfaces/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Interfaces/BUILD.bazel
@@ -46,7 +46,7 @@
         ":PartitionableLoopsInterface",
         ":ProcessorOpInterfaces",
         ":UKernelOpInterface",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransformOps",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions:LinalgExtExtensions",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgTransforms",
@@ -87,7 +87,7 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "@llvm-project//mlir:ArithTransforms",
         "@llvm-project//mlir:BufferizationDialect",
         "@llvm-project//mlir:BufferizationTransforms",
@@ -155,7 +155,7 @@
     ],
     deps = [
         ":PartitionableLoopsInterfaceGen",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:DialectUtils",
         "@llvm-project//mlir:IR",
diff --git a/compiler/src/iree/compiler/Codegen/Interfaces/BufferizationInterfaces.cpp b/compiler/src/iree/compiler/Codegen/Interfaces/BufferizationInterfaces.cpp
index 47827be..6242118 100644
--- a/compiler/src/iree/compiler/Codegen/Interfaces/BufferizationInterfaces.cpp
+++ b/compiler/src/iree/compiler/Codegen/Interfaces/BufferizationInterfaces.cpp
@@ -6,13 +6,13 @@
 
 #include "iree/compiler/Codegen/Interfaces/BufferizationInterfaces.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Utils/Utils.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"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Arith/Transforms/BufferizableOpInterfaceImpl.h"
 #include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
 #include "mlir/Dialect/Bufferization/IR/DstBufferizableOpInterfaceImpl.h"
diff --git a/compiler/src/iree/compiler/Codegen/Interfaces/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Interfaces/CMakeLists.txt
index 8f87271..2b2a5e9 100644
--- a/compiler/src/iree/compiler/Codegen/Interfaces/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Interfaces/CMakeLists.txt
@@ -22,7 +22,6 @@
     ::PartitionableLoopsInterface
     ::ProcessorOpInterfaces
     ::UKernelOpInterface
-    IREELinalgExtTransformOps
     IREELinalgTransformDialect
     MLIRAffineDialect
     MLIRAffineTransformOps
@@ -47,6 +46,7 @@
     iree::compiler::Codegen::LLVMCPU::TransformExtensions::LLVMCPUExtensions
     iree::compiler::Codegen::LLVMGPU::TransformExtensions::LLVMGPUExtensions
     iree::compiler::Dialect::Flow::TransformExtensions::FlowExtensions
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
   PUBLIC
 )
 
@@ -58,7 +58,6 @@
   SRCS
     "BufferizationInterfaces.cpp"
   DEPS
-    IREELinalgExtDialect
     MLIRArithTransforms
     MLIRBufferizationDialect
     MLIRBufferizationTransforms
@@ -75,6 +74,7 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
   PUBLIC
 )
 
@@ -117,13 +117,13 @@
     "PartitionableLoopsInterface.cpp"
   DEPS
     ::PartitionableLoopsInterfaceGen
-    IREELinalgExtDialect
     LLVMSupport
     MLIRIR
     MLIRLinalgDialect
     MLIRLinalgStructuredOpsIncGenLib
     MLIRSupport
     MLIRTensorDialect
+    iree::compiler::Dialect::LinalgExt::IR
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Interfaces/Interfaces.cpp b/compiler/src/iree/compiler/Codegen/Interfaces/Interfaces.cpp
index 8d87b55..e49d05f 100644
--- a/compiler/src/iree/compiler/Codegen/Interfaces/Interfaces.cpp
+++ b/compiler/src/iree/compiler/Codegen/Interfaces/Interfaces.cpp
@@ -11,12 +11,12 @@
 #include "iree/compiler/Codegen/Interfaces/ProcessorOpInterfaces.h"
 // TODO: Remove this dependency once the transform dialect extensions
 // have a better registration mechanism.
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 #include "iree/compiler/Codegen/Common/TransformExtensions/CommonExtensions.h"
 #include "iree/compiler/Codegen/LLVMCPU/TransformExtensions/LLVMCPUExtensions.h"
 #include "iree/compiler/Codegen/LLVMGPU/TransformExtensions/LLVMGPUExtensions.h"
 #include "iree/compiler/Dialect/Flow/TransformExtensions/FlowExtensions.h"
+#include "iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h"
 #include "mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h"
 #include "mlir/Dialect/Affine/TransformOps/AffineTransformOps.h"
 #include "mlir/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.h"
diff --git a/compiler/src/iree/compiler/Codegen/Interfaces/PartitionableLoopsInterface.cpp b/compiler/src/iree/compiler/Codegen/Interfaces/PartitionableLoopsInterface.cpp
index 0cf3ab8..f90be7c 100644
--- a/compiler/src/iree/compiler/Codegen/Interfaces/PartitionableLoopsInterface.cpp
+++ b/compiler/src/iree/compiler/Codegen/Interfaces/PartitionableLoopsInterface.cpp
@@ -6,8 +6,8 @@
 
 #include "iree/compiler/Codegen/Interfaces/PartitionableLoopsInterface.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/SmallVector.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/BUILD.bazel b/compiler/src/iree/compiler/Codegen/LLVMCPU/BUILD.bazel
index d88d21d..da9677b 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/BUILD.bazel
@@ -97,12 +97,12 @@
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR:HALDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtUtils",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialectPasses",
         "//runtime/src/iree/schemas:cpu_data",
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt
index 048f11e..d003960 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt
@@ -79,9 +79,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtPasses
-    IREELinalgExtUtils
     IREELinalgTransformDialect
     IREELinalgTransformDialectPasses
     LLVMBinaryFormat
@@ -153,6 +150,9 @@
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::HAL::IR::HALDialect
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
+    iree::compiler::Dialect::LinalgExt::Utils
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
     iree::compiler::Utils
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
index b7f0d47..d2fe474 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
@@ -6,7 +6,6 @@
 
 #include "iree/compiler/Codegen/LLVMCPU/KernelDispatch.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/TileSizeSelection.h"
 #include "iree/compiler/Codegen/LLVMCPU/TargetMLTransformInfo.h"
 #include "iree/compiler/Codegen/LLVMCPU/Utils.h"
@@ -16,6 +15,7 @@
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp
index 9a9cd79..0231589 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Common/TileSizeSelection.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/LLVMCPU/PassDetail.h"
@@ -13,6 +12,7 @@
 #include "iree/compiler/Codegen/Utils/CPUUtils.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/PDL/IR/PDL.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSelectLoweringStrategy.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSelectLoweringStrategy.cpp
index c4d5539..11c71fb 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSelectLoweringStrategy.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPUSelectLoweringStrategy.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Common/TileSizeSelection.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
@@ -14,6 +13,7 @@
 #include "iree/compiler/Codegen/LLVMCPU/Utils.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/PDL/IR/PDL.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp
index 4bff8f0..427d31f 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/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 "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "iree-dialects/Dialect/LinalgTransform/Passes.h"
 #include "iree/compiler/Codegen/Common/CPU/Passes.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/VerifyLinalgTransformLegality.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/VerifyLinalgTransformLegality.cpp
index e4b266c..0f3fac0 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/VerifyLinalgTransformLegality.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/VerifyLinalgTransformLegality.cpp
@@ -4,10 +4,10 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/LLVMCPU/PassDetail.h"
 #include "iree/compiler/Codegen/LLVMCPU/Passes.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Pass/Pass.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/BUILD.bazel b/compiler/src/iree/compiler/Codegen/LLVMGPU/BUILD.bazel
index 962238b..447a592 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/BUILD.bazel
@@ -135,11 +135,10 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialectPasses",
         "//llvm-external-projects/iree-dialects:IREEVectorExtDialect",
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt
index 75dda88..517b554 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt
@@ -98,9 +98,6 @@
     ::PassesIncGen
     ::ROCDLPassHeaders
     ::ROCDLPassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtPasses
-    IREELinalgExtTransforms
     IREELinalgTransformDialect
     IREELinalgTransformDialectPasses
     IREEVectorExtDialect
@@ -179,6 +176,8 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
   PUBLIC
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp
index c3fc0ab..5ac9613 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp
@@ -10,7 +10,6 @@
 #include <numeric>
 #include <optional>
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/GPU/GPUHeuristics.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUAttrs.h"
@@ -20,6 +19,7 @@
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/LinalgOpInfo.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/CommandLine.h"
 #include "mlir/Analysis/SliceAnalysis.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPULowerExecutableTarget.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPULowerExecutableTarget.cpp
index 084d1cc..0d93928 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPULowerExecutableTarget.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPULowerExecutableTarget.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree-dialects/Dialect/VectorExt/IR/VectorExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
@@ -13,6 +12,7 @@
 #include "iree/compiler/Codegen/LLVMGPU/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/GPU/IR/GPUDialect.h"
 #include "mlir/Dialect/NVGPU/IR/NVGPUDialect.h"
 #include "mlir/Dialect/PDL/IR/PDL.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUSelectLoweringStrategy.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUSelectLoweringStrategy.cpp
index 2e699a7..ba7ccce 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUSelectLoweringStrategy.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUSelectLoweringStrategy.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/LLVMGPU/KernelConfig.h"
@@ -12,6 +11,7 @@
 #include "iree/compiler/Codegen/LLVMGPU/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/GPU/IR/GPUDialect.h"
 #include "mlir/Dialect/NVGPU/IR/NVGPUDialect.h"
 #include "mlir/Dialect/PDL/IR/PDL.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUTensorCoreVectorization.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUTensorCoreVectorization.cpp
index 6f94422..c10ddfc 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUTensorCoreVectorization.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUTensorCoreVectorization.cpp
@@ -4,8 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Common/GPU/GPUPatterns.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/LLVMGPU/PassDetail.h"
@@ -13,6 +11,8 @@
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Conversion/VectorToGPU/VectorToGPU.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/Passes.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/Passes.cpp
index ded6cb0..addb1cc 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/Passes.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/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 "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 
 #include <cstdint>
 
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/ROCDLLowerExecutableTarget.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/ROCDLLowerExecutableTarget.cpp
index a2e75e8..9025284 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/ROCDLLowerExecutableTarget.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/ROCDLLowerExecutableTarget.cpp
@@ -4,12 +4,12 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/LLVMGPU/Passes.h"
 #include "iree/compiler/Codegen/LLVMGPU/ROCDLPassDetail.h"
 #include "iree/compiler/Codegen/LLVMGPU/ROCDLPasses.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/GPU/IR/GPUDialect.h"
 #include "mlir/Dialect/SCF/IR/SCF.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_mfma_transform_spec.mlir b/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_mfma_transform_spec.mlir
index 717d2fa..9bf926b 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_mfma_transform_spec.mlir
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_mfma_transform_spec.mlir
@@ -32,10 +32,10 @@
     // Tile and decompose attention
     // ==========================================
     %attention4 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %variant_op : (!transform.any_op) -> !transform.any_op
-    %acc_fill, %max_fill, %sum_fill, %inner_loop, %final_scaling, %last_truncate, %blocked_attention = transform.tile_attention %attention4 {tile_size = 64} :
+    %acc_fill, %max_fill, %sum_fill, %inner_loop, %final_scaling, %last_truncate, %blocked_attention = transform.iree.tile_attention %attention4 {tile_size = 64} :
       (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
     %fill_op, %first_matmul, %reduce_max, %partial_softmax, %scale_factor, %update, %reduce_sum, %truncate, %scale_acc, %second_matmul
-        = transform.decompose_tiled_attention %blocked_attention {tile_size = 64} :
+        = transform.iree.decompose_tiled_attention %blocked_attention {tile_size = 64} :
       (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
 
     // Promote key and value operands
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_transform_spec.mlir b/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_transform_spec.mlir
index 117e2c9..1fd8749 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_transform_spec.mlir
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/test/attention_transform_spec.mlir
@@ -30,10 +30,10 @@
     // Tile and decompose attention
     // ==========================================
     %attention4 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %variant_op : (!transform.any_op) -> !transform.any_op
-    %acc_fill, %max_fill, %sum_fill, %inner_loop, %final_scaling, %last_truncate, %blocked_attention = transform.tile_attention %attention4 :
+    %acc_fill, %max_fill, %sum_fill, %inner_loop, %final_scaling, %last_truncate, %blocked_attention = transform.iree.tile_attention %attention4 :
       (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
     %fill_op, %first_matmul, %reduce_max, %partial_softmax, %scale_factor, %update, %reduce_sum, %truncate, %scale_acc, %second_matmul
-        = transform.decompose_tiled_attention %blocked_attention :
+        = transform.iree.decompose_tiled_attention %blocked_attention :
       (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
 
     // Promote key and value operands
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/BUILD.bazel b/compiler/src/iree/compiler/Codegen/SPIRV/BUILD.bazel
index 1d99e33..61fcdf9 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/BUILD.bazel
@@ -97,12 +97,11 @@
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR:HALDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialectPasses",
         "@llvm-project//llvm:Support",
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/SPIRV/CMakeLists.txt
index 28a100d..4b20c71 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/CMakeLists.txt
@@ -79,9 +79,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtPasses
-    IREELinalgExtTransforms
     IREELinalgTransformDialect
     IREELinalgTransformDialectPasses
     LLVMSupport
@@ -148,6 +145,8 @@
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::HAL::IR::HALDialect
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
     iree::compiler::Utils
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp
index dec4636..f7d084d 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp
@@ -6,7 +6,6 @@
 
 #include "iree/compiler/Codegen/SPIRV/KernelConfig.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Common/GPU/GPUHeuristics.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/SPIRV/Utils.h"
@@ -14,6 +13,7 @@
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/LinalgOpInfo.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/Passes.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/Passes.cpp
index 59071df..261eba0 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/Passes.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/Passes.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 
 #include "iree-dialects/Dialect/LinalgTransform/Passes.h"
 #include "iree/compiler/Codegen/Common/GPU/Passes.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVLowerExecutableTargetPass.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVLowerExecutableTargetPass.cpp
index ded7a8a..bd02aec 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVLowerExecutableTargetPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVLowerExecutableTargetPass.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/SPIRV/KernelConfig.h"
@@ -12,6 +11,7 @@
 #include "iree/compiler/Codegen/SPIRV/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVSelectLoweringStrategy.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVSelectLoweringStrategy.cpp
index 849e90e..7c42c24 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVSelectLoweringStrategy.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVSelectLoweringStrategy.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/SPIRV/KernelConfig.h"
@@ -12,6 +11,7 @@
 #include "iree/compiler/Codegen/SPIRV/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/GPU/IR/GPUDialect.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp
index 7341335..7392c33 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp
@@ -10,7 +10,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/SPIRV/PassDetail.h"
@@ -19,6 +18,7 @@
 #include "iree/compiler/Codegen/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp
index fdf7208..6a63691 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp
@@ -11,7 +11,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/Common/Transforms.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
@@ -20,6 +19,7 @@
 #include "iree/compiler/Codegen/SPIRV/Utils.h"
 #include "iree/compiler/Codegen/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndPromote.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndPromote.cpp
index 32c0663..005676f 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndPromote.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndPromote.cpp
@@ -11,7 +11,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Common/GPU/GPUPatterns.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/SPIRV/KernelConfig.h"
@@ -21,6 +20,7 @@
 #include "iree/compiler/Codegen/Transforms/Transforms.h"
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/GPU/IR/GPUDialect.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndVectorizeToCooperativeOps.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndVectorizeToCooperativeOps.cpp
index 904c83c..abfa011 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndVectorizeToCooperativeOps.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTileAndVectorizeToCooperativeOps.cpp
@@ -13,7 +13,6 @@
 
 #include <algorithm>
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/Common/GPU/GPUPatterns.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
@@ -25,6 +24,7 @@
 #include "iree/compiler/Codegen/Utils/GPUUtils.h"
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Conversion/VectorToGPU/VectorToGPU.h"
diff --git a/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/BUILD.bazel b/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/BUILD.bazel
index c5d2427..bf66457 100644
--- a/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/BUILD.bazel
@@ -25,8 +25,8 @@
     deps = [
         # Dialects
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransformOps",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions:LinalgExtExtensions",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:AffineUtils",
diff --git a/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/CMakeLists.txt
index b6c02ce..06ac540 100644
--- a/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/TransformStrategies/CPU/CMakeLists.txt
@@ -21,8 +21,6 @@
     "ReductionStrategy.cpp"
   DEPS
     IREEDialectsTransforms
-    IREELinalgExtDialect
-    IREELinalgExtTransformOps
     IREELinalgTransformDialect
     LLVMSupport
     MLIRAffineDialect
@@ -61,6 +59,8 @@
     iree::compiler::Codegen::LLVMCPU::TransformExtensions::LLVMCPUExtensions
     iree::compiler::Codegen::TransformStrategies::Common::TransformStrategies
     iree::compiler::Dialect::Flow::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/BUILD.bazel b/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/BUILD.bazel
index 9ed8694..6771d92 100644
--- a/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/BUILD.bazel
@@ -24,8 +24,8 @@
     deps = [
         # Dialects
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransformOps",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions:LinalgExtExtensions",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:AffineUtils",
diff --git a/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/CMakeLists.txt
index 308fdec..0198dab 100644
--- a/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/TransformStrategies/Common/CMakeLists.txt
@@ -20,8 +20,6 @@
     "Common.cpp"
   DEPS
     IREEDialectsTransforms
-    IREELinalgExtDialect
-    IREELinalgExtTransformOps
     IREELinalgTransformDialect
     LLVMSupport
     MLIRAffineDialect
@@ -61,6 +59,8 @@
     MLIRVectorTransforms
     iree::compiler::Codegen::Common::TransformExtensions::CommonExtensions
     iree::compiler::Dialect::Flow::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/BUILD.bazel b/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/BUILD.bazel
index ccda82d..33ea8e9 100644
--- a/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/BUILD.bazel
@@ -40,8 +40,8 @@
     ],
     deps = [
         # Dialects
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransformOps",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions:LinalgExtExtensions",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:AffineUtils",
diff --git a/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/CMakeLists.txt
index e6efff3..48b44f3 100644
--- a/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/TransformStrategies/GPU/CMakeLists.txt
@@ -37,8 +37,6 @@
     "Strategies.cpp"
   DEPS
     IREEDialectsTransforms
-    IREELinalgExtDialect
-    IREELinalgExtTransformOps
     IREELinalgTransformDialect
     LLVMSupport
     MLIRAffineDialect
@@ -76,6 +74,8 @@
     iree::compiler::Codegen::Common::TransformExtensions::CommonExtensions
     iree::compiler::Codegen::LLVMGPU::TransformExtensions::LLVMGPUExtensions
     iree::compiler::Codegen::TransformStrategies::Common::TransformStrategies
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Transforms/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Transforms/BUILD.bazel
index 9afba5e..341edb2 100644
--- a/compiler/src/iree/compiler/Codegen/Transforms/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Transforms/BUILD.bazel
@@ -27,7 +27,7 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:AffineUtils",
diff --git a/compiler/src/iree/compiler/Codegen/Transforms/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Transforms/CMakeLists.txt
index 695bd98..5a96e4d 100644
--- a/compiler/src/iree/compiler/Codegen/Transforms/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Transforms/CMakeLists.txt
@@ -20,7 +20,6 @@
     "RemoveSingleIterationLoop.cpp"
     "Transforms.cpp"
   DEPS
-    IREELinalgExtTransforms
     LLVMSupport
     MLIRAffineDialect
     MLIRAffineUtils
@@ -42,6 +41,7 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Codegen/Transforms/Transforms.h b/compiler/src/iree/compiler/Codegen/Transforms/Transforms.h
index ad66c89..504df40 100644
--- a/compiler/src/iree/compiler/Codegen/Transforms/Transforms.h
+++ b/compiler/src/iree/compiler/Codegen/Transforms/Transforms.h
@@ -12,10 +12,10 @@
 #ifndef IREE_COMPILER_CODEGEN_TRANSFORMS_TRANSFORMS_H_
 #define IREE_COMPILER_CODEGEN_TRANSFORMS_TRANSFORMS_H_
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/SCF/Transforms/TileUsingInterface.h"
diff --git a/compiler/src/iree/compiler/Codegen/Utils/BUILD.bazel b/compiler/src/iree/compiler/Codegen/Utils/BUILD.bazel
index 7331428..eec2e7c 100644
--- a/compiler/src/iree/compiler/Codegen/Utils/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/Utils/BUILD.bazel
@@ -38,9 +38,9 @@
         "//compiler/src/iree/compiler/Codegen/Interfaces:UKernelOpInterface",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
         "@llvm-project//llvm:Support",
         "@llvm-project//llvm:TargetParser",
         "@llvm-project//mlir:AffineDialect",
diff --git a/compiler/src/iree/compiler/Codegen/Utils/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/Utils/CMakeLists.txt
index a99d7b3..cefe73e 100644
--- a/compiler/src/iree/compiler/Codegen/Utils/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/Utils/CMakeLists.txt
@@ -28,8 +28,6 @@
     "MarkerUtils.cpp"
     "Utils.cpp"
   DEPS
-    IREELinalgExtDialect
-    IREELinalgExtPasses
     LLVMSupport
     LLVMTargetParser
     MLIRAffineDialect
@@ -58,6 +56,8 @@
     iree::compiler::Codegen::Interfaces::UKernelOpInterface
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Utils
   PUBLIC
 )
diff --git a/compiler/src/iree/compiler/Codegen/Utils/MarkerUtils.cpp b/compiler/src/iree/compiler/Codegen/Utils/MarkerUtils.cpp
index 28669d5..7a18e2d 100644
--- a/compiler/src/iree/compiler/Codegen/Utils/MarkerUtils.cpp
+++ b/compiler/src/iree/compiler/Codegen/Utils/MarkerUtils.cpp
@@ -6,7 +6,7 @@
 
 #include "iree/compiler/Codegen/Utils/MarkerUtils.h"
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Operation.h"
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/BUILD.bazel b/compiler/src/iree/compiler/Codegen/VMVX/BUILD.bazel
index f3fc14e..cba8906 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/BUILD.bazel
+++ b/compiler/src/iree/compiler/Codegen/VMVX/BUILD.bazel
@@ -68,13 +68,13 @@
         "//compiler/src/iree/compiler/Codegen/Utils",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/VM/IR",
         "//compiler/src/iree/compiler/Dialect/VMVX/IR",
         "//compiler/src/iree/compiler/Dialect/VMVX/IR:VMVXDialect",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithDialect",
         "@llvm-project//mlir:BufferizationDialect",
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/CMakeLists.txt b/compiler/src/iree/compiler/Codegen/VMVX/CMakeLists.txt
index 0273e26..d5bf95f 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Codegen/VMVX/CMakeLists.txt
@@ -55,8 +55,6 @@
   DEPS
     ::PassHeaders
     ::PassesIncGen
-    IREELinalgExtDialect
-    IREELinalgExtPasses
     LLVMSupport
     MLIRArithDialect
     MLIRBufferizationDialect
@@ -78,6 +76,8 @@
     iree::compiler::Codegen::Utils
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::VM::IR
     iree::compiler::Dialect::VMVX::IR
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/KernelDispatch.cpp b/compiler/src/iree/compiler/Codegen/VMVX/KernelDispatch.cpp
index d0c0e16..762f1cd 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/KernelDispatch.cpp
+++ b/compiler/src/iree/compiler/Codegen/VMVX/KernelDispatch.cpp
@@ -6,10 +6,10 @@
 
 #include "iree/compiler/Codegen/VMVX/KernelDispatch.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/Utils/CPUUtils.h"
 #include "iree/compiler/Codegen/Utils/Utils.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 
 #define DEBUG_TYPE "vmvx-kernel-dispatch"
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/LowerLinalgMicrokernels.cpp b/compiler/src/iree/compiler/Codegen/VMVX/LowerLinalgMicrokernels.cpp
index 9e4f332..fc84b24 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/LowerLinalgMicrokernels.cpp
+++ b/compiler/src/iree/compiler/Codegen/VMVX/LowerLinalgMicrokernels.cpp
@@ -4,9 +4,9 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Codegen/VMVX/PassDetail.h"
 #include "iree/compiler/Codegen/VMVX/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/VMVX/IR/VMVXDialect.h"
 #include "iree/compiler/Dialect/VMVX/IR/VMVXOps.h"
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/Passes.cpp b/compiler/src/iree/compiler/Codegen/VMVX/Passes.cpp
index 15bf640..4ba9e57 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/Passes.cpp
+++ b/compiler/src/iree/compiler/Codegen/VMVX/Passes.cpp
@@ -6,11 +6,11 @@
 
 #include "mlir/Transforms/Passes.h"
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/Common/CPU/Passes.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/VMVX/PassDetail.h"
 #include "iree/compiler/Codegen/VMVX/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Pass/PassManager.h"
 
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/VMVXLowerExecutableTargetPass.cpp b/compiler/src/iree/compiler/Codegen/VMVX/VMVXLowerExecutableTargetPass.cpp
index b42b952..51d2fb9 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/VMVXLowerExecutableTargetPass.cpp
+++ b/compiler/src/iree/compiler/Codegen/VMVX/VMVXLowerExecutableTargetPass.cpp
@@ -4,13 +4,13 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/VMVX/PassDetail.h"
 #include "iree/compiler/Codegen/VMVX/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
diff --git a/compiler/src/iree/compiler/Codegen/VMVX/VMVXSelectLoweringStrategy.cpp b/compiler/src/iree/compiler/Codegen/VMVX/VMVXSelectLoweringStrategy.cpp
index 2951f82..afb0af0 100644
--- a/compiler/src/iree/compiler/Codegen/VMVX/VMVXSelectLoweringStrategy.cpp
+++ b/compiler/src/iree/compiler/Codegen/VMVX/VMVXSelectLoweringStrategy.cpp
@@ -4,7 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/VMVX/KernelDispatch.h"
@@ -12,6 +11,7 @@
 #include "iree/compiler/Codegen/VMVX/Passes.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/AnnotateDispatches.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/AnnotateDispatches.cpp
index 622cf1d..e2ac5cd 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/AnnotateDispatches.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/AnnotateDispatches.cpp
@@ -6,10 +6,10 @@
 
 #include <utility>
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Utils/StringUtils.h"
 #include "llvm/ADT/StringExtras.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/BUILD.bazel b/compiler/src/iree/compiler/Dialect/Flow/Transforms/BUILD.bazel
index f21c5dd..db86928 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/BUILD.bazel
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/BUILD.bazel
@@ -74,16 +74,15 @@
         "//compiler/src/iree/compiler/Dialect/Flow/Conversion/TensorToFlow",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions:LinalgExtExtensions",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
         "//compiler/src/iree/compiler/Dialect/Util/Analysis",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
         "//compiler/src/iree/compiler/Utils",
         "//llvm-external-projects/iree-dialects:IREEDialectsTransforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransformOps",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtUtils",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt
index 0dce4b2..cc01b43 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt
@@ -63,11 +63,6 @@
   DEPS
     ::PassesIncGen
     IREEDialectsTransforms
-    IREELinalgExtDialect
-    IREELinalgExtPasses
-    IREELinalgExtTransformOps
-    IREELinalgExtTransforms
-    IREELinalgExtUtils
     IREELinalgTransformDialect
     LLVMSupport
     MLIRAffineDialect
@@ -104,6 +99,10 @@
     iree::compiler::Dialect::Flow::Conversion::TensorToFlow
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
+    iree::compiler::Dialect::LinalgExt::Transforms
+    iree::compiler::Dialect::LinalgExt::Utils
     iree::compiler::Dialect::Util::Analysis
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::Util::Transforms
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/DispatchWithTransformDialect.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/DispatchWithTransformDialect.cpp
index c5993cf..3b5e18e 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/DispatchWithTransformDialect.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/DispatchWithTransformDialect.cpp
@@ -4,10 +4,10 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "llvm/Support/CommandLine.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp
index 9eac12d..73ddc20 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp
@@ -6,13 +6,13 @@
 
 #include "iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/ConvertRegionToWorkgroups.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/InitializeEmptyTensors.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/InitializeEmptyTensors.cpp
index 0c5cb6f..c80bc84 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/InitializeEmptyTensors.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/InitializeEmptyTensors.cpp
@@ -4,10 +4,10 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Arith/Utils/Utils.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/Passes.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/Passes.cpp
index 7669741..f453242 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/Passes.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/Passes.cpp
@@ -8,7 +8,7 @@
 
 #include <memory>
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
 #include "iree/compiler/Utils/PassUtils.h"
 #include "llvm/Support/ToolOutputFile.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.cpp
index 41389c8..6129744 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.cpp
@@ -6,9 +6,9 @@
 
 #include "iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/Support/CommandLine.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/SplitReduction.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/SplitReduction.cpp
index 34936ee..c5da616 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/SplitReduction.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/SplitReduction.cpp
@@ -10,10 +10,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/TensorPadToTensorInsertSlice.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/TensorPadToTensorInsertSlice.cpp
index b959857..805a073 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/TensorPadToTensorInsertSlice.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/TensorPadToTensorInsertSlice.cpp
@@ -10,9 +10,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Func/IR/FuncOps.h"
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/BUILD.bazel b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/BUILD.bazel
index 6880611..301f71b 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/BUILD.bazel
+++ b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/BUILD.bazel
@@ -42,8 +42,8 @@
         "//compiler/src/iree/compiler/Dialect/HAL/Target",
         "//compiler/src/iree/compiler/Dialect/HAL/Target:LLVMLinkerUtils",
         "//compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/Builtins",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//llvm:AArch64AsmParser",
         "@llvm-project//llvm:AArch64CodeGen",
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/CMakeLists.txt
index 8001fa6..7fb7e65 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/CMakeLists.txt
@@ -29,7 +29,6 @@
     ::LinkerTool
     ::StaticLibraryGenerator
     IREELLVMCPUTargetDeps
-    IREELinalgExtDialect
     IREELinalgTransformDialect
     LLVMAnalysis
     LLVMBitReader
@@ -56,6 +55,7 @@
     iree::compiler::Dialect::HAL::Target
     iree::compiler::Dialect::HAL::Target::LLVMCPU::Builtins
     iree::compiler::Dialect::HAL::Target::LLVMLinkerUtils
+    iree::compiler::Dialect::LinalgExt::IR
     iree::compiler::Utils
   PUBLIC
 )
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/LLVMCPUTarget.cpp b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/LLVMCPUTarget.cpp
index 634e7ed..c4e59f5 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/LLVMCPUTarget.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/Target/LLVMCPU/LLVMCPUTarget.cpp
@@ -9,7 +9,6 @@
 #include <cstdlib>
 #include <unordered_set>
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
 #include "iree/compiler/Codegen/LLVMCPU/Passes.h"
 #include "iree/compiler/Codegen/LLVMCPU/Utils.h"
@@ -23,6 +22,7 @@
 #include "iree/compiler/Dialect/HAL/Target/LLVMCPU/StaticLibraryGenerator.h"
 #include "iree/compiler/Dialect/HAL/Target/LLVMLinkerUtils.h"
 #include "iree/compiler/Dialect/HAL/Target/TargetRegistry.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 #include "iree/compiler/Utils/ModuleUtils.h"
 #include "llvm/Analysis/TargetTransformInfo.h"
 #include "llvm/Bitcode/BitcodeReader.h"
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/BUILD.bazel
new file mode 100644
index 0000000..7c309b6
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/BUILD.bazel
@@ -0,0 +1,11 @@
+# Copyright 2024 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
+
+package(
+    default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/CMakeLists.txt
new file mode 100644
index 0000000..890fb43
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/CMakeLists.txt
@@ -0,0 +1,13 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/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()
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/BUILD.bazel
new file mode 100644
index 0000000..9d9deae
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/BUILD.bazel
@@ -0,0 +1,214 @@
+# Copyright 2024 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_gentbl_cc_library", "iree_tablegen_doc", "iree_td_library")
+load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
+
+package(
+    default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_td_library(
+    name = "td_files",
+    srcs = enforce_glob(
+        [
+            "LinalgExtBase.td",
+            "LinalgExtInterfaces.td",
+            "LinalgExtOps.td",
+        ],
+        include = ["*.td"],
+    ),
+    deps = [
+        "@llvm-project//mlir:BuiltinDialectTdFiles",
+        "@llvm-project//mlir:CallInterfacesTdFiles",
+        "@llvm-project//mlir:ControlFlowInterfacesTdFiles",
+        "@llvm-project//mlir:DestinationStyleOpInterfaceTdFiles",
+        "@llvm-project//mlir:InferTypeOpInterfaceTdFiles",
+        "@llvm-project//mlir:OpBaseTdFiles",
+        "@llvm-project//mlir:PDLDialectTdFiles",
+        "@llvm-project//mlir:SideEffectInterfacesTdFiles",
+        "@llvm-project//mlir:TilingInterfaceTdFiles",
+        "@llvm-project//mlir:TransformDialectTdFiles",
+        "@llvm-project//mlir:ViewLikeInterfaceTdFiles",
+    ],
+)
+
+iree_compiler_cc_library(
+    name = "IR",
+    srcs = [
+        "LinalgExtAttrs.cpp.inc",
+        "LinalgExtDialect.cpp",
+        "LinalgExtDialect.cpp.inc",
+        "LinalgExtEnums.cpp.inc",
+        "LinalgExtInterfaces.cpp",
+        "LinalgExtInterfaces.cpp.inc",
+        "LinalgExtOps.cpp",
+        "LinalgExtOps.cpp.inc",
+        "LinalgExtTypes.cpp.inc",
+    ],
+    hdrs = [
+        "LinalgExtAttrs.h.inc",
+        "LinalgExtDialect.h",
+        "LinalgExtDialect.h.inc",
+        "LinalgExtEnums.h.inc",
+        "LinalgExtInterfaces.h",
+        "LinalgExtInterfaces.h.inc",
+        "LinalgExtOps.h",
+        "LinalgExtOps.h.inc",
+        "LinalgExtTypes.h.inc",
+    ],
+    deps = [
+        ":LinalgExtEnumsGen",
+        ":LinalgExtInterfacesIncGen",
+        ":LinalgExtOpsIncGen",
+        ":LinalgExtTypesGen",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
+        "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:AffineDialect",
+        "@llvm-project//mlir:AffineUtils",
+        "@llvm-project//mlir:ArithDialect",
+        "@llvm-project//mlir:ArithUtils",
+        "@llvm-project//mlir:ControlFlowInterfaces",
+        "@llvm-project//mlir:DestinationStyleOpInterface",
+        "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
+        "@llvm-project//mlir:FunctionInterfaces",
+        "@llvm-project//mlir:IR",
+        "@llvm-project//mlir:InferTypeOpInterface",
+        "@llvm-project//mlir:LinalgDialect",
+        "@llvm-project//mlir:LinalgUtils",
+        "@llvm-project//mlir:MathDialect",
+        "@llvm-project//mlir:MemRefDialect",
+        "@llvm-project//mlir:Pass",
+        "@llvm-project//mlir:SCFDialect",
+        "@llvm-project//mlir:SideEffectInterfaces",
+        "@llvm-project//mlir:Support",
+        "@llvm-project//mlir:TensorDialect",
+        "@llvm-project//mlir:TensorUtils",
+        "@llvm-project//mlir:TilingInterface",
+        "@llvm-project//mlir:ViewLikeInterface",
+    ],
+)
+
+iree_gentbl_cc_library(
+    name = "LinalgExtEnumsGen",
+    tbl_outs = [
+        (
+            ["--gen-enum-decls"],
+            "LinalgExtEnums.h.inc",
+        ),
+        (
+            ["--gen-enum-defs"],
+            "LinalgExtEnums.cpp.inc",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "LinalgExtBase.td",
+    deps = [":td_files"],
+)
+
+iree_gentbl_cc_library(
+    name = "LinalgExtInterfacesIncGen",
+    tbl_outs = [
+        (
+            ["--gen-op-interface-decls"],
+            "LinalgExtInterfaces.h.inc",
+        ),
+        (
+            ["--gen-op-interface-defs"],
+            "LinalgExtInterfaces.cpp.inc",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "LinalgExtInterfaces.td",
+    deps = [":td_files"],
+)
+
+iree_gentbl_cc_library(
+    name = "LinalgExtOpsIncGen",
+    tbl_outs = [
+        (
+            ["--gen-op-decls"],
+            "LinalgExtOps.h.inc",
+        ),
+        (
+            ["--gen-op-defs"],
+            "LinalgExtOps.cpp.inc",
+        ),
+        (
+            [
+                "--dialect=iree_linalg_ext",
+                "--gen-dialect-decls",
+            ],
+            "LinalgExtDialect.h.inc",
+        ),
+        (
+            [
+                "--dialect=iree_linalg_ext",
+                "--gen-dialect-defs",
+            ],
+            "LinalgExtDialect.cpp.inc",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "LinalgExtOps.td",
+    deps = [":td_files"],
+)
+
+iree_gentbl_cc_library(
+    name = "LinalgExtTypesGen",
+    tbl_outs = [
+        (
+            [
+                "--gen-attrdef-decls",
+                "--attrdefs-dialect=iree_linalg_ext",
+            ],
+            "LinalgExtAttrs.h.inc",
+        ),
+        (
+            [
+                "--gen-attrdef-defs",
+                "--attrdefs-dialect=iree_linalg_ext",
+            ],
+            "LinalgExtAttrs.cpp.inc",
+        ),
+        (
+            [
+                "--gen-typedef-decls",
+                "--typedefs-dialect=iree_linalg_ext",
+            ],
+            "LinalgExtTypes.h.inc",
+        ),
+        (
+            [
+                "--gen-typedef-defs",
+                "--typedefs-dialect=iree_linalg_ext",
+            ],
+            "LinalgExtTypes.cpp.inc",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "LinalgExtBase.td",
+    deps = [":td_files"],
+)
+
+iree_tablegen_doc(
+    name = "LinalgExtDialectDocGen",
+    tbl_outs = [
+        (
+            [
+                "--gen-dialect-doc",
+                "-dialect=iree_linalg_ext",
+            ],
+            "LinalgExtDialect.md",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "LinalgExtOps.td",
+    deps = [":td_files"],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/CMakeLists.txt
new file mode 100644
index 0000000..1fb81e3
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/CMakeLists.txt
@@ -0,0 +1,121 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/IR/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_cc_library(
+  NAME
+    IR
+  HDRS
+    "LinalgExtAttrs.h.inc"
+    "LinalgExtDialect.h"
+    "LinalgExtDialect.h.inc"
+    "LinalgExtEnums.h.inc"
+    "LinalgExtInterfaces.h"
+    "LinalgExtInterfaces.h.inc"
+    "LinalgExtOps.h"
+    "LinalgExtOps.h.inc"
+    "LinalgExtTypes.h.inc"
+  SRCS
+    "LinalgExtAttrs.cpp.inc"
+    "LinalgExtDialect.cpp"
+    "LinalgExtDialect.cpp.inc"
+    "LinalgExtEnums.cpp.inc"
+    "LinalgExtInterfaces.cpp"
+    "LinalgExtInterfaces.cpp.inc"
+    "LinalgExtOps.cpp"
+    "LinalgExtOps.cpp.inc"
+    "LinalgExtTypes.cpp.inc"
+  DEPS
+    ::LinalgExtEnumsGen
+    ::LinalgExtInterfacesIncGen
+    ::LinalgExtOpsIncGen
+    ::LinalgExtTypesGen
+    LLVMSupport
+    MLIRAffineDialect
+    MLIRAffineUtils
+    MLIRArithDialect
+    MLIRArithUtils
+    MLIRControlFlowInterfaces
+    MLIRDestinationStyleOpInterface
+    MLIRFuncDialect
+    MLIRFunctionInterfaces
+    MLIRIR
+    MLIRInferTypeOpInterface
+    MLIRLinalgDialect
+    MLIRLinalgUtils
+    MLIRMathDialect
+    MLIRMemRefDialect
+    MLIRPass
+    MLIRSCFDialect
+    MLIRSideEffectInterfaces
+    MLIRSupport
+    MLIRTensorDialect
+    MLIRTensorUtils
+    MLIRTilingInterface
+    MLIRViewLikeInterface
+    iree::compiler::Dialect::LinalgExt::Utils
+  PUBLIC
+)
+
+iree_tablegen_library(
+  NAME
+    LinalgExtEnumsGen
+  TD_FILE
+    "LinalgExtBase.td"
+  OUTS
+    --gen-enum-decls LinalgExtEnums.h.inc
+    --gen-enum-defs LinalgExtEnums.cpp.inc
+)
+
+iree_tablegen_library(
+  NAME
+    LinalgExtInterfacesIncGen
+  TD_FILE
+    "LinalgExtInterfaces.td"
+  OUTS
+    --gen-op-interface-decls LinalgExtInterfaces.h.inc
+    --gen-op-interface-defs LinalgExtInterfaces.cpp.inc
+)
+
+iree_tablegen_library(
+  NAME
+    LinalgExtOpsIncGen
+  TD_FILE
+    "LinalgExtOps.td"
+  OUTS
+    --gen-op-decls LinalgExtOps.h.inc
+    --gen-op-defs LinalgExtOps.cpp.inc
+    --dialect=iree_linalg_ext --gen-dialect-decls LinalgExtDialect.h.inc
+    --dialect=iree_linalg_ext --gen-dialect-defs LinalgExtDialect.cpp.inc
+)
+
+iree_tablegen_library(
+  NAME
+    LinalgExtTypesGen
+  TD_FILE
+    "LinalgExtBase.td"
+  OUTS
+    --gen-attrdef-decls --attrdefs-dialect=iree_linalg_ext LinalgExtAttrs.h.inc
+    --gen-attrdef-defs --attrdefs-dialect=iree_linalg_ext LinalgExtAttrs.cpp.inc
+    --gen-typedef-decls --typedefs-dialect=iree_linalg_ext LinalgExtTypes.h.inc
+    --gen-typedef-defs --typedefs-dialect=iree_linalg_ext LinalgExtTypes.cpp.inc
+)
+
+iree_tablegen_doc(
+  NAME
+    LinalgExtDialectDocGen
+  TD_FILE
+    "LinalgExtOps.td"
+  OUTS
+    --gen-dialect-doc -dialect=iree_linalg_ext LinalgExtDialect.md
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtBase.td b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtBase.td
similarity index 100%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtBase.td
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtBase.td
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtDialect.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.cpp
similarity index 77%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtDialect.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.cpp
index 006446b..0b3215d 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtDialect.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.cpp
@@ -4,25 +4,25 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/TypeSwitch.h"
+#include "llvm/Support/SourceMgr.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/DialectImplementation.h"
 #include "mlir/IR/OpDefinition.h"
 #include "mlir/IR/OpImplementation.h"
 #include "mlir/Transforms/InliningUtils.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/TypeSwitch.h"
-#include "llvm/Support/SourceMgr.h"
 
 using namespace mlir;
 using namespace mlir::iree_compiler::IREE::LinalgExt;
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtEnums.cpp.inc" // IWYU pragma: keep
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtEnums.cpp.inc" // IWYU pragma: keep
 
 #define GET_ATTRDEF_CLASSES
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtAttrs.cpp.inc" // IWYU pragma: keep
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtAttrs.cpp.inc" // IWYU pragma: keep
 
 // Used to control inlining behavior.
 struct IREELinalgExtInlinerInterface : public DialectInlinerInterface {
@@ -51,13 +51,13 @@
 
   addAttributes<
 #define GET_ATTRDEF_LIST
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtAttrs.cpp.inc"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtAttrs.cpp.inc"
       >();
 
 #define GET_OP_LIST
   addOperations<
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.cpp.inc"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp.inc"
       >();
 }
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.cpp.inc"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.cpp.inc"
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h
similarity index 61%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h
index a9fe5d9..22b8804 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h
@@ -4,14 +4,14 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTDIALECT_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTDIALECT_H_
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTDIALECT_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTDIALECT_H_
 
 #include "mlir/IR/Dialect.h"
 #include "mlir/IR/OpDefinition.h"
 
 // clang-format off: must be included after all LLVM/MLIR headers
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h.inc" // IWYU pragma: keep
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h.inc" // IWYU pragma: keep
 // clang-format on
 
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTDIALECT_H_
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTDIALECT_H_
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp
similarity index 84%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp
index 1439ac0..32172e5 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
@@ -26,16 +26,16 @@
   return success();
 }
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOpInterfaces.cpp.inc" // IWYU pragma: export
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp.inc" // IWYU pragma: export
 
 template <typename Ty, typename DimOpTy>
 static void getDimValues(OpBuilder &b, Location loc, Value v, Ty t,
                          SmallVector<OpFoldResult> &dimVals) {
-  for (auto dim : llvm::enumerate(t.getShape())) {
-    if (ShapedType::isDynamic(dim.value())) {
-      dimVals.push_back(b.create<DimOpTy>(loc, v, dim.index()).getResult());
+  for (auto [idx, val] : llvm::enumerate(t.getShape())) {
+    if (ShapedType::isDynamic(val)) {
+      dimVals.push_back(b.create<DimOpTy>(loc, v, idx).getResult());
     } else {
-      dimVals.push_back(b.getIndexAttr(dim.value()));
+      dimVals.push_back(b.getIndexAttr(val));
     }
   }
 }
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h
new file mode 100644
index 0000000..2933351
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h
@@ -0,0 +1,32 @@
+// Copyright 2021 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
+
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTINTERFACES_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTINTERFACES_H_
+
+#include "mlir/IR/Builders.h"
+#include "mlir/IR/BuiltinTypes.h"
+#include "mlir/IR/IRMapping.h"
+#include "mlir/IR/OpDefinition.h"
+#include "mlir/Interfaces/DestinationStyleOpInterface.h"
+#include "mlir/Interfaces/InferTypeOpInterface.h"
+#include "mlir/Support/LLVM.h"
+
+namespace mlir::iree_compiler::IREE::LinalgExt {
+class LinalgExtOp;
+
+namespace detail {
+LogicalResult verifyLinalgExtOpInterface(Operation *op);
+}
+
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h.inc" // IWYU pragma: export
+
+/// Include the generated interface declarations.
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h.inc" // IWYU pragma: export
+
+} // namespace mlir::iree_compiler::IREE::LinalgExt
+
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTINTERFACES_H_
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.td b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.td
similarity index 96%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.td
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.td
index 8a0a6c0..f69e46b 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.td
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.td
@@ -7,7 +7,7 @@
 #ifndef IREE_DIALECT_LINALGEXT_INTERFACES
 #define IREE_DIALECT_LINALGEXT_INTERFACES
 
-include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtBase.td"
+include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtBase.td"
 
 // The interface is a subset of LinalgStructuredInterface.
 def LinalgExtInterface : OpInterface<"LinalgExtOp"> {
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp
similarity index 94%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp
index dbcdfcd..95003be 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp
@@ -4,9 +4,13 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SetVector.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/Utils.h"
 #include "mlir/Dialect/Arith/Utils/Utils.h"
@@ -27,10 +31,6 @@
 #include "mlir/Support/LLVM.h"
 #include "mlir/Support/LogicalResult.h"
 #include "mlir/Support/MathExtras.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SetVector.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/TypeSwitch.h"
 
 using namespace mlir;
 using namespace mlir::iree_compiler::IREE::LinalgExt;
@@ -41,8 +41,9 @@
 //===----------------------------------------------------------------------===//
 
 static Type getComplexElementTypeOrSelf(Type ty) {
-  if (auto complex = dyn_cast_or_null<ComplexType>(ty))
+  if (auto complex = dyn_cast_or_null<ComplexType>(ty)) {
     return complex.getElementType();
+  }
   return ty;
 }
 
@@ -91,13 +92,16 @@
 /// rank). c) the number of elements in `dimsPos` is > than `rank`.
 static bool isInvalid(ArrayRef<int64_t> dimsPos, int64_t rank) {
   // early exit.
-  if (dimsPos.size() > rank)
+  if (dimsPos.size() > rank) {
     return true;
+  }
   DenseSet<int64_t> uniqued;
-  for (int64_t dim : dimsPos)
+  for (int64_t dim : dimsPos) {
     uniqued.insert(dim);
-  if (dimsPos.size() != uniqued.size())
+  }
+  if (dimsPos.size() != uniqued.size()) {
     return true;
+  }
   return llvm::any_of(
       dimsPos, [rank](int64_t dimPos) { return dimPos < 0 || dimPos >= rank; });
 }
@@ -109,13 +113,14 @@
   assert(
       sourceShape.size() == limitShape.size() &&
       "expected source shape rank, and limit of the shape to have same rank");
-  return llvm::all_of(
-      llvm::zip(sourceShape, limitShape), [](std::tuple<int64_t, int64_t> it) {
-        int64_t sourceExtent = std::get<0>(it);
-        int64_t limit = std::get<1>(it);
-        return ShapedType::isDynamic(sourceExtent) ||
-               ShapedType::isDynamic(limit) || sourceExtent <= limit;
-      });
+  return llvm::all_of(llvm::zip_equal(sourceShape, limitShape),
+                      [](std::tuple<int64_t, int64_t> it) {
+                        int64_t sourceExtent = std::get<0>(it);
+                        int64_t limit = std::get<1>(it);
+                        return ShapedType::isDynamic(sourceExtent) ||
+                               ShapedType::isDynamic(limit) ||
+                               sourceExtent <= limit;
+                      });
 }
 
 //===----------------------------------------------------------------------===//
@@ -151,8 +156,9 @@
   }
 
   auto originalType = getOriginalType();
-  if (isInvalid(dimMap, originalType.getRank()))
+  if (isInvalid(dimMap, originalType.getRank())) {
     return op->emitOpError("dimension map is invalid");
+  }
 
   // The first dimension of the indices should match the first dimension of the
   // output. They indicate to the number of updates.
@@ -180,9 +186,9 @@
   // original tensor.
   int64_t fullSliceDims = originalType.getRank() - indexDepth;
   for (auto it :
-       llvm::zip(llvm::seq<unsigned>(indexDepth, originalType.getRank()),
-                 llvm::seq<unsigned>(updateType.getRank() - fullSliceDims,
-                                     updateType.getRank()))) {
+       llvm::zip_equal(llvm::seq<unsigned>(indexDepth, originalType.getRank()),
+                       llvm::seq<unsigned>(updateType.getRank() - fullSliceDims,
+                                           updateType.getRank()))) {
     int64_t originalDim = std::get<0>(it);
     int64_t updateDim = std::get<1>(it);
     if (!originalType.isDynamicDim(originalDim) &&
@@ -195,7 +201,7 @@
 
   // Check that the remaining update indices do not exceed the update length.
   int64_t insertDims = originalType.getRank() - updateType.getRank() + 1;
-  for (auto it : llvm::zip(
+  for (auto it : llvm::zip_equal(
            llvm::seq<unsigned>(insertDims, indexDepth),
            llvm::seq<unsigned>(1, updateType.getRank() - fullSliceDims))) {
     int64_t originalDim = std::get<0>(it);
@@ -361,8 +367,8 @@
   auto updateIvs = ivs.drop_front(1);
 
   int64_t offset = starts.size() - updateIvs.size();
-  for (auto it : llvm::enumerate(updateIvs)) {
-    starts[it.index() + offset] = it.value();
+  for (auto [idx, iv] : llvm::enumerate(updateIvs)) {
+    starts[idx + offset] = iv;
   }
 
   ArrayRef<int64_t> dimMap = getDimensionMap();
@@ -430,8 +436,7 @@
   }
 
   ArrayRef<int64_t> shape = getOperandShape();
-  for (auto indexedOperand : llvm::enumerate(getOutputs())) {
-    int index = indexedOperand.index();
+  for (auto [index, operand] : llvm::enumerate(getOutputs())) {
     auto operandType = getOperandType(index);
     if (operandType.getRank() != rank) {
       return op->emitOpError("expected operand ")
@@ -497,10 +502,10 @@
   auto oneAttr = builder.getI64IntegerAttr(1);
   SmallVector<OpFoldResult> strides(rank, oneAttr);
   SmallVector<Value> tiledOperands(getOutputs().size());
-  for (auto en : llvm::enumerate(getOutputs())) {
-    tiledOperands[en.index()] =
-        getSlice(builder, getLoc(), en.value(), offsets, sizes, strides);
-    assert(tiledOperands[en.index()] && "failed to get slice of operand");
+  for (auto [idx, output] : llvm::enumerate(getOutputs())) {
+    tiledOperands[idx] =
+        getSlice(builder, getLoc(), output, offsets, sizes, strides);
+    assert(tiledOperands[idx] && "failed to get slice of operand");
   }
   SmallVector<Type, 4> resultTypes;
   if (getNumResults()) {
@@ -558,7 +563,7 @@
     OpBuilder::InsertionGuard guard(b);
     auto &block = region.front();
     b.setInsertionPointToEnd(&block);
-    for (auto it : llvm::zip(srcBlock.getArguments(), sortBlkArgs)) {
+    for (auto it : llvm::zip_equal(srcBlock.getArguments(), sortBlkArgs)) {
       bvm.map(std::get<0>(it), std::get<1>(it));
     }
     for (auto &blockOp : srcBlock.without_terminator()) {
@@ -646,12 +651,12 @@
   Location loc = getLoc();
   Value zero = builder.create<arith::ConstantIndexOp>(loc, 0);
   Value one = builder.create<arith::ConstantIndexOp>(loc, 1);
-  for (auto en : llvm::enumerate(getOperandShape().drop_back())) {
+  for (auto [idx, val] : llvm::enumerate(getOperandShape().drop_back())) {
     Value size;
-    if (ShapedType::isDynamic(en.value())) {
-      size = getDimValue(builder, loc, getReal(), en.index());
+    if (ShapedType::isDynamic(val)) {
+      size = getDimValue(builder, loc, getReal(), idx);
     } else {
-      size = builder.create<arith::ConstantIndexOp>(loc, en.value());
+      size = builder.create<arith::ConstantIndexOp>(loc, val);
     }
     res.emplace_back(Range{/*offset=*/zero, size, /*stride=*/one});
   }
@@ -880,10 +885,11 @@
   }
   SmallVector<int64_t> expectedAccumulatorShape;
   for (int i = 0; i < inputType.getRank(); i++) {
-    if (i != getDimension())
+    if (i != getDimension()) {
       expectedAccumulatorShape.push_back(inputShapes[i]);
+    }
   }
-  if (llvm::any_of(llvm::zip(expectedAccumulatorShape, accumulatorShape),
+  if (llvm::any_of(llvm::zip_equal(expectedAccumulatorShape, accumulatorShape),
                    [](std::tuple<int64_t, int64_t> s) {
                      return !ShapedType::isDynamic(std::get<0>(s)) &&
                             !ShapedType::isDynamic(std::get<1>(s)) &&
@@ -898,7 +904,7 @@
   if (inputShapes.size() != outputShapes.size()) {
     return op->emitOpError("expected input/output to have identical ranks");
   }
-  if (llvm::any_of(llvm::zip(inputShapes, outputShapes),
+  if (llvm::any_of(llvm::zip_equal(inputShapes, outputShapes),
                    [](std::tuple<int64_t, int64_t> s) {
                      return !ShapedType::isDynamic(std::get<0>(s)) &&
                             !ShapedType::isDynamic(std::get<1>(s)) &&
@@ -952,8 +958,9 @@
   bool isInclusive = getInclusive();
   SmallVector<Value> accIndices;
   for (int i = 0; i < indices.size(); i++) {
-    if (i != scanDim)
+    if (i != scanDim) {
       accIndices.push_back(indices[i]);
+    }
   }
 
   auto scfIf = b.create<scf::IfOp>(
@@ -990,7 +997,7 @@
     OpBuilder::InsertionGuard guard(b);
     auto &block = region.front();
     b.setInsertionPointToEnd(&block);
-    for (auto it : llvm::zip(srcBlock.getArguments(), scanBlkArgs)) {
+    for (auto it : llvm::zip_equal(srcBlock.getArguments(), scanBlkArgs)) {
       bvm.map(std::get<0>(it), std::get<1>(it));
     }
     for (auto &blockOp : srcBlock.without_terminator()) {
@@ -1105,7 +1112,7 @@
   if (inputShapes.size() != outputShapes.size()) {
     return op->emitOpError("expexted input/output to have identical ranks");
   }
-  if (llvm::any_of(llvm::zip(inputShapes, outputShapes),
+  if (llvm::any_of(llvm::zip_equal(inputShapes, outputShapes),
                    [](std::tuple<int64_t, int64_t> s) {
                      return !ShapedType::isDynamic(std::get<0>(s)) &&
                             !ShapedType::isDynamic(std::get<1>(s)) &&
@@ -1272,24 +1279,27 @@
   // Input indicies and values must have the same shape.
   if (auto inputIndices = indices()) {
     auto inputIndicesType = inputIndices->getType().cast<ShapedType>();
-    if (failed(verifyCompatibleShape(inputValuesType, inputIndicesType)))
+    if (failed(verifyCompatibleShape(inputValuesType, inputIndicesType))) {
       return op->emitOpError("input indices/values shape must match");
+    }
   }
   // Output indicies and values must have the same shape.
-  if (failed(verifyCompatibleShape(outputValuesType, outputIndicesType)))
+  if (failed(verifyCompatibleShape(outputValuesType, outputIndicesType))) {
     return op->emitOpError("output indices/values shape must match");
+  }
   // Input shape must match the output shape except for the dimension()
   uint64_t dim = getDimension();
-  if (!llvm::all_of(llvm::enumerate(llvm::zip(inputValuesType.getShape(),
-                                              outputValuesType.getShape())),
-                    [dim](auto e) {
-                      if (e.index() == dim) {
-                        return true;
-                      }
-                      std::tuple<int64_t, int64_t> s = e.value();
-                      return succeeded(verifyCompatibleShape(std::get<0>(s),
-                                                             std::get<1>(s)));
-                    })) {
+  if (!llvm::all_of(
+          llvm::enumerate(llvm::zip_equal(inputValuesType.getShape(),
+                                          outputValuesType.getShape())),
+          [dim](auto e) {
+            if (e.index() == dim) {
+              return true;
+            }
+            std::tuple<int64_t, int64_t> s = e.value();
+            return succeeded(
+                verifyCompatibleShape(std::get<0>(s), std::get<1>(s)));
+          })) {
     return op->emitOpError("incompatible input/output shapes");
   }
   // Check region compatibility
@@ -1315,11 +1325,10 @@
   Value zero = builder.create<arith::ConstantIndexOp>(loc, 0);
   Value one = builder.create<arith::ConstantIndexOp>(loc, 1);
   Value source = values();
-  for (auto dim : llvm::enumerate(getInputType().getShape())) {
-    loopBounds[dim.index()].offset = zero;
-    loopBounds[dim.index()].size =
-        getDimValue(builder, loc, source, dim.index());
-    loopBounds[dim.index()].stride = one;
+  for (auto [idx, val] : llvm::enumerate(getInputType().getShape())) {
+    loopBounds[idx].offset = zero;
+    loopBounds[idx].size = getDimValue(builder, loc, source, idx);
+    loopBounds[idx].stride = one;
   }
   return loopBounds;
 }
@@ -1384,10 +1393,10 @@
     b.setInsertionPointToEnd(&scfFor.getRegion().front());
     SmallVector<Value> forwardValues{loopCarryValues[0], kValue};
     SmallVector<Value> reverseValues{kValue, loopCarryValues[0]};
-    for (auto it : llvm::zip(srcBlock.getArguments(), forwardValues)) {
+    for (auto it : llvm::zip_equal(srcBlock.getArguments(), forwardValues)) {
       bvmF.map(std::get<0>(it), std::get<1>(it));
     }
-    for (auto it : llvm::zip(srcBlock.getArguments(), reverseValues)) {
+    for (auto it : llvm::zip_equal(srcBlock.getArguments(), reverseValues)) {
       bvmR.map(std::get<0>(it), std::get<1>(it));
     }
     for (auto &blockOp : srcBlock.without_terminator()) {
@@ -1533,10 +1542,11 @@
   unsigned dynamicValIndex = 0;
   OpBuilder b(op.getContext());
   for (int64_t tileSize : op.getStaticInnerTiles()) {
-    if (!ShapedType::isDynamic(tileSize))
+    if (!ShapedType::isDynamic(tileSize)) {
       mixedInnerTiles.push_back(b.getIndexAttr(tileSize));
-    else
+    } else {
       mixedInnerTiles.push_back(op.getInnerTiles()[dynamicValIndex++]);
+    }
   }
   return mixedInnerTiles;
 }
@@ -1566,8 +1576,9 @@
   assert(tiles.size() == dimsToBlock.size() &&
          "tiles must match indices of dimension to block");
   // bind the dimension with the tile factor.
-  for (auto i : llvm::seq<int64_t>(0, dimsToBlock.size()))
+  for (auto i : llvm::seq<int64_t>(0, dimsToBlock.size())) {
     dimAndTileMapping[dimsToBlock[i]] = tiles[i];
+  }
   return dimAndTileMapping;
 }
 
@@ -1607,12 +1618,15 @@
   ArrayRef<int64_t> outerDimPerm = packOrUnPack.getOuterDimsPerm();
   // Verify tiles. Make sure each provided tile is non-zero.
   SmallVector<OpFoldResult> mixedTiles = packOrUnPack.getMixedTiles();
-  if (hasZeros(mixedTiles))
+  if (hasZeros(mixedTiles)) {
     return op->emitError("invalid tile factor");
-  if (isInvalid(innerDimsPos, unpackedRank))
+  }
+  if (isInvalid(innerDimsPos, unpackedRank)) {
     return op->emitError("invalid inner_dims_pos vector");
-  if (isInvalid(outerDimPerm, unpackedRank))
+  }
+  if (isInvalid(outerDimPerm, unpackedRank)) {
     return op->emitError("invalid outer_dims_perm vector");
+  }
   if (mixedTiles.size() != innerDimsPos.size()) {
     return op->emitError(
         "blocking factors must equal the number of dimensions to block");
@@ -1646,8 +1660,8 @@
            << expectedPackedType << ", got " << packedType;
   }
   if (!llvm::all_of(
-          llvm::zip(packedType.getShape().take_back(mixedTiles.size()),
-                    mixedTiles),
+          llvm::zip_equal(packedType.getShape().take_back(mixedTiles.size()),
+                          mixedTiles),
           [](std::tuple<int64_t, OpFoldResult> it) {
             std::optional<int64_t> constTileSize =
                 getConstantIntValue(std::get<1>(it));
@@ -1691,8 +1705,9 @@
   dispatchIndexOpFoldResults(innerTiles, dynamicTileSizes, staticTileSizes);
   SmallVector<Type> resultType;
   auto outputType = output.getType();
-  if (outputType.isa<RankedTensorType>())
+  if (outputType.isa<RankedTensorType>()) {
     resultType.push_back(outputType);
+  }
   build(builder, state, resultType, source, output,
         outerDimsPerm.empty() ? nullptr
                               : builder.getDenseI64ArrayAttr(outerDimsPerm),
@@ -1741,15 +1756,15 @@
     ArrayRef<int64_t> sourceShape, ArrayRef<int64_t> innerTileSizes,
     ArrayRef<int64_t> innerDimsPos, ArrayRef<int64_t> outerDimsPerm) {
   SmallVector<int64_t> resultShape = llvm::to_vector(sourceShape);
-  for (auto tiledDim : llvm::enumerate(innerDimsPos)) {
-    if (ShapedType::isDynamic(resultShape[tiledDim.value()]))
-      continue;
-    if (ShapedType::isDynamic(innerTileSizes[tiledDim.index()])) {
-      resultShape[tiledDim.value()] = ShapedType::kDynamic;
+  for (auto [idx, tiledDim] : llvm::enumerate(innerDimsPos)) {
+    if (ShapedType::isDynamic(resultShape[tiledDim])) {
       continue;
     }
-    resultShape[tiledDim.value()] = ceilDiv(resultShape[tiledDim.value()],
-                                            innerTileSizes[tiledDim.index()]);
+    if (ShapedType::isDynamic(innerTileSizes[idx])) {
+      resultShape[tiledDim] = ShapedType::kDynamic;
+      continue;
+    }
+    resultShape[tiledDim] = ceilDiv(resultShape[tiledDim], innerTileSizes[idx]);
   }
 
   // Swap tile loops if outer_dims_perm is available.
@@ -1769,10 +1784,9 @@
   AffineExpr s0, s1;
   bindSymbols(builder.getContext(), s0, s1);
   AffineExpr ceilDivExpr = s0.ceilDiv(s1);
-  for (auto tiledDim : llvm::enumerate(innerDimsPos)) {
-    resultDims[tiledDim.value()] = affine::makeComposedFoldedAffineApply(
-        builder, loc, ceilDivExpr,
-        {resultDims[tiledDim.value()], innerTileSizes[tiledDim.index()]});
+  for (auto [idx, tiledDim] : llvm::enumerate(innerDimsPos)) {
+    resultDims[tiledDim] = affine::makeComposedFoldedAffineApply(
+        builder, loc, ceilDivExpr, {resultDims[tiledDim], innerTileSizes[idx]});
   }
   if (!outerDimsPerm.empty()) {
     resultDims =
@@ -1790,8 +1804,9 @@
   // use dispatchIndexOpFoldResults on the result, and rely on exact number of
   // dynamic dims returned by that.
   for (unsigned i = 0; i < resultDims.size(); ++i) {
-    if (!ShapedType::isDynamic(resultTypeShape[i]))
+    if (!ShapedType::isDynamic(resultTypeShape[i])) {
       continue;
+    }
     resultDims[i] =
         getValueOrCreateConstantIndexOp(builder, loc, resultDims[i]);
   }
@@ -1925,8 +1940,9 @@
   // non data-tile dimensions.
   SmallVector<Value> ivVec = llvm::to_vector(ivs);
   ReifiedRankedShapedTypeDims outputShape;
-  if (failed(reifyResultShapes(builder, outputShape)))
+  if (failed(reifyResultShapes(builder, outputShape))) {
     return getOperation()->emitOpError("failed to reify result shape");
+  }
   if (outputShape.size() != 1 || outputShape[0].size() != getOutputRank()) {
     return getOperation()->emitOpError(
                "expected shape of one result value of rank")
@@ -1983,8 +1999,9 @@
   dispatchIndexOpFoldResults(innerTiles, dynamicTileSizes, staticTileSizes);
   SmallVector<Type> resultType;
   auto outputType = output.getType();
-  if (outputType.isa<RankedTensorType>())
+  if (outputType.isa<RankedTensorType>()) {
     resultType.push_back(outputType);
+  }
   build(builder, state, resultType, source, output,
         outerDimsPerm.empty() ? nullptr
                               : builder.getDenseI64ArrayAttr(outerDimsPerm),
@@ -2011,8 +2028,9 @@
          "number of ivs must match the rank of the output tensor");
   OpBuilder::InsertionGuard g(builder);
   ReifiedRankedShapedTypeDims outputShape;
-  if (failed(reifyResultShapes(builder, outputShape)))
+  if (failed(reifyResultShapes(builder, outputShape))) {
     return getOperation()->emitOpError("failed to reify result shape");
+  }
   if (outputShape.size() != 1 || outputShape[0].size() != getOutputRank()) {
     return getOperation()->emitOpError(
                "expected shape of one result value of rank")
@@ -2444,10 +2462,11 @@
                                     ShapedType shapedType,
                                     unsigned rankToCompareWith) {
   unsigned opRank = shapedType.getRank();
-  if (opRank != rankToCompareWith)
+  if (opRank != rankToCompareWith) {
     return op->emitOpError("expected ")
            << operandName << " to have rank " << rankToCompareWith
            << " but found " << opRank;
+  }
   return success();
 }
 
@@ -2468,14 +2487,18 @@
   Type keyElementType = keyType.getElementType();
   Type valueElementType = valueType.getElementType();
   Type outputElementType = outputType.getElementType();
-  if (failed(checkShapeRank(op, "query", queryType, rankToCompareWith)))
+  if (failed(checkShapeRank(op, "query", queryType, rankToCompareWith))) {
     return failure();
-  if (failed(checkShapeRank(op, "key", keyType, rankToCompareWith)))
+  }
+  if (failed(checkShapeRank(op, "key", keyType, rankToCompareWith))) {
     return failure();
-  if (failed(checkShapeRank(op, "value", valueType, rankToCompareWith)))
+  }
+  if (failed(checkShapeRank(op, "value", valueType, rankToCompareWith))) {
     return failure();
-  if (failed(checkShapeRank(op, "output", outputType, rankToCompareWith)))
+  }
+  if (failed(checkShapeRank(op, "output", outputType, rankToCompareWith))) {
     return failure();
+  }
   ArrayRef<int64_t> queryShape = queryType.getShape();
   ArrayRef<int64_t> keyShape = keyType.getShape();
   ArrayRef<int64_t> outputShape = outputType.getShape();
@@ -2485,41 +2508,53 @@
     size_t lastIdx = valueShape.size() - 1;
     std::swap(valueShape[lastIdx - 1], valueShape[lastIdx]);
   }
-  if (failed(verifyCompatibleShape(keyShape, valueShape)))
+  if (failed(verifyCompatibleShape(keyShape, valueShape))) {
     return op->emitOpError("incompatible value shape");
-  if (failed(verifyCompatibleShape(queryShape, outputShape)))
+  }
+  if (failed(verifyCompatibleShape(queryShape, outputShape))) {
     return op->emitOpError("incompatible output shape");
-  if (queryElementType != keyElementType || keyElementType != valueElementType)
+  }
+  if (queryElementType != keyElementType ||
+      keyElementType != valueElementType) {
     return op->emitOpError(
         "element types of (Q)uery, (K)ey and (V)value should be same");
+  }
   if (numOperands == 4) {
     // Vanilla attention.
-    if (queryElementType != outputElementType)
+    if (queryElementType != outputElementType) {
       return op->emitOpError("expected element type for Output ")
              << queryElementType << "but found " << outputElementType
              << " instead";
-    if (keyShape[2] != queryShape[2])
+    }
+    if (keyShape[2] != queryShape[2]) {
       return op->emitOpError("query and key head dimension mismatch");
+    }
   }
   if (numOperands == 6) {
     // Tiled/Flash attention.
     ShapedType maxType = *getMaxType();
     ShapedType sumType = *getSumType();
-    if (failed(checkShapeRank(op, "max", maxType, 1)))
+    if (failed(checkShapeRank(op, "max", maxType, 1))) {
       return failure();
-    if (failed(checkShapeRank(op, "sum", sumType, 1)))
+    }
+    if (failed(checkShapeRank(op, "sum", sumType, 1))) {
       return failure();
+    }
     Type maxElementType = maxType.getElementType();
     Type sumElementType = sumType.getElementType();
     ArrayRef<int64_t> maxShape = maxType.getShape();
     ArrayRef<int64_t> sumShape = sumType.getShape();
-    if (outputElementType != maxElementType || maxElementType != sumElementType)
+    if (outputElementType != maxElementType ||
+        maxElementType != sumElementType) {
       return op->emitOpError(
           "element types of tiled output, max and sum should be same");
-    if (failed(verifyCompatibleShape(maxShape, sumShape)))
+    }
+    if (failed(verifyCompatibleShape(maxShape, sumShape))) {
       return op->emitOpError("incompatible sum shape");
-    if (maxShape[0] != queryShape[0])
+    }
+    if (maxShape[0] != queryShape[0]) {
       return op->emitOpError("Query and max dimension-0 mismatch");
+    }
   }
   return success();
 }
@@ -2561,9 +2596,9 @@
   ArrayRef<int64_t> queryShape = getQueryType().getShape();
   SmallVector<OpFoldResult> queryOutputSizes =
       getAsOpFoldResult(builder.getIndexArrayAttr(queryShape));
-  for (auto info : llvm::enumerate(llvm::zip(offsets, sizes))) {
-    queryOutputOffsets[info.index()] = std::get<0>(info.value());
-    queryOutputSizes[info.index()] = std::get<1>(info.value());
+  for (auto [idx, info] : llvm::enumerate(llvm::zip_equal(offsets, sizes))) {
+    queryOutputOffsets[idx] = std::get<0>(info);
+    queryOutputSizes[idx] = std::get<1>(info);
   }
 
   SmallVector<OpFoldResult> keyValueOffsets(getKeyRank(), zero);
@@ -2605,9 +2640,9 @@
     resultSizes = getAsOpFoldResult(builder.getIndexArrayAttr(resultShape));
     resultOffsets =
         SmallVector<OpFoldResult>(getOutputRank(), builder.getIndexAttr(0));
-    for (auto info : llvm::enumerate(llvm::zip(offsets, sizes))) {
-      resultOffsets[info.index()] = std::get<0>(info.value());
-      resultSizes[info.index()] = std::get<1>(info.value());
+    for (auto [idx, info] : llvm::enumerate(llvm::zip_equal(offsets, sizes))) {
+      resultOffsets[idx] = std::get<0>(info);
+      resultSizes[idx] = std::get<1>(info);
     }
     return success();
   }
@@ -2658,10 +2693,12 @@
         "result of set_encoding op expected to have a valid tensor encoding");
   }
   // The source and result must have the same rank.
-  if (getResultType().getRank() != getSourceType().getRank())
+  if (getResultType().getRank() != getSourceType().getRank()) {
     return emitOpError("cannot change the rank of the tensor");
-  if (failed(verifyCompatibleShape(getResultType(), getSourceType())))
+  }
+  if (failed(verifyCompatibleShape(getResultType(), getSourceType()))) {
     return emitOpError("expected to preserve the logical shape of the tensor");
+  }
   return success();
 }
 
@@ -2688,10 +2725,12 @@
         "source of unset_encoding op expected to have a valid tensor encoding");
   }
   // The source and result must have the same rank.
-  if (getResultType().getRank() != getSourceType().getRank())
+  if (getResultType().getRank() != getSourceType().getRank()) {
     return emitOpError("cannot change the rank of the tensor");
-  if (failed(verifyCompatibleShape(getResultType(), getSourceType())))
+  }
+  if (failed(verifyCompatibleShape(getResultType(), getSourceType()))) {
     return emitOpError("expected to preserve the logical shape of the tensor");
+  }
   return success();
 }
 
@@ -2706,5 +2745,5 @@
 
 // clang-format off
 #define GET_OP_CLASSES
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.cpp.inc" // IWYU pragma: keep
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp.inc" // IWYU pragma: keep
 // clang-format: on
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h
similarity index 62%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h
index bd01789..bf00a0a 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h
@@ -4,10 +4,10 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTOPS_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTOPS_H_
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTOPS_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTOPS_H_
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Dialect.h"
@@ -19,14 +19,14 @@
 
 // clang-format off
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtEnums.h.inc" // IWYU pragma: export
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtEnums.h.inc" // IWYU pragma: export
 
 #define GET_ATTRDEF_CLASSES
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtAttrs.h.inc" // IWYU pragma: export
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtAttrs.h.inc" // IWYU pragma: export
 
 #define GET_OP_CLASSES
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h.inc" // IWYU pragma: export
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h.inc" // IWYU pragma: export
 
 // clang-format on
 
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTOPS_H_
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_IR_LINALGEXTOPS_H_
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.td b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.td
similarity index 97%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.td
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.td
index cf8d671..3620746 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.td
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.td
@@ -7,8 +7,8 @@
 #ifndef IREE_DIALECT_LINALGEXT_OPS
 #define IREE_DIALECT_LINALGEXT_OPS
 
-include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtBase.td"
-include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.td"
+include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtBase.td"
+include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.td"
 include "mlir/Interfaces/ControlFlowInterfaces.td"
 include "mlir/Interfaces/DestinationStyleOpInterface.td"
 include "mlir/Interfaces/InferTypeOpInterface.td"
@@ -47,24 +47,6 @@
 
 let opDocGroup = OpGroupUtilityOps in {
 
-def IREELinalgExt_DoNotDCEOperandsOp :
-  Op<IREELinalgExt_Dialect, "transform.do_not_dce_operands", []> {
-  let summary = "Unfoldable op that just keeps its operands live";
-  let description = [{
-    Unfoldable op that just keeps its operands live. This is to use with the
-    transform dialect in case where transforms introduce IR that would be
-    otherwise DCE'd by canonicalizations.
-
-    This op should be added to the transform dialect in the fullness of time but
-    it can't be registered dynamically on the IREE side as that triggers errors
-    since the op does not implement any transform interface.
-  }];
-
-  let arguments = (ins Variadic<AnyType>:$operands);
-  let results = (outs);
-  let assemblyFormat = "attr-dict $operands `:` type($operands)";
-}
-
 def IREELinalgExt_YieldOp : IREELinalgExt_PureOp<"yield", [Pure, ReturnLike, Terminator]> {
   let summary = "LinalgExt yield op";
   let description = [{
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/BUILD.bazel
new file mode 100644
index 0000000..adc9774
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/BUILD.bazel
@@ -0,0 +1,32 @@
+# Copyright 2024 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:iree_lit_test.bzl", "iree_lit_test_suite")
+load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
+
+package(
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_lit_test_suite(
+    name = "lit",
+    srcs = enforce_glob(
+        [
+            "canonicalize.mlir",
+            "distribution.mlir",
+            "invalid.mlir",
+            "roundtrip.mlir",
+            "tiling.mlir",
+        ],
+        include = ["*.mlir"],
+    ),
+    cfg = "//compiler:lit.cfg.py",
+    tools = [
+        "//tools:iree-opt",
+        "@llvm-project//llvm:FileCheck",
+    ],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/CMakeLists.txt
new file mode 100644
index 0000000..a5a9d2c
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/CMakeLists.txt
@@ -0,0 +1,27 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/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_lit_test_suite(
+  NAME
+    lit
+  SRCS
+    "canonicalize.mlir"
+    "distribution.mlir"
+    "invalid.mlir"
+    "roundtrip.mlir"
+    "tiling.mlir"
+  TOOLS
+    FileCheck
+    iree-opt
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/canonicalize.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/canonicalize.mlir
similarity index 95%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/canonicalize.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/canonicalize.mlir
index fec40b5..a2f89e8 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/canonicalize.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/canonicalize.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --canonicalize --split-input-file %s | FileCheck %s
+// RUN: iree-opt --canonicalize --split-input-file %s | FileCheck %s
 
 func.func @tensor_cast(%arg0: tensor<3x5xi32>) -> tensor<3x5xi32> {
   %init = tensor.empty() : tensor<3x5xi32>
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/distribution.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/distribution.mlir
similarity index 83%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/distribution.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/distribution.mlir
index 40c7c4c..0f5905c 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/distribution.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/distribution.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --transform-dialect-interpreter --split-input-file -canonicalize -cse %s | FileCheck  %s
+// RUN: iree-opt --iree-transform-dialect-interpreter --split-input-file -canonicalize -cse %s | FileCheck  %s
 
 func.func @scatter_tiling_distribution(
     %original: tensor<?x?xf32>, %indices: tensor<?x1xi32>,
@@ -14,10 +14,12 @@
     } -> tensor<?x?xf32>
   return %0 : tensor<?x?xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %forall, %tiled_op = transform.structured.tile_using_forall %0 tile_sizes [10, 30, 0] { mapping = [#gpu.thread<y>, #gpu.thread<x>] } : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %forall, %tiled_op = transform.structured.tile_using_forall %0 tile_sizes [10, 30, 0] { mapping = [#gpu.thread<y>, #gpu.thread<x>] } : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:   #[[MAP0:.+]] = affine_map<()[s0] -> (s0 ceildiv 10)>
 // CHECK-DAG:   #[[MAP1:.+]] = affine_map<()[s0] -> (s0 ceildiv 30)>
@@ -73,11 +75,14 @@
       } -> tensor<?x?x?xi32>, tensor<?x?x?xf32>
   return %0, %1 : tensor<?x?x?xi32>, tensor<?x?x?xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %forall, %tiled_op = transform.structured.tile_using_forall %0 tile_sizes [10, 30, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %forall, %tiled_op = transform.structured.tile_using_forall %0 tile_sizes [10, 30, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
+
 // CHECK-DAG:   #[[MAP0:.+]] = affine_map<()[s0] -> (s0 ceildiv 10)>
 // CHECK-DAG:   #[[MAP1:.+]] = affine_map<()[s0] -> (s0 ceildiv 30)>
 // CHECK-DAG:   #[[MAP2:.+]] = affine_map<(d0) -> (d0 * 10)>
@@ -128,10 +133,13 @@
       }
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %forall, %tiled_op = transform.structured.tile_using_forall %0 tile_sizes [10, 30, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %forall, %tiled_op = transform.structured.tile_using_forall %0 tile_sizes [10, 30, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:   #[[MAP0:.+]] = affine_map<()[s0] -> (s0 ceildiv 10)>
 // CHECK-DAG:   #[[MAP1:.+]] = affine_map<()[s0] -> (s0 ceildiv 30)>
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/invalid.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/invalid.mlir
similarity index 99%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/invalid.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/invalid.mlir
index b6f298e..8c90638 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/invalid.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/invalid.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --split-input-file --verify-diagnostics %s
+// RUN: iree-opt --split-input-file --verify-diagnostics %s
 
 func.func @sort_invalid_dimension(%arg0: tensor<128xi32>) -> tensor<128xi32> {
   // expected-error @+1 {{dimension must be within (0, 1]}}
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/roundtrip.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/roundtrip.mlir
similarity index 99%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/roundtrip.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/roundtrip.mlir
index e4e54ce..a5a006e 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/roundtrip.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/roundtrip.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --split-input-file %s | FileCheck %s
+// RUN: iree-opt --split-input-file %s | FileCheck %s
 
 // CHECK-LABEL: func.func @sort_tensor
 // CHECK:         iree_linalg_ext.sort
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tiling.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/tiling.mlir
similarity index 79%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tiling.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/tiling.mlir
index 69531d7..b474608 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tiling.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/IR/test/tiling.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --transform-dialect-interpreter --split-input-file --verify-diagnostics -canonicalize -cse %s | FileCheck  %s
+// RUN: iree-opt --iree-transform-dialect-interpreter --split-input-file --verify-diagnostics -canonicalize -cse %s | FileCheck  %s
 
 func.func @scatter_tiling(
     %original: tensor<?x?xf32>, %indices: tensor<?x1xi32>,
@@ -14,10 +14,12 @@
     } -> tensor<?x?xf32>
   return %0 : tensor<?x?xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [10, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [10, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //   CHECK-DAG: #[[MAP0:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
 //   CHECK-DAG: #[[MAP1:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 20)>
@@ -71,10 +73,12 @@
     }
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [10, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [10, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //   CHECK-DAG: #[[MAP0:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
 //   CHECK-DAG: #[[MAP1:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 20)>
@@ -120,10 +124,12 @@
     } -> tensor<?x?xf32>
   return %0 : tensor<?x?xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1 = transform.structured.tile_using_for %0 [0] : (!transform.any_op) -> (!transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1 = transform.structured.tile_using_for %0 [0] : (!transform.any_op) -> (!transform.any_op)
+    transform.yield
+  }
 }
 //       CHECK: func.func @scatter_no_tiling
 //  CHECK-SAME:   %[[ORIGINAL:[a-zA-Z0-9_]+]]: tensor<?x?xf32>
@@ -151,10 +157,12 @@
     } -> tensor<?x?xf32>
   return %0 : tensor<?x?xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scatter"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //   CHECK-DAG: #[[MAP:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 20)>
 //       CHECK: func.func @scatter_repeated_indices_tiling
@@ -198,10 +206,12 @@
        } -> tensor<?xi32>
   return %0 : tensor<?xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1 = transform.structured.tile_using_for %0 [0] : (!transform.any_op) -> (!transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1 = transform.structured.tile_using_for %0 [0] : (!transform.any_op) -> (!transform.any_op)
+    transform.yield
+  }
 }
 //      CHECK: func.func @sort_1d(
 // CHECK-SAME:   %[[OPERAND:.+]]: tensor<?xi32>
@@ -221,10 +231,12 @@
        } -> tensor<?x?xi32>
   return %0 : tensor<?x?xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //       CHECK: #[[MAP:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
 //       CHECK: func.func @sort_2d(
@@ -258,10 +270,12 @@
        } -> tensor<?x?xi32>
   return %0 : tensor<?x?xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //       CHECK: #[[MAP:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 20)>
 //       CHECK: func.func @sort_2d_inner_parallel(
@@ -297,10 +311,12 @@
        } -> tensor<?x?xi32>, tensor<?x?xf32>
   return %0#0, %0#1 : tensor<?x?xi32>, tensor<?x?xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //       CHECK: #[[MAP:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
 //       CHECK: func.func @sort_2d_multi_result(
@@ -340,10 +356,12 @@
      }
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
   %0 = transform.structured.match ops{["iree_linalg_ext.sort"]} in %module_op : (!transform.any_op) -> !transform.any_op
   %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //       CHECK: #[[MAP:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 20)>
 //       CHECK: func.func @sort_2d_multi_result_memref(
@@ -374,10 +392,12 @@
   : tensor<1024xf32>, tensor<1024xf32>
   return %0#0, %0#1 : tensor<1024xf32>, tensor<1024xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.fft"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.fft"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @fft_1d_stage_5(
 // CHECK-SAME:   %[[ARG0:[a-zA-Z0-9_]+]]
@@ -412,10 +432,12 @@
   : tensor<3x1024xf32>, tensor<3x1024xf32>
   return %0#0, %0#1 : tensor<3x1024xf32>, tensor<3x1024xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.fft"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [10, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.fft"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [10, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @fft_2d_stage_5(
 // CHECK-SAME:   %[[ARG0:[a-zA-Z0-9_]+]]
@@ -447,10 +469,12 @@
     outs(%arg0, %arg1: memref<1024xf32>, memref<1024xf32>)
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.fft"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.fft"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @fft_1d_stage_5_memref(
 // CHECK-SAME:   %[[ARG0:[a-zA-Z0-9_]+]]
@@ -477,10 +501,12 @@
     outs(%arg1: memref<?xi32>)
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.reverse"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [10] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.reverse"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [10] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:  #[[MAP0:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)
 // CHECK-DAG:  #[[MAP2:.+]] = affine_map<()[s0, s1, s2] -> (s0 - s1 - s2)>
@@ -514,10 +540,12 @@
          outs(%init: tensor<?x?xi32>) : tensor<?x?xi32>
   return %0 : tensor<?x?xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.reverse"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [10, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.reverse"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [10, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:  #[[MAP0:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
 // CHECK-DAG:  #[[MAP1:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 20)>
@@ -567,10 +595,12 @@
   } -> tensor<128xi32>, tensor<i32>
   return %2#0 : tensor<128xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scan"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1 = transform.structured.tile_using_for %0 [0] : (!transform.any_op) -> (!transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scan"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1 = transform.structured.tile_using_for %0 [0] : (!transform.any_op) -> (!transform.any_op)
+    transform.yield
+  }
 }
 //      CHECK: func.func @scan_1d(
 // CHECK-SAME:   %[[OPERAND:.+]]: tensor<128xi32>
@@ -595,10 +625,12 @@
   } -> tensor<16x32xi32>, tensor<32xi32>
   return %2#0 : tensor<16x32xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scan"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scan"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 
 //  CHECK-DAG:  #[[MAP0:.+]] = affine_map<(d0) -> (-d0 + 32, 20)>
@@ -639,10 +671,12 @@
   }
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.scan"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.scan"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [0, 20] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 //      CHECK:  #[[MAP0:.+]] = affine_map<(d0) -> (-d0 + 32, 20)>
 //      CHECK:  func.func @scan_2d_memref(
@@ -676,13 +710,15 @@
         } -> tensor<?x3xf32>, tensor<?x3xi32>
   return %0#0, %0#1 : tensor<?x3xf32>, tensor<?x3xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.topk"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.topk"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:  #[[MAP0:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
-// CHECK-LABEL: func.func @topk_tile_tensor
+// CHECK:       func.func @topk_tile_tensor
 // CHECK-SAME:    %[[ARG0:[a-zA-Z0-9]+]]
 // CHECK-SAME:    %[[ARG1:[a-zA-Z0-9]+]]
 // CHECK-SAME:    %[[ARG2:[a-zA-Z0-9]+]]
@@ -721,14 +757,16 @@
         }
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.topk"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.topk"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 
 // CHECK:       #[[MAP0:.+]] = affine_map<(d0)[s0] -> (-d0 + s0, 10)>
-// CHECK-LABEL: func.func @topk_tile_memref
+// CHECK:       func.func @topk_tile_memref
 // CHECK-SAME:    %[[ARG0:[a-zA-Z0-9]+]]
 // CHECK-SAME:    %[[ARG1:[a-zA-Z0-9]+]]
 // CHECK-SAME:    %[[ARG2:[a-zA-Z0-9]+]]
@@ -763,10 +801,12 @@
         } -> tensor<20x3xf32>, tensor<20x3xi32>
   return %0#0, %0#1 : tensor<20x3xf32>, tensor<20x3xi32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.topk"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.topk"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops = transform.structured.tile_using_for %0 [10, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-LABEL: func.func @topk_tile_tensor_optional
 // CHECK-SAME:    %[[ARG0:[a-zA-Z0-9]+]]
@@ -797,10 +837,12 @@
     ins(%arg0 : tensor<1x10x10x1280xf32>) outs(%0 : tensor<8x8x1x2x2x1280xf32>) -> tensor<8x8x1x2x2x1280xf32>
   return %1 : tensor<8x8x1x2x2x1280xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.winograd.input_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.winograd.input_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @winograd_input_transform(%[[ARG0:[a-zA-Z0-9_]+]]: tensor<1x10x10x1280xf32>) ->
 // CHECK-SAME:   tensor<8x8x1x2x2x1280xf32> {
@@ -834,10 +876,12 @@
     ins(%arg0 : memref<1x10x10x1280xf32>) outs(%arg1 : memref<8x8x1x2x2x1280xf32>)
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.winograd.input_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.winograd.input_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @winograd_input_transform_memref(%[[ARG0:[a-zA-Z0-9_]+]]: memref<1x10x10x1280xf32>,
 // CHECK-SAME:   %[[ARG1:[a-zA-Z0-9_]+]]: memref<8x8x1x2x2x1280xf32>) {
@@ -866,10 +910,12 @@
         ins(%arg0 : tensor<8x8x1x2x2x32xf32>) outs(%0 : tensor<1x12x12x32xf32>) -> tensor<1x12x12x32xf32>
   return %1 : tensor<1x12x12x32xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.winograd.output_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.winograd.output_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @winograd_output_transform(%[[ARG0:[a-zA-Z0-9_]+]]: tensor<8x8x1x2x2x32xf32>) ->
 // CHECK-SAME:   tensor<1x12x12x32xf32> {
@@ -889,10 +935,12 @@
    ins(%arg0 : memref<8x8x1x2x2x32xf32>) outs(%arg1 : memref<1x12x12x32xf32>)
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.winograd.output_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.winograd.output_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @winograd_output_transform_memref(%[[ARG0:[a-zA-Z0-9_]+]]: memref<8x8x1x2x2x32xf32>,
 // CHECK-SAME:   %[[ARG1:[a-zA-Z0-9_]+]]: memref<1x12x12x32xf32>) {
@@ -912,10 +960,12 @@
     ins(%arg0 : tensor<1x1280x10x10xf32>) outs(%0 : tensor<8x8x1x2x2x1280xf32>) -> tensor<8x8x1x2x2x1280xf32>
   return %1 : tensor<8x8x1x2x2x1280xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.winograd.input_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.winograd.input_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @winograd_input_transform_nchw(%[[ARG0:[a-zA-Z0-9_]+]]: tensor<1x1280x10x10xf32>) ->
 // CHECK-SAME:   tensor<8x8x1x2x2x1280xf32> {
@@ -950,10 +1000,12 @@
         ins(%arg0 : tensor<8x8x1x2x2x32xf32>) outs(%0 : tensor<1x32x12x12xf32>) -> tensor<1x32x12x12xf32>
   return %1 : tensor<1x32x12x12xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.winograd.output_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.winograd.output_transform"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [1, 32] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK:      func.func @winograd_output_transform_nchw(%[[ARG0:[a-zA-Z0-9_]+]]: tensor<8x8x1x2x2x32xf32>) ->
 // CHECK-SAME:   tensor<1x32x12x12xf32> {
@@ -971,10 +1023,12 @@
   %1 = iree_linalg_ext.attention ins(%query, %key, %value : tensor<192x1024x64xf32>, tensor<192x1024x64xf32>, tensor<192x1024x64xf32>) outs(%0 : tensor<192x1024x64xf32>) -> tensor<192x1024x64xf32>
   return %1 : tensor<192x1024x64xf32>
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [10, 30] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [10, 30] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:  #[[MAP:.+]] = affine_map<(d0) -> (-d0 + 192, 10)>
 // CHECK-DAG:  #[[MAP1:.+]] = affine_map<(d0) -> (-d0 + 1024, 30)>
@@ -1019,10 +1073,12 @@
   iree_linalg_ext.attention ins(%query, %key, %value : memref<192x1024x64xf32>, memref<192x1024x64xf32>, memref<192x1024x64xf32>) outs(%output : memref<192x1024x64xf32>)
   return
 }
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1, %loops:2 = transform.structured.tile_using_for %0 [10, 30] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1, %loops:2 = transform.structured.tile_using_for %0 [10, 30] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
+    transform.yield
+  }
 }
 // CHECK-DAG:  #[[MAP:.+]] = affine_map<(d0) -> (-d0 + 192, 10)>
 // CHECK-DAG:  #[[MAP1:.+]] = affine_map<(d0) -> (-d0 + 1024, 30)>
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/BUILD.bazel
new file mode 100644
index 0000000..a99d3dd
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/BUILD.bazel
@@ -0,0 +1,75 @@
+# Copyright 2024 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_gentbl_cc_library", "iree_td_library")
+load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
+
+package(
+    default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_td_library(
+    name = "td_files",
+    srcs = enforce_glob(
+        [
+            "LinalgExtExtensionsOps.td",
+        ],
+        include = ["*.td"],
+    ),
+    deps = [
+        "@llvm-project//mlir:InferTypeOpInterfaceTdFiles",
+        "@llvm-project//mlir:OpBaseTdFiles",
+        "@llvm-project//mlir:TransformDialectTdFiles",
+    ],
+)
+
+iree_gentbl_cc_library(
+    name = "LinalgExtExtensionsOpGen",
+    tbl_outs = [
+        (
+            ["--gen-op-decls"],
+            "LinalgExtExtensionsOps.h.inc",
+        ),
+        (
+            ["--gen-op-defs"],
+            "LinalgExtExtensionsOps.cpp.inc",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "LinalgExtExtensionsOps.td",
+    deps = [
+        ":td_files",
+        "@llvm-project//mlir:SideEffectInterfacesTdFiles",
+    ],
+)
+
+iree_compiler_cc_library(
+    name = "LinalgExtExtensions",
+    srcs = [
+        "LinalgExtExtensionsOps.cpp",
+        "LinalgExtExtensionsOps.cpp.inc",
+    ],
+    hdrs = [
+        "LinalgExtExtensionsOps.h",
+        "LinalgExtExtensionsOps.h.inc",
+    ],
+    deps = [
+        ":LinalgExtExtensionsOpGen",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
+        "//llvm-external-projects/iree-dialects:IREEDialectsTransforms",
+        "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
+        "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:AsyncDialect",
+        "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:IR",
+        "@llvm-project//mlir:LinalgDialect",
+        "@llvm-project//mlir:PDLDialect",
+        "@llvm-project//mlir:TransformDialect",
+    ],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/CMakeLists.txt
new file mode 100644
index 0000000..e83116c
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/CMakeLists.txt
@@ -0,0 +1,47 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/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_tablegen_library(
+  NAME
+    LinalgExtExtensionsOpGen
+  TD_FILE
+    "LinalgExtExtensionsOps.td"
+  OUTS
+    --gen-op-decls LinalgExtExtensionsOps.h.inc
+    --gen-op-defs LinalgExtExtensionsOps.cpp.inc
+)
+
+iree_cc_library(
+  NAME
+    LinalgExtExtensions
+  HDRS
+    "LinalgExtExtensionsOps.h"
+    "LinalgExtExtensionsOps.h.inc"
+  SRCS
+    "LinalgExtExtensionsOps.cpp"
+    "LinalgExtExtensionsOps.cpp.inc"
+  DEPS
+    ::LinalgExtExtensionsOpGen
+    IREEDialectsTransforms
+    IREELinalgTransformDialect
+    LLVMSupport
+    MLIRAsyncDialect
+    MLIRIR
+    MLIRLinalgDialect
+    MLIRPDLDialect
+    MLIRTransformDialect
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
+  PUBLIC
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.cpp
similarity index 83%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.cpp
index b97d0b0..f42d991 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.cpp
@@ -4,14 +4,14 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
+#include "iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/SimplePatternRewriter.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
+#include "llvm/Support/FormatVariadic.h"
 #include "mlir/Dialect/Async/IR/Async.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 #include "mlir/IR/OpImplementation.h"
-#include "llvm/Support/FormatVariadic.h"
 
 using namespace mlir;
 using namespace mlir::iree_compiler::IREE;
@@ -19,7 +19,7 @@
 LinalgExt::LinalgExtTransformOpsExtension::LinalgExtTransformOpsExtension() {
   registerTransformOps<
 #define GET_OP_LIST
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.cpp.inc"
+#include "iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.cpp.inc"
       >();
 }
 
@@ -39,8 +39,9 @@
   SimplePatternRewriter patternRewriter(target);
   FailureOr<Operation *> result =
       pattern.returningMatchAndRewrite(target, patternRewriter);
-  if (failed(result))
+  if (failed(result)) {
     return emitDefaultDefiniteFailure(target);
+  }
   results.push_back(*result);
   return DiagnosedSilenceableFailure::success();
 }
@@ -55,8 +56,9 @@
     transform::TransformState &state) {
   SmallVector<Operation *> ops;
   LinalgExt::tileAttention(attentionOp, ops, rewriter, getTileSize());
-  for (auto op : ops)
+  for (auto op : ops) {
     results.push_back(op);
+  }
   return DiagnosedSilenceableFailure::success();
 }
 
@@ -66,10 +68,11 @@
     transform::TransformState &state) {
   SmallVector<Operation *> ops;
   LinalgExt::decomposeTiledAttention(attentionOp, ops, rewriter, getTileSize());
-  for (auto op : ops)
+  for (auto op : ops) {
     results.push_back(op);
+  }
   return DiagnosedSilenceableFailure::success();
 }
 
 #define GET_OP_CLASSES
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.cpp.inc"
+#include "iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.cpp.inc"
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h
new file mode 100644
index 0000000..4f92a09
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h
@@ -0,0 +1,34 @@
+// Copyright 2022 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
+
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMOPS_LINALGEXTTRANSFORMOPS_H
+#define IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMOPS_LINALGEXTTRANSFORMOPS_H
+
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "mlir/Dialect/Linalg/IR/Linalg.h"
+#include "mlir/Dialect/Transform/IR/TransformDialect.h"
+#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
+#include "mlir/IR/OpDefinition.h"
+
+namespace mlir::scf {
+class ForOp;
+class ForallOp;
+} // namespace mlir::scf
+
+#define GET_OP_CLASSES
+#include "iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.h.inc"
+
+namespace mlir::iree_compiler::IREE::LinalgExt {
+class LinalgExtTransformOpsExtension
+    : public transform::TransformDialectExtension<
+          LinalgExtTransformOpsExtension> {
+public:
+  LinalgExtTransformOpsExtension();
+  void init();
+};
+} // namespace mlir::iree_compiler::IREE::LinalgExt
+
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMOPS_LINALGEXTTRANSFORMOPS_H
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.td b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.td
similarity index 94%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.td
rename to compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.td
index 9fd2a32..0d67186 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.td
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/LinalgExtExtensionsOps.td
@@ -13,7 +13,7 @@
 include "mlir/IR/OpBase.td"
 
 def RewriteForallToAsyncOp :
-  Op<Transform_Dialect, "forall_to_async",
+  Op<Transform_Dialect, "iree.forall_to_async",
     [FunctionalStyleTransformOpTrait,
      MemoryEffectsOpInterface,
      TransformEachOpTrait,
@@ -50,7 +50,7 @@
   }];
 }
 
-def TileAttentionOp : Op<Transform_Dialect, "tile_attention",
+def TileAttentionOp : Op<Transform_Dialect, "iree.tile_attention",
     [FunctionalStyleTransformOpTrait,
      MemoryEffectsOpInterface,
      TransformOpInterface,
@@ -87,7 +87,7 @@
   }];
 }
 
-def DecomposeTiledAttentionOp : Op<Transform_Dialect, "decompose_tiled_attention",
+def DecomposeTiledAttentionOp : Op<Transform_Dialect, "iree.decompose_tiled_attention",
     [FunctionalStyleTransformOpTrait,
      MemoryEffectsOpInterface,
      TransformOpInterface,
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/BUILD.bazel
new file mode 100644
index 0000000..0445f4c
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/BUILD.bazel
@@ -0,0 +1,28 @@
+# Copyright 2024 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:iree_lit_test.bzl", "iree_lit_test_suite")
+load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
+
+package(
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_lit_test_suite(
+    name = "lit",
+    srcs = enforce_glob(
+        [
+            "foreach-thread-to-async.mlir",
+        ],
+        include = ["*.mlir"],
+    ),
+    cfg = "//compiler:lit.cfg.py",
+    tools = [
+        "//tools:iree-opt",
+        "@llvm-project//llvm:FileCheck",
+    ],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/CMakeLists.txt
new file mode 100644
index 0000000..b38d8c7
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/CMakeLists.txt
@@ -0,0 +1,23 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/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_lit_test_suite(
+  NAME
+    lit
+  SRCS
+    "foreach-thread-to-async.mlir"
+  TOOLS
+    FileCheck
+    iree-opt
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/foreach-thread-to-async.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/foreach-thread-to-async.mlir
similarity index 79%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/foreach-thread-to-async.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/foreach-thread-to-async.mlir
index 1fb89bc..f487822 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/foreach-thread-to-async.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/TransformExtensions/test/foreach-thread-to-async.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt %s  --transform-dialect-interpreter --split-input-file | FileCheck %s
+// RUN: iree-opt %s --iree-transform-dialect-interpreter --split-input-file | FileCheck %s
 
 #map0 = affine_map<(d0)[s0] -> (d0 ceildiv s0)>
 #map1 = affine_map<(d0)[s0] -> (d0 * s0)>
@@ -47,8 +47,10 @@
   return
 }
 
-transform.sequence failures(propagate) {
-^bb1(%module_op: !transform.any_op):
-  %0 = transform.structured.match ops{["scf.forall"]} in %module_op : (!transform.any_op) -> !transform.any_op
-  %1 = forall_to_async %0 : (!transform.any_op) -> !transform.any_op
+module attributes { transform.with_named_sequence } {
+  transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.readonly}) {
+    %0 = transform.structured.match ops{["scf.forall"]} in %module_op : (!transform.any_op) -> !transform.any_op
+    %1 = transform.iree.forall_to_async %0 : (!transform.any_op) -> !transform.any_op
+    transform.yield
+  }
 }
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/BUILD.bazel
new file mode 100644
index 0000000..cef1fb9
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/BUILD.bazel
@@ -0,0 +1,86 @@
+# Copyright 2024 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_gentbl_cc_library")
+
+package(
+    default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_gentbl_cc_library(
+    name = "PassesIncGen",
+    tbl_outs = [
+        (
+            ["--gen-pass-decls"],
+            "Passes.h.inc",
+        ),
+    ],
+    tblgen = "@llvm-project//mlir:mlir-tblgen",
+    td_file = "Passes.td",
+    deps = [
+        "@llvm-project//mlir:PassBaseTdFiles",
+    ],
+)
+
+iree_compiler_cc_library(
+    name = "Transforms",
+    srcs = [
+        "ConvertConv2DToWinograd.cpp",
+        "ConvertToLoops.cpp",
+        "ForeachThreadToAsync.cpp",
+        "PadContractionToBlockSize.cpp",
+        "PassDetail.h",
+        "Passes.cpp",
+        "SplitReduction.cpp",
+        "TileAndDecomposeAttention.cpp",
+        "TileAndDecomposeWinogradPass.cpp",
+    ],
+    hdrs = [
+        "Passes.h",
+        "Passes.h.inc",
+        "Transforms.h",
+    ],
+    deps = [
+        ":PassesIncGen",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
+        "//llvm-external-projects/iree-dialects:IREEInputDialect",
+        "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:AffineDialect",
+        "@llvm-project//mlir:AffineUtils",
+        "@llvm-project//mlir:ArithDialect",
+        "@llvm-project//mlir:ArithUtils",
+        "@llvm-project//mlir:AsyncDialect",
+        "@llvm-project//mlir:BufferizationDialect",
+        "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
+        "@llvm-project//mlir:FunctionInterfaces",
+        "@llvm-project//mlir:IR",
+        "@llvm-project//mlir:LinalgDialect",
+        "@llvm-project//mlir:LinalgStructuredOpsIncGen",
+        "@llvm-project//mlir:LinalgTransforms",
+        "@llvm-project//mlir:LinalgUtils",
+        "@llvm-project//mlir:MathDialect",
+        "@llvm-project//mlir:MemRefDialect",
+        "@llvm-project//mlir:MemRefTransforms",
+        "@llvm-project//mlir:Parser",
+        "@llvm-project//mlir:Pass",
+        "@llvm-project//mlir:SCFDialect",
+        "@llvm-project//mlir:SCFTransforms",
+        "@llvm-project//mlir:Support",
+        "@llvm-project//mlir:TensorDialect",
+        "@llvm-project//mlir:TensorTransforms",
+        "@llvm-project//mlir:TensorUtils",
+        "@llvm-project//mlir:TilingInterface",
+        "@llvm-project//mlir:TransformDialect",
+        "@llvm-project//mlir:TransformUtils",
+        "@llvm-project//mlir:Transforms",
+        "@llvm-project//mlir:VectorDialect",
+        "@llvm-project//mlir:VectorTransforms",
+    ],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/CMakeLists.txt
new file mode 100644
index 0000000..3c89829
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/CMakeLists.txt
@@ -0,0 +1,78 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/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_tablegen_library(
+  NAME
+    PassesIncGen
+  TD_FILE
+    "Passes.td"
+  OUTS
+    --gen-pass-decls Passes.h.inc
+)
+
+iree_cc_library(
+  NAME
+    Transforms
+  HDRS
+    "Passes.h"
+    "Passes.h.inc"
+    "Transforms.h"
+  SRCS
+    "ConvertConv2DToWinograd.cpp"
+    "ConvertToLoops.cpp"
+    "ForeachThreadToAsync.cpp"
+    "PadContractionToBlockSize.cpp"
+    "PassDetail.h"
+    "Passes.cpp"
+    "SplitReduction.cpp"
+    "TileAndDecomposeAttention.cpp"
+    "TileAndDecomposeWinogradPass.cpp"
+  DEPS
+    ::PassesIncGen
+    IREEInputDialect
+    LLVMSupport
+    MLIRAffineDialect
+    MLIRAffineUtils
+    MLIRArithDialect
+    MLIRArithUtils
+    MLIRAsyncDialect
+    MLIRBufferizationDialect
+    MLIRFuncDialect
+    MLIRFunctionInterfaces
+    MLIRIR
+    MLIRLinalgDialect
+    MLIRLinalgStructuredOpsIncGenLib
+    MLIRLinalgTransforms
+    MLIRLinalgUtils
+    MLIRMathDialect
+    MLIRMemRefDialect
+    MLIRMemRefTransforms
+    MLIRParser
+    MLIRPass
+    MLIRSCFDialect
+    MLIRSCFTransforms
+    MLIRSupport
+    MLIRTensorDialect
+    MLIRTensorTransforms
+    MLIRTensorUtils
+    MLIRTilingInterface
+    MLIRTransformDialect
+    MLIRTransformUtils
+    MLIRTransforms
+    MLIRVectorDialect
+    MLIRVectorTransforms
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Utils
+  PUBLIC
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertConv2DToWinograd.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ConvertConv2DToWinograd.cpp
similarity index 94%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertConv2DToWinograd.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ConvertConv2DToWinograd.cpp
index 0680be4..069fe73 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertConv2DToWinograd.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ConvertConv2DToWinograd.cpp
@@ -4,12 +4,13 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/Utils.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/WinogradConstants.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/WinogradConstants.h"
+#include "llvm/ADT/SetVector.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
@@ -23,12 +24,8 @@
 #include "mlir/IR/Matchers.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "llvm/ADT/SetVector.h"
 
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
+namespace mlir::iree_compiler::IREE::LinalgExt {
 
 static inline int index(int y, int x, int dimy, int dimx) {
   return (x + dimx * y);
@@ -110,20 +107,23 @@
 static bool hasValidStridesAndDilations(Operation *op) {
   auto convOp = dyn_cast<T>(op);
   // Check that strides = 1
-  if (!hasAllOneValues(convOp.getStrides()))
+  if (!hasAllOneValues(convOp.getStrides())) {
     return false;
+  }
 
   // Check that dilations = 1
-  if (!hasAllOneValues(convOp.getDilations()))
+  if (!hasAllOneValues(convOp.getDilations())) {
     return false;
+  }
   return true;
 }
 
 static bool isValidConv2d(Operation *op, bool &isNchw) {
   isNchw = isa<linalg::Conv2DNchwFchwOp>(op);
   const bool isNhwc = isa<linalg::Conv2DNhwcHwcfOp>(op);
-  if (!(isNchw || isNhwc))
+  if (!(isNchw || isNhwc)) {
     return false;
+  }
   return (isNchw ? hasValidStridesAndDilations<linalg::Conv2DNchwFchwOp>(op)
                  : hasValidStridesAndDilations<linalg::Conv2DNhwcHwcfOp>(op));
 }
@@ -139,21 +139,25 @@
                                 PatternRewriter &rewriter) const override {
 
     bool isNchw;
-    if (!isValidConv2d(convOp, isNchw))
+    if (!isValidConv2d(convOp, isNchw)) {
       return failure();
+    }
 
     // Check that kernel size = 3x3
     Value kernel = convOp.getInputs()[1];
     auto kernelType = kernel.getType().cast<ShapedType>();
-    if (!kernelType)
+    if (!kernelType) {
       return failure();
+    }
     ArrayRef<int64_t> kernelShape = kernelType.getShape();
-    if (kernelShape.size() != 4)
+    if (kernelShape.size() != 4) {
       return failure();
+    }
     const int64_t kh = isNchw ? kernelShape[2] : kernelShape[0];
     const int64_t kw = isNchw ? kernelShape[3] : kernelShape[1];
-    if ((kh != 3) || (kw != 3))
+    if ((kh != 3) || (kw != 3)) {
       return failure();
+    }
     const int64_t kernelSize = kh;
     const int64_t inputTileSize = outputTileSize + kernelSize - 1;
 
@@ -288,18 +292,21 @@
                                 PatternRewriter &rewriter) const override {
 
     bool isNchw;
-    if (!isValidConv2d(convOp, isNchw))
+    if (!isValidConv2d(convOp, isNchw)) {
       return failure();
+    }
 
     // Check that kernel has been constant folded (by validating rank = 3)
     Value kernel = convOp.getInputs()[1];
     auto kernelType = kernel.getType().cast<ShapedType>();
-    if (!kernelType)
+    if (!kernelType) {
       return failure();
+    }
     Type elementType = kernelType.getElementType();
     ArrayRef<int64_t> kernelShape = kernelType.getShape();
-    if (kernelShape.size() != 3)
+    if (kernelShape.size() != 3) {
       return failure();
+    }
 
     const int64_t kernelSize = 3;
     const int64_t inputTileSize = outputTileSize + kernelSize - 1;
@@ -310,11 +317,13 @@
         loc, rewriter.getZeroAttr(elementType));
     Value input = convOp.getInputs()[0];
     auto inputType = input.getType().cast<ShapedType>();
-    if (!inputType)
+    if (!inputType) {
       return failure();
+    }
     SmallVector<int64_t> inputShape(inputType.getShape());
-    if (llvm::any_of(inputShape, ShapedType::isDynamic))
+    if (llvm::any_of(inputShape, ShapedType::isDynamic)) {
       return failure();
+    }
     assert(inputShape.size() == 4);
     if (isNchw) {
       permute<IREE::LinalgExt::Permutation::NCHW_TO_NHWC>(inputShape);
@@ -444,7 +453,4 @@
   return std::make_unique<ConvertConv2DToWinogradPass>();
 }
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
+} // namespace mlir::iree_compiler::IREE::LinalgExt
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
similarity index 94%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
index fc92cd8..8b81efe 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
@@ -4,10 +4,13 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Arith/Utils/Utils.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
@@ -19,9 +22,6 @@
 #include "mlir/Interfaces/TilingInterface.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallVector.h"
 
 using namespace mlir;
 namespace IREE = mlir::iree_compiler::IREE;
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ForeachThreadToAsync.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ForeachThreadToAsync.cpp
similarity index 95%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ForeachThreadToAsync.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ForeachThreadToAsync.cpp
index 427d4fb..1193b73 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ForeachThreadToAsync.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ForeachThreadToAsync.cpp
@@ -6,7 +6,8 @@
 
 #include <cstdlib>
 
-#include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h"
+#include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Async/IR/Async.h"
@@ -19,7 +20,6 @@
 #include "mlir/IR/Operation.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "llvm/ADT/STLExtras.h"
 
 using namespace mlir;
 using namespace mlir::iree_compiler::IREE::LinalgExt;
@@ -28,19 +28,22 @@
 mlir::iree_compiler::IREE::LinalgExt::ForallOpToAsyncRewriter::
     returningMatchAndRewrite(scf::ForallOp forallOp,
                              PatternRewriter &rewriter) const {
-  if (forallOp.getNumResults() > 0)
+  if (forallOp.getNumResults() > 0) {
     return forallOp->emitError("only bufferized scf.forall lowers to async");
+  }
 
-  if (forallOp.getRank() > 1)
+  if (forallOp.getRank() > 1) {
     return forallOp->emitError(
         "only single-dimension scf.forall lowers to async");
+  }
 
   // Only consider the top level ForallOp op and skip if it already
   // contains an ExecuteOp.
   if (forallOp->getParentOfType<scf::ForallOp>() ||
       llvm::any_of(forallOp.getBody()->getOperations(),
-                   [](Operation &op) { return isa<async::ExecuteOp>(&op); }))
+                   [](Operation &op) { return isa<async::ExecuteOp>(&op); })) {
     return failure();
+  }
 
   auto *ctx = forallOp.getContext();
   Location loc = forallOp.getLoc();
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/PadContractionToBlockSize.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PadContractionToBlockSize.cpp
similarity index 96%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/PadContractionToBlockSize.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PadContractionToBlockSize.cpp
index 77523db..52cf0b1 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/PadContractionToBlockSize.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PadContractionToBlockSize.cpp
@@ -6,8 +6,8 @@
 
 #include "iree-dialects/Dialect/Input/InputDialect.h"
 #include "iree-dialects/Dialect/Input/InputOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
@@ -68,8 +68,9 @@
       needsPad = true;
     }
   }
-  if (!needsPad)
+  if (!needsPad) {
     return false;
+  }
 
   auto resultType = RankedTensorType::get(newStaticDims, type.getElementType());
   Value zeroConstant = builder.create<arith::ConstantOp>(
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h
new file mode 100644
index 0000000..e99ac39
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h
@@ -0,0 +1,24 @@
+// Copyright 2021 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
+
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_PASS_DETAIL_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_PASS_DETAIL_H_
+
+#include "mlir/Dialect/Linalg/IR/Linalg.h"
+#include "mlir/Dialect/SCF/IR/SCF.h"
+#include "mlir/Dialect/Vector/IR/VectorOps.h"
+#include "mlir/Interfaces/FunctionInterfaces.h"
+#include "mlir/Pass/Pass.h"
+
+namespace mlir::iree_compiler::IREE::LinalgExt {
+
+#define GEN_PASS_CLASSES
+
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h.inc" // IWYU pragma: keep
+
+} // namespace mlir::iree_compiler::IREE::LinalgExt
+
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_PASS_DETAIL_H_
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Passes.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.cpp
similarity index 79%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Passes.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.cpp
index 116f317..737450d 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Passes.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.cpp
@@ -4,20 +4,14 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassRegistry.h"
 #include "mlir/Transforms/Passes.h"
 
-using namespace mlir;
-namespace IREE = mlir::iree_compiler::IREE;
-
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
+namespace mlir::iree_compiler::IREE::LinalgExt {
 
 // Marker used as attribute name in generated Linalg rewriting transformations.
 const StringLiteral LinalgTransforms::kLinalgTransformMarker =
@@ -34,23 +28,26 @@
     std::optional<StringAttr> replacement)
     : matchDisjunction(matchDisjunction.begin(), matchDisjunction.end()),
       replacement(replacement), matchByDefault(false) {
-  if (f)
+  if (f) {
     filters.push_back(f);
+  }
 }
 
 LogicalResult LinalgTransformationFilter::checkAndNotify(RewriterBase &rewriter,
                                                          Operation *op) const {
   if (llvm::any_of(filters,
-                   [&](const FilterFunction &f) { return failed(f(op)); }))
+                   [&](const FilterFunction &f) { return failed(f(op)); })) {
     return failure();
+  }
 
   auto attr = op->template getAttrOfType<StringAttr>(
       LinalgTransforms::kLinalgTransformMarker);
 
   if (!attr) {
     // 1. Has no filter case and matchDisjunction is empty.
-    if (matchDisjunction.empty() || matchByDefault)
+    if (matchDisjunction.empty() || matchByDefault) {
       return success();
+    }
 
     // 2. Has no filter but was expecting a filter.
     return rewriter.notifyMatchFailure(op, [&](Diagnostic &diag) {
@@ -60,9 +57,11 @@
   }
 
   // 4. Match explicit filter.
-  for (auto filter : matchDisjunction)
-    if (attr.getValue() == filter)
+  for (auto filter : matchDisjunction) {
+    if (attr.getValue() == filter) {
       return success();
+    }
+  }
 
   // 5. Fail to match.
   return rewriter.notifyMatchFailure(op, [&](Diagnostic &diag) {
@@ -73,16 +72,18 @@
 
 void LinalgTransformationFilter::replaceLinalgTransformationFilter(
     RewriterBase &rewriter, Operation *op) const {
-  if (replacement.has_value())
+  if (replacement.has_value()) {
     op->setAttr(LinalgTransforms::kLinalgTransformMarker, replacement.value());
-  else
+  } else {
     op->removeAttr(
         rewriter.getStringAttr(LinalgTransforms::kLinalgTransformMarker));
+  }
 }
 
 bool LinalgTransformationFilter::hasReplacementFilter(Operation *op) const {
-  if (!replacement)
+  if (!replacement) {
     return false;
+  }
   auto attr = op->getAttr(LinalgTransforms::kLinalgTransformMarker)
                   .dyn_cast<StringAttr>();
   return attr && attr == *replacement;
@@ -90,14 +91,9 @@
 
 namespace detail {
 #define GEN_PASS_REGISTRATION
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h.inc" // IWYU pragma: export
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h.inc" // IWYU pragma: export
 } // namespace detail
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
+void registerPasses() { IREE::LinalgExt::detail::registerPasses(); }
 
-void IREE::LinalgExt::registerPasses() {
-  IREE::LinalgExt::detail::registerPasses();
-}
+} // namespace mlir::iree_compiler::IREE::LinalgExt
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/Passes.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.h
similarity index 91%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/Passes.h
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.h
index c5a7584..b0baa61 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/Passes.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.h
@@ -4,24 +4,21 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_PASSES_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_PASSES_H_
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_PASSES_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_PASSES_H_
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/SCF/Transforms/TileUsingInterface.h"
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Pass/Pass.h"
 
-namespace mlir {
+namespace mlir::iree_compiler::IREE::LinalgExt {
 
 class ConversionTarget;
 class TypeConverter;
 
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
 // Marker used as attribute name in generated Linalg rewriting transformations.
 struct LinalgTransforms {
   static const StringLiteral kLinalgTransformMarker;
@@ -147,9 +144,6 @@
 
 void registerPasses();
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
+} // namespace mlir::iree_compiler::IREE::LinalgExt
 
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_PASSES_H_
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_PASSES_H_
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/Passes.td b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.td
similarity index 100%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/Passes.td
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.td
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/SplitReduction.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/SplitReduction.cpp
similarity index 98%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/SplitReduction.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/SplitReduction.cpp
index 1408bbb..3102653 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/SplitReduction.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/SplitReduction.cpp
@@ -4,10 +4,11 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
@@ -22,7 +23,6 @@
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "llvm/ADT/STLExtras.h"
 
 using namespace mlir;
 using namespace mlir::iree_compiler::IREE::LinalgExt;
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/TileAndDecomposeAttention.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/TileAndDecomposeAttention.cpp
similarity index 97%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/TileAndDecomposeAttention.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/TileAndDecomposeAttention.cpp
index c2232c8..df6e3fc 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/TileAndDecomposeAttention.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/TileAndDecomposeAttention.cpp
@@ -4,10 +4,12 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Arith/Utils/Utils.h"
@@ -16,9 +18,6 @@
 #include "mlir/Dialect/Tensor/Utils/Utils.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "llvm/ADT/DenseSet.h"
-#include "llvm/Support/Debug.h"
-#include <mlir/IR/TypeUtilities.h>
 
 namespace mlir {
 namespace iree_compiler {
@@ -213,8 +212,9 @@
   SmallVector<OpFoldResult> offsets(keyShape.size(), zero);
   sizes[1] = keyValueTileLength;
   sizes[2] = headDimension;
-  if (!ivs.empty())
+  if (!ivs.empty()) {
     offsets[1] = ivs[0];
+  }
   SmallVector<int64_t> tensorShape{keyShape[1], keyShape[2]};
   if (swapLastTwoDims) {
     std::swap(sizes[1], sizes[2]);
@@ -237,8 +237,9 @@
       builder, loc, lbs, ubs, steps, args,
       [&](OpBuilder &nestedBuilder, Location loc, ValueRange outputIvs,
           ValueRange iterArgs) -> scf::ValueVector { return iterArgs; });
-  for (scf::ForOp loop : loopNest.loops)
+  for (scf::ForOp loop : loopNest.loops) {
     ivs.push_back(loop.getInductionVar());
+  }
   return loopNest;
 }
 
@@ -377,8 +378,8 @@
   SmallVector<int64_t> keyShape{queryShape};
   if (tileSize) {
     keyValueTileLength = rewriter.getIndexAttr(tileSize.value());
-    for (auto it : llvm::enumerate(attnOp.getKeyType().getShape())) {
-      keyShape[it.index()] = it.index() == 1 ? tileSize.value() : it.value();
+    for (auto [idx, val] : llvm::enumerate(attnOp.getKeyType().getShape())) {
+      keyShape[idx] = idx == 1 ? tileSize.value() : val;
     }
   }
 
@@ -528,8 +529,9 @@
                                std::optional<uint64_t> tileSize) {
   IREE::LinalgExt::AttentionOp tiledAttentionOp =
       tileAttention(attnOp, ops, rewriter, tileSize);
-  if (onlyTile)
+  if (onlyTile) {
     return;
+  }
   decomposeTiledAttention(tiledAttentionOp, ops, rewriter, tileSize);
 }
 
@@ -601,11 +603,13 @@
   MLIRContext *context = &getContext();
   IRRewriter rewriter(context);
   std::optional<uint64_t> optionalTileSize{std::nullopt};
-  if (tileSize.hasValue())
+  if (tileSize.hasValue()) {
     optionalTileSize = tileSize.getValue();
-  if (failed(
-          reifyAttentionTransform(getOperation(), onlyTile, optionalTileSize)))
+  }
+  if (failed(reifyAttentionTransform(getOperation(), onlyTile,
+                                     optionalTileSize))) {
     return signalPassFailure();
+  }
 }
 
 std::unique_ptr<Pass> createTileAndDecomposeAttentionPass() {
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/TileAndDecomposeWinogradPass.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/TileAndDecomposeWinogradPass.cpp
similarity index 96%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/TileAndDecomposeWinogradPass.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/TileAndDecomposeWinogradPass.cpp
index 99189aa..5245df5 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/TileAndDecomposeWinogradPass.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/TileAndDecomposeWinogradPass.cpp
@@ -4,12 +4,14 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/Utils.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/WinogradConstants.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/PassDetail.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/WinogradConstants.h"
+#include "llvm/ADT/DenseSet.h"
+#include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Arith/Utils/Utils.h"
@@ -19,14 +21,8 @@
 #include "mlir/Interfaces/FunctionInterfaces.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
-#include "llvm/ADT/DenseSet.h"
-#include "llvm/Support/Debug.h"
 
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
-
+namespace mlir::iree_compiler::IREE::LinalgExt {
 namespace {
 
 static void computeLoopParams(SmallVectorImpl<Value> &lbs,
@@ -289,8 +285,9 @@
                                           tiledWinogradInputTransformOp))) {
     return failure();
   }
-  if (onlyTile)
+  if (onlyTile) {
     return success();
+  }
   return decomposeTiledWinogradInputTransformOp(tiledWinogradInputTransformOp,
                                                 rewriter);
 }
@@ -493,8 +490,9 @@
                                            tiledWinogradOutputTransformOp))) {
     return failure();
   }
-  if (onlyTile)
+  if (onlyTile) {
     return success();
+  }
   return decomposeTiledWinogradOutputTransformOp(tiledWinogradOutputTransformOp,
                                                  rewriter);
 }
@@ -530,22 +528,25 @@
   LogicalResult resultOfTransformations = success();
   funcOp.walk([&](WinogradInputTransformOp inputOp) {
     if (failed(tileAndDecomposeWinogradInputTransformOp(inputOp, rewriter,
-                                                        onlyTile)))
+                                                        onlyTile))) {
       resultOfTransformations = failure();
+    }
     return WalkResult::advance();
   });
   funcOp.walk([&](WinogradOutputTransformOp outputOp) {
     if (failed(tileAndDecomposeWinogradOutputTransformOp(outputOp, rewriter,
-                                                         onlyTile)))
+                                                         onlyTile))) {
       resultOfTransformations = failure();
+    }
     return WalkResult::advance();
   });
   return resultOfTransformations;
 }
 
 void TileAndDecomposeWinogradTransformPass::runOnOperation() {
-  if (failed(reifyWinogradTransform(getOperation(), onlyTile)))
+  if (failed(reifyWinogradTransform(getOperation(), onlyTile))) {
     return signalPassFailure();
+  }
 }
 
 std::unique_ptr<InterfacePass<mlir::FunctionOpInterface>>
@@ -553,7 +554,4 @@
   return std::make_unique<TileAndDecomposeWinogradTransformPass>();
 }
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
+} // namespace mlir::iree_compiler::IREE::LinalgExt
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h
similarity index 89%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h
index bdd7103..5d7e82b 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Transforms.h
@@ -4,27 +4,18 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_TRANSFORMS_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_TRANSFORMS_H_
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_TRANSFORMS_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_TRANSFORMS_H_
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
+#include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
+#include "mlir/Dialect/SCF/IR/SCF.h"
 #include "mlir/Dialect/SCF/Transforms/TileUsingInterface.h"
 #include "mlir/IR/PatternMatch.h"
 
-namespace mlir {
-namespace scf {
-class ForOp;
-class ForallOp;
-} // namespace scf
-namespace linalg {
-class LinalgOp;
-}
-
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
+namespace mlir::iree_compiler::IREE::LinalgExt {
 
 /// Pattern to rewrite a scf::ForallOp to the async dialect.
 struct ForallOpToAsyncRewriter : public OpRewritePattern<scf::ForallOp> {
@@ -147,9 +138,6 @@
       : LinalgBasePromotionPattern(opName, context, options, f, benefit) {}
 };
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
+} // namespace mlir::iree_compiler::IREE::LinalgExt
 
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_TRANSFORMS_H_
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_TRANSFORMS_TRANSFORMS_H_
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/BUILD.bazel
new file mode 100644
index 0000000..52f2654
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/BUILD.bazel
@@ -0,0 +1,34 @@
+# Copyright 2024 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:iree_lit_test.bzl", "iree_lit_test_suite")
+load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
+
+package(
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_lit_test_suite(
+    name = "lit",
+    srcs = enforce_glob(
+        [
+            "conv2d_to_winograd.mlir",
+            "convert_to_loops.mlir",
+            "pad_contraction_to_block_size.mlir",
+            "resolve-shaped-type-result-dims.mlir",
+            "split-reduction.mlir",
+            "tile_and_decompose_attention.mlir",
+            "tile_and_decompose_winograd.mlir",
+        ],
+        include = ["*.mlir"],
+    ),
+    cfg = "//compiler:lit.cfg.py",
+    tools = [
+        "//tools:iree-opt",
+        "@llvm-project//llvm:FileCheck",
+    ],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/CMakeLists.txt
new file mode 100644
index 0000000..ac5464a
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/CMakeLists.txt
@@ -0,0 +1,29 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/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_lit_test_suite(
+  NAME
+    lit
+  SRCS
+    "conv2d_to_winograd.mlir"
+    "convert_to_loops.mlir"
+    "pad_contraction_to_block_size.mlir"
+    "resolve-shaped-type-result-dims.mlir"
+    "split-reduction.mlir"
+    "tile_and_decompose_attention.mlir"
+    "tile_and_decompose_winograd.mlir"
+  TOOLS
+    FileCheck
+    iree-opt
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/conv2d_to_winograd.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/conv2d_to_winograd.mlir
similarity index 98%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/conv2d_to_winograd.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/conv2d_to_winograd.mlir
index 828f53d..42b781d 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/conv2d_to_winograd.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/conv2d_to_winograd.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --split-input-file -iree-linalg-ext-convert-conv2d-to-winograd -mlir-elide-elementsattrs-if-larger=4 %s | FileCheck %s
+// RUN: iree-opt --split-input-file -iree-linalg-ext-convert-conv2d-to-winograd -mlir-elide-elementsattrs-if-larger=4 %s | FileCheck %s
 
 func.func @conv_16433136(%arg0: tensor<1x16x16x4xf32>, %arg2: tensor<1x14x14x16xf32>) -> tensor<1x14x14x16xf32> {
   %c0 = arith.constant dense<0.1> : tensor<3x3x4x16xf32>
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/convert_to_loops.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
similarity index 98%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/convert_to_loops.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
index f525e5c..3623426 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/convert_to_loops.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-to-loops))" %s | FileCheck %s
+// RUN: iree-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-to-loops))" %s | FileCheck %s
 
 func.func @sort_1d(%arg0: memref<128xi32>) {
   iree_linalg_ext.sort dimension(0)
@@ -769,7 +769,7 @@
   return
 }
 // CHECK:       #[[MAP:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
-// CHECK-LABEL: func.func @NC_to_NCnc(
+// CHECK:       func.func @NC_to_NCnc(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[ubN:.*]] = arith.constant 4 : index
 // CHECK-DAG:     %[[step:.*]] = arith.constant 1 : index
@@ -796,7 +796,7 @@
 }
 // CHECK-DAG:   #[[MAP0:.*]] = affine_map<(d0, d1) -> (d0 * 8 + d1)>
 // CHECK-DAG:   #[[MAP1:.*]] = affine_map<(d0, d1) -> (d0 * 2 + d1)>
-// CHECK-LABEL: func.func @NC_to_NCnc_pad_static(
+// CHECK:       func.func @NC_to_NCnc_pad_static(
 // CHECK-DAG:     %[[C0:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[C1:.*]] = arith.constant 1 : index
 // CHECK-DAG:     %[[C2:.*]] = arith.constant 2 : index
@@ -827,7 +827,7 @@
   return
 }
 // CHECK:       #[[MAP:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
-// CHECK-LABEL: func.func @KC_to_KCck(
+// CHECK:       func.func @KC_to_KCck(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[ubK:.*]] = arith.constant 4 : index
 // CHECK-DAG:     %[[step:.*]] = arith.constant 1 : index
@@ -854,7 +854,7 @@
   return
 }
 // CHECK:       #[[MAP:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
-// CHECK-LABEL: func.func @KC_to_KCc(
+// CHECK:       func.func @KC_to_KCc(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[step:.*]] = arith.constant 1 : index
 // CHECK-DAG:     %[[ubK:.*]] = arith.constant 128 : index
@@ -878,7 +878,7 @@
 }
 
 // CHECK:       #[[MAP:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
-// CHECK-LABEL: func.func @KC_to_KCk(
+// CHECK:       func.func @KC_to_KCk(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[step:.*]] = arith.constant 1 : index
 // CHECK-DAG:     %[[ubC:.*]] = arith.constant 256 : index
@@ -903,7 +903,7 @@
 
 // CHECK-DAG:   #[[MAP0:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
 // CHECK-DAG:   #[[MAP1:.*]] = affine_map<(d0, d1) -> (d0 * 8 + d1)>
-// CHECK-LABEL: func.func @KCRS_to_KCRSck(
+// CHECK:       func.func @KCRS_to_KCRSck(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[one:.*]] = arith.constant 1 : index
 // CHECK-DAG:     %[[ubK:.*]] = arith.constant 4 : index
@@ -935,7 +935,7 @@
 
 // CHECK-DAG:   #[[MAP0:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
 // CHECK-DAG:   #[[MAP1:.*]] = affine_map<(d0, d1) -> (d0 * 8 + d1)>
-// CHECK-LABEL: func.func @KCRS_to_KCRSsr(
+// CHECK:       func.func @KCRS_to_KCRSsr(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[one:.*]] = arith.constant 1 : index
 // CHECK-DAG:     %[[ubR:.*]] = arith.constant 4 : index
@@ -970,7 +970,7 @@
 
 // CHECK-DAG:   #[[MAP0:.*]] = affine_map<(d0, d1) -> (d0 * 32 + d1)>
 // CHECK-DAG:   #[[MAP1:.*]] = affine_map<(d0, d1) -> (d0 * 2 + d1)>
-// CHECK-LABEL: func.func @shuffled_dim_pos_and_tiles(
+// CHECK:       func.func @shuffled_dim_pos_and_tiles(
 // CHECK-DAG:     %[[lb:.*]] = arith.constant 0 : index
 // CHECK-DAG:     %[[step:.*]] = arith.constant 1 : index
 // CHECK-DAG:     %[[ubDimZero:.*]] = arith.constant 4 : index
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/pad_contraction_to_block_size.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/pad_contraction_to_block_size.mlir
similarity index 96%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/pad_contraction_to_block_size.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/pad_contraction_to_block_size.mlir
index 9caaf6b..e7d36a1 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/pad_contraction_to_block_size.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/pad_contraction_to_block_size.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt --pass-pipeline='builtin.module(iree-linalg-pad-contraction-to-block-size{rowAlignment=16 columnAlignment=32})' --split-input-file %s | FileCheck %s
+// RUN: iree-opt --pass-pipeline='builtin.module(iree-linalg-pad-contraction-to-block-size{rowAlignment=16 columnAlignment=32})' --split-input-file %s | FileCheck %s
 
 // CHECK-LABEL: @pad_matmul_static
 // Full verification is done on this case. Others use reduced checks.
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/resolve-shaped-type-result-dims.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/resolve-shaped-type-result-dims.mlir
similarity index 94%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/resolve-shaped-type-result-dims.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/resolve-shaped-type-result-dims.mlir
index cc8f9ea..e93e44a 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/resolve-shaped-type-result-dims.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/resolve-shaped-type-result-dims.mlir
@@ -1,4 +1,4 @@
-// RUN: iree-dialects-opt -resolve-shaped-type-result-dims -split-input-file %s | FileCheck %s
+// RUN: iree-opt -resolve-shaped-type-result-dims -split-input-file %s | FileCheck %s
 
 func.func @pack_static(%arg0 : tensor<100x250xf32>) -> (index, index) {
   %c0 = arith.constant 0 : index
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/split-reduction.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/split-reduction.mlir
similarity index 94%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/split-reduction.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/split-reduction.mlir
index 668ab65..d301016 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/split-reduction.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/split-reduction.mlir
@@ -1,6 +1,6 @@
-// RUN: iree-dialects-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-topk-split-reduction{split-ratios=3}))" %s | FileCheck %s --check-prefix SINGLE
-// RUN: iree-dialects-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-topk-split-reduction{split-ratios=4}))" %s | FileCheck %s --check-prefix MULTIPLE
-// RUN: iree-dialects-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-topk-split-reduction{split-ratios=40,10}))" %s | FileCheck %s --check-prefix DOUBLE
+// RUN: iree-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-topk-split-reduction{split-ratios=3}))" %s | FileCheck %s --check-prefix SINGLE
+// RUN: iree-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-topk-split-reduction{split-ratios=4}))" %s | FileCheck %s --check-prefix MULTIPLE
+// RUN: iree-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-topk-split-reduction{split-ratios=40,10}))" %s | FileCheck %s --check-prefix DOUBLE
 
 func.func @topk_split_reduction_1d(%input_values: tensor<30xf32>, %out_values: tensor<3xf32>, %out_indices: tensor<3xi32>) -> (tensor<3xf32>, tensor<3xi32>) {
   %0:2 = iree_linalg_ext.topk
@@ -15,7 +15,7 @@
 }
 
 // SINGLE-DAG:     #[[MAP0:.+]] = affine_map<(d0, d1) -> (d0, d1)>
-// SINGLE-LABEL:   func.func @topk_split_reduction_1d(
+// SINGLE:         func.func @topk_split_reduction_1d(
 // SINGLE-SAME:                                       %[[ARG0:.*]]: tensor<30xf32>,
 // SINGLE-SAME:                                       %[[ARG1:.*]]: tensor<3xf32>,
 // SINGLE-SAME:                                       %[[ARG2:.*]]: tensor<3xi32>) -> (tensor<3xf32>, tensor<3xi32>) {
@@ -65,7 +65,7 @@
 }
 
 // MULTIPLE-DAG:     #[[MAP0:.+]] = affine_map<(d0, d1, d2, d3, d4) -> (d0, d1, d2, d3, d4)>
-// MULTIPLE-LABEL:   func.func @topk_split_reduction_nd(
+// MULTIPLE:         func.func @topk_split_reduction_nd(
 // MULTIPLE-SAME:                                    %[[ARG0:.*]]: tensor<3x10x40x8xf32>,
 // MULTIPLE-SAME:                                    %[[ARG1:.*]]: tensor<3x10x4x8xf32>,
 // MULTIPLE-SAME:                                    %[[ARG2:.*]]: tensor<3x10x4x8xi32>) -> (tensor<3x10x4x8xf32>, tensor<3x10x4x8xi32>) {
@@ -115,7 +115,7 @@
 }
 
 // DOUBLE-DAG:     #[[MAP0:.+]] = affine_map<(d0, d1) -> (d0, d1)>
-// DOUBLE-LABEL:   func.func @topk_split_reduction_double(
+// DOUBLE:         func.func @topk_split_reduction_double(
 // DOUBLE-SAME:                                       %[[ARG0:.*]]: tensor<400xf32>,
 // DOUBLE-SAME:                                       %[[ARG1:.*]]: tensor<3xf32>,
 // DOUBLE-SAME:                                       %[[ARG2:.*]]: tensor<3xi32>) -> (tensor<3xf32>, tensor<3xi32>) {
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tile_and_decompose_attention.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tile_and_decompose_attention.mlir
similarity index 98%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tile_and_decompose_attention.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tile_and_decompose_attention.mlir
index 3531fb1..daa1798 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tile_and_decompose_attention.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tile_and_decompose_attention.mlir
@@ -1,6 +1,6 @@
-// RUN: iree-dialects-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-attention),cse)" %s | FileCheck %s
-// RUN: iree-dialects-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-attention{onlyTile}),cse)" %s | FileCheck %s --check-prefix=TILING
-// RUN: iree-dialects-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-attention{tileSize=32}),cse)" %s | FileCheck %s --check-prefix=TILESIZE
+// RUN: iree-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-attention),cse)" %s | FileCheck %s
+// RUN: iree-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-attention{onlyTile}),cse)" %s | FileCheck %s --check-prefix=TILING
+// RUN: iree-opt --split-input-file --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-attention{tileSize=32}),cse)" %s | FileCheck %s --check-prefix=TILESIZE
 
 func.func @attention(%query: tensor<1x1024x64xf32>, %key: tensor<1x1024x64xf32>, %value: tensor<1x1024x64xf32>) -> tensor<1x1024x64xf32> {
   %0 = tensor.empty() : tensor<1x1024x64xf32>
@@ -97,7 +97,7 @@
 
 // TILING-DAG:  #[[MAP:.+]] = affine_map<(d0, d1) -> (d0, d1)>
 // TILING-DAG:  #[[MAP1:.+]] = affine_map<(d0, d1) -> (d0)>
-// TILING-LABEL: @attention
+// TILING:      func.func @attention
 // TILING-SAME: (%[[QUERY:.+]]: tensor<1x1024x64xf32>, %[[KEY:.+]]: tensor<1x1024x64xf32>, %[[VALUE:.+]]: tensor<1x1024x64xf32>)
 // TILING:        %[[D0:.+]] = tensor.empty() : tensor<1x1024x64xf32>
 // TILING:        %[[D1:.+]] = tensor.empty() : tensor<1024x64xf32>
diff --git a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tile_and_decompose_winograd.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tile_and_decompose_winograd.mlir
similarity index 98%
rename from llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tile_and_decompose_winograd.mlir
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tile_and_decompose_winograd.mlir
index 3ae93fd..6c8c997 100644
--- a/llvm-external-projects/iree-dialects/test/Dialect/iree_linalg_ext/tile_and_decompose_winograd.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/tile_and_decompose_winograd.mlir
@@ -1,5 +1,5 @@
-// RUN: iree-dialects-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-winograd),cse)" --split-input-file %s | FileCheck %s
-// RUN: iree-dialects-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-winograd{onlyTile}),cse)" --split-input-file %s | FileCheck %s --check-prefix=TILING
+// RUN: iree-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-winograd),cse)" --split-input-file %s | FileCheck %s
+// RUN: iree-opt --pass-pipeline="builtin.module(func.func(iree-linalg-ext-tile-and-decompose-winograd{onlyTile}),cse)" --split-input-file %s | FileCheck %s --check-prefix=TILING
 
 #map = affine_map<(d0)[s0, s1] -> (1, -d0 + s1)>
 #map1 = affine_map<(d0)[s0, s1] -> (32, -d0 + s1)>
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/BUILD.bazel b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/BUILD.bazel
new file mode 100644
index 0000000..878c356
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/BUILD.bazel
@@ -0,0 +1,34 @@
+# Copyright 2024 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")
+
+package(
+    default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
+    licenses = ["notice"],  # Apache 2.0
+)
+
+iree_compiler_cc_library(
+    name = "Utils",
+    srcs = [
+        "Utils.cpp",
+    ],
+    hdrs = [
+        "Utils.h",
+        "WinogradConstants.h",
+    ],
+    deps = [
+        "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:ArithDialect",
+        "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:IR",
+        "@llvm-project//mlir:MemRefDialect",
+        "@llvm-project//mlir:Support",
+        "@llvm-project//mlir:TensorDialect",
+        "@llvm-project//mlir:TensorUtils",
+    ],
+)
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/CMakeLists.txt
new file mode 100644
index 0000000..9aea1b9
--- /dev/null
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/CMakeLists.txt
@@ -0,0 +1,32 @@
+################################################################################
+# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
+# compiler/src/iree/compiler/Dialect/LinalgExt/Utils/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_cc_library(
+  NAME
+    Utils
+  HDRS
+    "Utils.h"
+    "WinogradConstants.h"
+  SRCS
+    "Utils.cpp"
+  DEPS
+    LLVMSupport
+    MLIRArithDialect
+    MLIRIR
+    MLIRMemRefDialect
+    MLIRSupport
+    MLIRTensorDialect
+    MLIRTensorUtils
+  PUBLIC
+)
+
+### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Utils/Utils.cpp b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.cpp
similarity index 90%
rename from llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Utils/Utils.cpp
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.cpp
index 261aceb..14c4cf7 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Utils/Utils.cpp
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.cpp
@@ -4,18 +4,15 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/Utils/Utils.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
 
+#include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Builders.h"
-#include "llvm/ADT/TypeSwitch.h"
 
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
+namespace mlir::iree_compiler::IREE::LinalgExt {
 
 Value getDimValue(OpBuilder &builder, Location loc, Value v, int64_t dim) {
   ShapedType type = v.getType().cast<ShapedType>();
@@ -59,14 +56,16 @@
   // ]
   // where key is the idx in dims_pos while value its position in dims_pos.
   DenseMap<int64_t, int64_t> dimsAndPosMapping;
-  for (int64_t dimsIdx = 0, end = dimsPos.size(); dimsIdx < end; dimsIdx++)
+  for (int64_t dimsIdx = 0, end = dimsPos.size(); dimsIdx < end; dimsIdx++) {
     dimsAndPosMapping[dimsPos[dimsIdx]] = dimsIdx;
+  }
 
   // Scan the position in order and insert the value in the map
   // to compute the interchange vector.
   for (int64_t dimsIdx = 0; dimsIdx < rank; dimsIdx++) {
-    if (dimsAndPosMapping.count(dimsIdx))
+    if (dimsAndPosMapping.count(dimsIdx)) {
       interchangeVector.push_back(dimsAndPosMapping[dimsIdx]);
+    }
   }
   return interchangeVector;
 }
@@ -84,15 +83,13 @@
   SmallVector<int64_t> result;
   for (auto o : ofrs) {
     // Have to do this first, as getConstantIntValue special-cases constants.
-    if (o.dyn_cast<Value>())
+    if (o.dyn_cast<Value>()) {
       result.push_back(ShapedType::kDynamic);
-    else
+    } else {
       result.push_back(getConstantIntValue(o).value_or(ShapedType::kDynamic));
+    }
   }
   return result;
 }
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
+} // namespace mlir::iree_compiler::IREE::LinalgExt
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Utils/Utils.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h
similarity index 83%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Utils/Utils.h
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h
index 55eb3e6..7eb844e 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Utils/Utils.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h
@@ -4,8 +4,8 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_UTILS_UTILS_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_UTILS_UTILS_H_
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_UTILS_UTILS_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_UTILS_UTILS_H_
 
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -13,10 +13,7 @@
 #include "mlir/IR/OpDefinition.h"
 #include "mlir/IR/PatternMatch.h"
 
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
+namespace mlir::iree_compiler::IREE::LinalgExt {
 
 /// Returns a `memref.dim` or `tensor.dim` operation to get the shape of `v` at
 /// `dim`.
@@ -34,8 +31,8 @@
                            ArrayRef<int64_t> interchangeVector,
                            int offset = 0) {
   SmallVector<T> vec = llvm::to_vector(elements);
-  for (auto en : llvm::enumerate(interchangeVector)) {
-    vec[en.index() + offset] = elements[en.value() + offset];
+  for (auto [idx, val] : llvm::enumerate(interchangeVector)) {
+    vec[idx + offset] = elements[val + offset];
   }
   return vec;
 }
@@ -44,8 +41,8 @@
                                ArrayRef<int64_t> interchangeVector,
                                int offset = 0) {
   SmallVector<T> vec = llvm::to_vector(elements);
-  for (auto en : llvm::enumerate(interchangeVector)) {
-    vec[en.value() + offset] = elements[en.index() + offset];
+  for (auto [idx, val] : llvm::enumerate(interchangeVector)) {
+    vec[val + offset] = elements[idx + offset];
   }
   return vec;
 }
@@ -91,8 +88,5 @@
   }
 }
 
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_UTILS_UTILS_H_
+} // namespace mlir::iree_compiler::IREE::LinalgExt
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_UTILS_UTILS_H_
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Utils/WinogradConstants.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/WinogradConstants.h
similarity index 86%
rename from llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Utils/WinogradConstants.h
rename to compiler/src/iree/compiler/Dialect/LinalgExt/Utils/WinogradConstants.h
index 77dbb09..9c53536 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Utils/WinogradConstants.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/WinogradConstants.h
@@ -4,14 +4,10 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_UTILS_WINOGRAD_CONSTANTS_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_UTILS_WINOGRAD_CONSTANTS_H_
+#ifndef IREE_COMPILER_DIALECT_LINALGEXT_UTILS_WINOGRAD_CONSTANTS_H_
+#define IREE_COMPILER_DIALECT_LINALGEXT_UTILS_WINOGRAD_CONSTANTS_H_
 
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
-namespace Winograd {
+namespace mlir::iree_compiler::IREE::LinalgExt::Winograd {
 
 // This file contains the Winograd constant matrices for different
 // output tile sizes
@@ -82,9 +78,5 @@
 
 // clang-format on
 
-} // namespace Winograd
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_UTILS_WINOGRAD_CONSTANTS_H_
+} // namespace mlir::iree_compiler::IREE::LinalgExt::Winograd
+#endif // IREE_COMPILER_DIALECT_LINALGEXT_UTILS_WINOGRAD_CONSTANTS_H_
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/BUILD.bazel b/compiler/src/iree/compiler/Dialect/Stream/Transforms/BUILD.bazel
index 6a8133b..25ecfbd 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/BUILD.bazel
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/BUILD.bazel
@@ -47,6 +47,7 @@
         ":PassesIncGen",
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/Dialect/Stream/Analysis",
         "//compiler/src/iree/compiler/Dialect/Stream/Builtins",
         "//compiler/src/iree/compiler/Dialect/Stream/Conversion",
@@ -61,7 +62,6 @@
         "//compiler/src/iree/compiler/Dialect/Util/IR",
         "//compiler/src/iree/compiler/Dialect/Util/Transforms",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:Analysis",
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt
index 1700d99..22b73f7 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt
@@ -42,7 +42,6 @@
     "VerifyLowerings.cpp"
   DEPS
     ::PassesIncGen
-    IREELinalgExtDialect
     LLVMSupport
     MLIRAffineDialect
     MLIRAnalysis
@@ -64,6 +63,7 @@
     MLIRVectorDialect
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
+    iree::compiler::Dialect::LinalgExt::IR
     iree::compiler::Dialect::Stream::Analysis
     iree::compiler::Dialect::Stream::Builtins
     iree::compiler::Dialect::Stream::Conversion
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp b/compiler/src/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp
index 09dee2b..f0f10d5 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 // TODO(benvanik): have a stream/upstream equivalent of the flow.dispatch.* ops.
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
diff --git a/compiler/src/iree/compiler/Dialect/Util/IR/BUILD.bazel b/compiler/src/iree/compiler/Dialect/Util/IR/BUILD.bazel
index 819d48f..744edf7 100644
--- a/compiler/src/iree/compiler/Dialect/Util/IR/BUILD.bazel
+++ b/compiler/src/iree/compiler/Dialect/Util/IR/BUILD.bazel
@@ -49,7 +49,7 @@
     ],
     deps = [
         ":IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "@llvm-project//mlir:ArithDialect",
         "@llvm-project//mlir:LinalgDialect",
         "@llvm-project//mlir:LinalgStructuredOpsIncGen",
diff --git a/compiler/src/iree/compiler/Dialect/Util/IR/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/Util/IR/CMakeLists.txt
index 66e0ecc..850ea6c 100644
--- a/compiler/src/iree/compiler/Dialect/Util/IR/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Dialect/Util/IR/CMakeLists.txt
@@ -19,12 +19,12 @@
     "UtilExternalModels.cpp"
   DEPS
     ::IR
-    IREELinalgExtDialect
     MLIRArithDialect
     MLIRLinalgDialect
     MLIRLinalgStructuredOpsIncGenLib
     MLIRMLProgramDialect
     MLIRTensorDialect
+    iree::compiler::Dialect::LinalgExt::IR
   PUBLIC
 )
 
diff --git a/compiler/src/iree/compiler/Dialect/Util/IR/UtilExternalModels.cpp b/compiler/src/iree/compiler/Dialect/Util/IR/UtilExternalModels.cpp
index 691e5d5..a13a337 100644
--- a/compiler/src/iree/compiler/Dialect/Util/IR/UtilExternalModels.cpp
+++ b/compiler/src/iree/compiler/Dialect/Util/IR/UtilExternalModels.cpp
@@ -6,8 +6,8 @@
 
 #include "iree/compiler/Dialect/Util/IR/UtilExternalModels.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
diff --git a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/BUILD.bazel b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/BUILD.bazel
index 679f090..d984bba 100644
--- a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/BUILD.bazel
+++ b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/BUILD.bazel
@@ -58,6 +58,7 @@
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR:HALDialect",
         "//compiler/src/iree/compiler/Dialect/HAL/Transforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Dialect/Util/Conversion",
         "//compiler/src/iree/compiler/Dialect/Util/Conversion/MemRefToUtil",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
@@ -68,7 +69,6 @@
         "//compiler/src/iree/compiler/Dialect/VMVX/IR",
         "//compiler/src/iree/compiler/Dialect/VMVX/IR:VMVXDialect",
         "//compiler/src/iree/compiler/Utils",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
         "@llvm-project//mlir:AffineToStandard",
diff --git a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/CMakeLists.txt b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/CMakeLists.txt
index 6be3b6c..b95a902 100644
--- a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/CMakeLists.txt
@@ -45,7 +45,6 @@
     "ResolveBufferDescriptors.cpp"
   DEPS
     ::PassHeaders
-    IREELinalgExtPasses
     LLVMSupport
     MLIRAffineDialect
     MLIRAffineToStandard
@@ -81,6 +80,7 @@
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::HAL::IR::HALDialect
     iree::compiler::Dialect::HAL::Transforms
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Dialect::Util::Conversion
     iree::compiler::Dialect::Util::Conversion::MemRefToUtil
     iree::compiler::Dialect::Util::IR
diff --git a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/Passes.cpp b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/Passes.cpp
index 2ab7699..c787d57 100644
--- a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/Passes.cpp
+++ b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/Passes.cpp
@@ -8,11 +8,11 @@
 
 #include <memory>
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Codegen/Common/CPU/Passes.h"
 #include "iree/compiler/Codegen/Common/Passes.h"
 #include "iree/compiler/Codegen/VMVX/Passes.h"
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "iree/compiler/Utils/PassUtils.h"
 #include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
 #include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"
diff --git a/compiler/src/iree/compiler/GlobalOptimization/BUILD.bazel b/compiler/src/iree/compiler/GlobalOptimization/BUILD.bazel
index ef41b6b..bafbac9 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/BUILD.bazel
+++ b/compiler/src/iree/compiler/GlobalOptimization/BUILD.bazel
@@ -81,6 +81,9 @@
         "//compiler/src/iree/compiler/Dialect/Flow/Transforms",
         "//compiler/src/iree/compiler/Dialect/HAL/IR",
         "//compiler/src/iree/compiler/Dialect/HAL/IR:HALDialect",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
         "//compiler/src/iree/compiler/Dialect/Util/Analysis",
         "//compiler/src/iree/compiler/Dialect/Util/Analysis/Attributes",
         "//compiler/src/iree/compiler/Dialect/Util/Analysis/DFX",
@@ -90,9 +93,6 @@
         "//compiler/src/iree/compiler/Pipelines:Options",
         "//compiler/src/iree/compiler/Utils",
         "//llvm-external-projects/iree-dialects:IREEDialectsTransforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtUtils",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
diff --git a/compiler/src/iree/compiler/GlobalOptimization/CMakeLists.txt b/compiler/src/iree/compiler/GlobalOptimization/CMakeLists.txt
index 585227b..66eda40 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/CMakeLists.txt
+++ b/compiler/src/iree/compiler/GlobalOptimization/CMakeLists.txt
@@ -65,9 +65,6 @@
     ::PassHeaders
     ::PassesIncGen
     IREEDialectsTransforms
-    IREELinalgExtDialect
-    IREELinalgExtTransforms
-    IREELinalgExtUtils
     IREELinalgTransformDialect
     LLVMSupport
     MLIRAffineDialect
@@ -98,6 +95,9 @@
     iree::compiler::Dialect::Flow::Transforms
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::HAL::IR::HALDialect
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::Transforms
+    iree::compiler::Dialect::LinalgExt::Utils
     iree::compiler::Dialect::Util::Analysis
     iree::compiler::Dialect::Util::Analysis::Attributes
     iree::compiler::Dialect::Util::Analysis::DFX
diff --git a/compiler/src/iree/compiler/GlobalOptimization/DetachElementwiseFromNamedOps.cpp b/compiler/src/iree/compiler/GlobalOptimization/DetachElementwiseFromNamedOps.cpp
index 1da073c..c90a0f8 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/DetachElementwiseFromNamedOps.cpp
+++ b/compiler/src/iree/compiler/GlobalOptimization/DetachElementwiseFromNamedOps.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
 #include "iree/compiler/GlobalOptimization/PassDetail.h"
 #include "iree/compiler/GlobalOptimization/Passes.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
diff --git a/compiler/src/iree/compiler/GlobalOptimization/Interfaces/BUILD.bazel b/compiler/src/iree/compiler/GlobalOptimization/Interfaces/BUILD.bazel
index dc3cc62..33542c5 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/Interfaces/BUILD.bazel
+++ b/compiler/src/iree/compiler/GlobalOptimization/Interfaces/BUILD.bazel
@@ -39,8 +39,8 @@
     deps = [
         "//compiler/src/iree/compiler/Dialect/Flow/IR",
         "//compiler/src/iree/compiler/Dialect/Flow/IR:FlowOpsGen",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgDialect",
diff --git a/compiler/src/iree/compiler/GlobalOptimization/Interfaces/CMakeLists.txt b/compiler/src/iree/compiler/GlobalOptimization/Interfaces/CMakeLists.txt
index f03d33d..8e69a7b 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/Interfaces/CMakeLists.txt
+++ b/compiler/src/iree/compiler/GlobalOptimization/Interfaces/CMakeLists.txt
@@ -33,7 +33,6 @@
     "HoistableOpInterface.cpp"
     "HoistableTypeInterface.cpp"
   DEPS
-    IREELinalgExtDialect
     LLVMSupport
     MLIRIR
     MLIRLinalgDialect
@@ -42,6 +41,7 @@
     MLIRTensorDialect
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::Flow::IR::FlowOpsGen
+    iree::compiler::Dialect::LinalgExt::IR
     iree::compiler::Dialect::Util::IR
   PUBLIC
 )
diff --git a/compiler/src/iree/compiler/GlobalOptimization/Interfaces/HoistableOpInterface.cpp b/compiler/src/iree/compiler/GlobalOptimization/Interfaces/HoistableOpInterface.cpp
index 9dfc96d..1ff3456 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/Interfaces/HoistableOpInterface.cpp
+++ b/compiler/src/iree/compiler/GlobalOptimization/Interfaces/HoistableOpInterface.cpp
@@ -6,9 +6,9 @@
 
 #include "iree/compiler/GlobalOptimization/Interfaces/HoistableOpInterface.h"
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
diff --git a/compiler/src/iree/compiler/GlobalOptimization/RaiseSpecialOps.cpp b/compiler/src/iree/compiler/GlobalOptimization/RaiseSpecialOps.cpp
index e180f03..24b1f2c 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/RaiseSpecialOps.cpp
+++ b/compiler/src/iree/compiler/GlobalOptimization/RaiseSpecialOps.cpp
@@ -4,12 +4,11 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 #include "iree-dialects/Transforms/TransformMatchers.h"
 #include "iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtInterfaces.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/GlobalOptimization/PassDetail.h"
 #include "iree/compiler/GlobalOptimization/Passes.h"
 #include "llvm/ADT/STLExtras.h"
diff --git a/compiler/src/iree/compiler/GlobalOptimization/SetEncoding.cpp b/compiler/src/iree/compiler/GlobalOptimization/SetEncoding.cpp
index 9c020e5..ceb24ce 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/SetEncoding.cpp
+++ b/compiler/src/iree/compiler/GlobalOptimization/SetEncoding.cpp
@@ -9,10 +9,10 @@
 // operations in tiled layouts.
 //===---------------------------------------------------------------------===//
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
-#include "iree-dialects/Dialect/LinalgExt/Utils/Utils.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenAttrs.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
+#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
 #include "iree/compiler/GlobalOptimization/PassDetail.h"
 #include "iree/compiler/GlobalOptimization/Passes.h"
 #include "iree/compiler/GlobalOptimization/Utils.h"
diff --git a/compiler/src/iree/compiler/GlobalOptimization/Utils.h b/compiler/src/iree/compiler/GlobalOptimization/Utils.h
index 6ba86c1..8dfed6e 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/Utils.h
+++ b/compiler/src/iree/compiler/GlobalOptimization/Utils.h
@@ -8,9 +8,9 @@
 
 #include <optional>
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/RegionOpUtils.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.h"
 
 namespace mlir {
 class Type;
diff --git a/compiler/src/iree/compiler/Tools/BUILD.bazel b/compiler/src/iree/compiler/Tools/BUILD.bazel
index 56ddf02..02a0325 100644
--- a/compiler/src/iree/compiler/Tools/BUILD.bazel
+++ b/compiler/src/iree/compiler/Tools/BUILD.bazel
@@ -43,6 +43,8 @@
         "//compiler/src/iree/compiler/Dialect/Flow/Transforms",
         "//compiler/src/iree/compiler/Dialect/HAL/IR:HALDialect",
         "//compiler/src/iree/compiler/Dialect/HAL/Transforms",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
+        "//compiler/src/iree/compiler/Dialect/LinalgExt/Transforms",
         "//compiler/src/iree/compiler/Dialect/Stream/IR",
         "//compiler/src/iree/compiler/Dialect/Stream/Transforms",
         "//compiler/src/iree/compiler/Dialect/Util/IR",
@@ -68,8 +70,6 @@
         "//compiler/src/iree/compiler/Preprocessing:Passes",
         "//compiler/src/iree/compiler/Preprocessing/TransformExtensions:PreprocessingExtensions",
         "//llvm-external-projects/iree-dialects:IREEInputDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtDialect",
-        "//llvm-external-projects/iree-dialects:IREELinalgExtPasses",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialect",
         "//llvm-external-projects/iree-dialects:IREELinalgTransformDialectPasses",
         "//llvm-external-projects/iree-dialects:IREEVectorExtDialect",
diff --git a/compiler/src/iree/compiler/Tools/CMakeLists.txt b/compiler/src/iree/compiler/Tools/CMakeLists.txt
index 184bd6b..176e3f4 100644
--- a/compiler/src/iree/compiler/Tools/CMakeLists.txt
+++ b/compiler/src/iree/compiler/Tools/CMakeLists.txt
@@ -32,9 +32,6 @@
     "init_iree_passes.h"
   DEPS
     IREEInputDialect
-    IREELinalgExtDialect
-    IREELinalgExtTransformOps
-    IREELinalgExtTransforms
     IREELinalgTransformDialect
     IREELinalgTransformDialectPasses
     IREEVectorExtDialect
@@ -49,6 +46,9 @@
     iree::compiler::Dialect::Flow::Transforms
     iree::compiler::Dialect::HAL::IR::HALDialect
     iree::compiler::Dialect::HAL::Transforms
+    iree::compiler::Dialect::LinalgExt::IR
+    iree::compiler::Dialect::LinalgExt::TransformExtensions::LinalgExtExtensions
+    iree::compiler::Dialect::LinalgExt::Transforms
     iree::compiler::Dialect::Stream::IR
     iree::compiler::Dialect::Stream::Transforms
     iree::compiler::Dialect::Util::IR
diff --git a/compiler/src/iree/compiler/Tools/init_iree_dialects.h b/compiler/src/iree/compiler/Tools/init_iree_dialects.h
index 68537b3..82c2d90 100644
--- a/compiler/src/iree/compiler/Tools/init_iree_dialects.h
+++ b/compiler/src/iree/compiler/Tools/init_iree_dialects.h
@@ -13,8 +13,6 @@
 #define IREE_COMPILER_TOOLS_INIT_IREE_DIALECTS_H_
 
 #include "iree-dialects/Dialect/Input/InputDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree-dialects/Dialect/LinalgTransform/Passes.h"
 #include "iree-dialects/Dialect/VectorExt/IR/VectorExtDialect.h"
 #include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenDialect.h"
@@ -22,6 +20,8 @@
 #include "iree/compiler/Codegen/Interfaces/Interfaces.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilExternalModels.h"
diff --git a/compiler/src/iree/compiler/Tools/init_iree_passes.h b/compiler/src/iree/compiler/Tools/init_iree_passes.h
index 93816cb..7b84c96 100644
--- a/compiler/src/iree/compiler/Tools/init_iree_passes.h
+++ b/compiler/src/iree/compiler/Tools/init_iree_passes.h
@@ -14,13 +14,13 @@
 
 #include <cstdlib>
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree/compiler/Bindings/Native/Transforms/Passes.h"
 #include "iree/compiler/Bindings/TFLite/Transforms/Passes.h"
 #include "iree/compiler/ConstEval/Passes.h"
 #include "iree/compiler/Dialect/Flow/Conversion/MeshToFlow/MeshToFlow.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
+#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Stream/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
 #include "iree/compiler/Dialect/VM/Analysis/TestPasses.h"
diff --git a/docs/website/docs/reference/mlir-dialects/index.md b/docs/website/docs/reference/mlir-dialects/index.md
index ded67de..f0ddf9c 100644
--- a/docs/website/docs/reference/mlir-dialects/index.md
+++ b/docs/website/docs/reference/mlir-dialects/index.md
@@ -24,6 +24,7 @@
 [HAL/Inline](./HALInline.md) | Inline HAL interop runtime module dialect
 [HAL/Loader](./HALLoader.md) | HAL inline executable loader runtime module dialect
 [IO/Parameters](./IOParameters.md) | External parameter resource management APIs
+[LinalgExt](./LinalgExt.md) | Extensions to the Linalg dialect for specific operations
 [Stream](./Stream.md)       | Model execution partitioning and scheduling
 [Util](./Util.md)           | Types and ops common across IREE subdialects
 [VM](./VM.md)               | Represents operations against an abstract virtual machine
@@ -40,7 +41,6 @@
 Dialect                             | Description
 ------------------------------------| -----------
 [IREEInput](./IREEInput.md)         | Structural ops legal as input to IREE's compiler
-[IREELinalgExt](./IREELinalgExt.md) | Extensions to the Linalg dialect for specific operations
 [IREEVectorExt](./IREEVectorExt.md) | Extensions to the Vector dialect for specific operations
 
 [^1]: Hardware Abstraction Layer
diff --git a/docs/website/generate_extra_files.sh b/docs/website/generate_extra_files.sh
index 4b84175..57353ed 100755
--- a/docs/website/generate_extra_files.sh
+++ b/docs/website/generate_extra_files.sh
@@ -38,9 +38,9 @@
 fi
 
 # Copy into a new directory before making edits, so CMake only runs when needed.
-BUILD_DOCS_ORIGINAL_DIR="${BUILD_DIR}/doc/Dialects/"
+BUILD_DOCS_ORIGINAL_DIR="${BUILD_DIR}/doc/Dialects"
 BUILD_DOCS_DIALECTS_ORIGINAL_DIR="${BUILD_DIR}/llvm-external-projects/mlir-iree-dialects/docs/Dialects"
-BUILD_DOCS_PROCESSED_DIR="${BUILD_DIR}/doc/Dialects_for_website/"
+BUILD_DOCS_PROCESSED_DIR="${BUILD_DIR}/doc/Dialects_for_website"
 mkdir -p "${BUILD_DOCS_PROCESSED_DIR}"
 cp -r "${BUILD_DOCS_ORIGINAL_DIR}/." "${BUILD_DOCS_PROCESSED_DIR}"
 cp -r "${BUILD_DOCS_DIALECTS_ORIGINAL_DIR}/." "${BUILD_DOCS_PROCESSED_DIR}"
@@ -56,7 +56,6 @@
 
 # Rename iree-dialect files.
 mv "${BUILD_DOCS_PROCESSED_DIR}/InputOps.md" "${BUILD_DOCS_PROCESSED_DIR}/IREEInput.md"
-mv "${BUILD_DOCS_PROCESSED_DIR}/LinalgExtOps.md" "${BUILD_DOCS_PROCESSED_DIR}/IREELinalgExt.md"
 mv "${BUILD_DOCS_PROCESSED_DIR}/VectorExtOps.md" "${BUILD_DOCS_PROCESSED_DIR}/IREEVectorExt.md"
 # mv "${BUILD_DOCS_PROCESSED_DIR}/StructuredTransformOpsExt.md" "${BUILD_DOCS_PROCESSED_DIR}/IREEStructuredTransformExt.md"
 
diff --git a/docs/website/mkdocs.yml b/docs/website/mkdocs.yml
index 15412e5..e9fa252 100644
--- a/docs/website/mkdocs.yml
+++ b/docs/website/mkdocs.yml
@@ -157,6 +157,7 @@
               - HAL/Inline: "reference/mlir-dialects/HALInline.md"
               - HAL/Loader: "reference/mlir-dialects/HALLoader.md"
               - IO/Parameters: "reference/mlir-dialects/IOParameters.md"
+              - LinalgExt: "reference/mlir-dialects/LinalgExt.md"
               - Stream: "reference/mlir-dialects/Stream.md"
               - Util: "reference/mlir-dialects/Util.md"
               - VM: "reference/mlir-dialects/VM.md"
@@ -164,7 +165,6 @@
           # Dialects from llvm-external-projects/iree-dialects/
           - "Public dialects":
               - IREEInput: "reference/mlir-dialects/IREEInput.md"
-              - IREELinalgExt: "reference/mlir-dialects/IREELinalgExt.md"
               - IREEVectorExt: "reference/mlir-dialects/IREEVectorExt.md"
       - "Other topics":
           - Glossary: "reference/glossary.md"
diff --git a/docs/website/postprocess_dialect_docs.py b/docs/website/postprocess_dialect_docs.py
index 193ce1f..7066a36 100644
--- a/docs/website/postprocess_dialect_docs.py
+++ b/docs/website/postprocess_dialect_docs.py
@@ -75,8 +75,8 @@
         "HALLoader.md": "compiler/src/iree/compiler/Modules/HAL/Loader/IR",
         "IOParameters.md": "compiler/src/iree/compiler/Modules/IO/Parameters/IR",
         "IREEInput.md": "llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input",
-        "IREELinalgExt.md": "llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR",
         "IREEVectorExt.md": "llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/VectorExt/IR",
+        "LinalgExt.md": "compiler/src/iree/compiler/Dialect/LinalgExt/IR",
         "Stream.md": "compiler/src/iree/compiler/Dialect/Stream/IR",
         "Util.md": "compiler/src/iree/compiler/Dialect/Util/IR",
         "VM.md": "compiler/src/iree/compiler/Dialect/VM/IR",
diff --git a/llvm-external-projects/iree-dialects/BUILD.bazel b/llvm-external-projects/iree-dialects/BUILD.bazel
index 31044bc..201c69b 100644
--- a/llvm-external-projects/iree-dialects/BUILD.bazel
+++ b/llvm-external-projects/iree-dialects/BUILD.bazel
@@ -30,8 +30,6 @@
     name = "TdFilegroup",
     srcs = glob([
         "include/iree-dialects/Dialect/Input/*.td",
-        "include/iree-dialects/Dialect/LinalgExt/IR/*.td",
-        "include/iree-dialects/Dialect/LinalgExt/Passes/*.td",
         "include/iree-dialects/Dialect/VectorExt/IR/*.td",
     ]),
 )
@@ -40,8 +38,6 @@
     name = "TdFiles",
     srcs = glob([
         "include/iree-dialects/Dialect/Input/*.td",
-        "include/iree-dialects/Dialect/LinalgExt/IR/*.td",
-        "include/iree-dialects/Dialect/LinalgExt/Passes/*.td",
         "include/iree-dialects/Dialect/LinalgTransform/*.td",
         "include/iree-dialects/Dialect/VectorExt/IR/*.td",
         "python/iree/compiler/dialects/*.td",
@@ -167,7 +163,7 @@
 )
 
 ################################################################################
-# IREELinalgExt Dialect
+# IREELinalgTransform Dialect
 ################################################################################
 
 cc_library(
@@ -198,293 +194,6 @@
 )
 
 gentbl_cc_library(
-    name = "IREELinalgExtIncGen",
-    strip_include_prefix = "include",
-    tbl_outs = [
-        (
-            [
-                "--dialect=iree_linalg_ext",
-                "--gen-dialect-decls",
-            ],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h.inc",
-        ),
-        (
-            [
-                "--dialect=iree_linalg_ext",
-                "--gen-dialect-defs",
-            ],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.cpp.inc",
-        ),
-        (
-            ["--gen-attrdef-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtAttrs.h.inc",
-        ),
-        (
-            ["--gen-attrdef-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtAttrs.cpp.inc",
-        ),
-        (
-            ["--gen-enum-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtEnums.h.inc",
-        ),
-        (
-            ["--gen-enum-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtEnums.cpp.inc",
-        ),
-        (
-            ["--gen-op-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h.inc",
-        ),
-        (
-            ["--gen-op-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.cpp.inc",
-        ),
-        (
-            ["--gen-typedef-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtTypes.h.inc",
-        ),
-        (
-            ["--gen-typedef-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtTypes.cpp.inc",
-        ),
-    ],
-    tblgen = "@llvm-project//mlir:mlir-tblgen",
-    td_file = "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.td",
-    deps = [
-        ":TdFiles",
-        "@llvm-project//mlir:CallInterfacesTdFiles",
-        "@llvm-project//mlir:ControlFlowInterfacesTdFiles",
-        "@llvm-project//mlir:DestinationStyleOpInterfaceTdFiles",
-        "@llvm-project//mlir:InferTypeOpInterfaceTdFiles",
-        "@llvm-project//mlir:TilingInterfaceTdFiles",
-        "@llvm-project//mlir:ViewLikeInterfaceTdFiles",
-    ],
-)
-
-gentbl_cc_library(
-    name = "IREELinalgExtInterfacesIncGen",
-    strip_include_prefix = "include",
-    tbl_outs = [
-        (
-            ["--gen-op-interface-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOpInterfaces.h.inc",
-        ),
-        (
-            ["--gen-op-interface-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtOpInterfaces.cpp.inc",
-        ),
-        (
-            ["--gen-type-interface-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtTypeInterfaces.h.inc",
-        ),
-        (
-            ["--gen-type-interface-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtTypeInterfaces.cpp.inc",
-        ),
-    ],
-    tblgen = "@llvm-project//mlir:mlir-tblgen",
-    td_file = "include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.td",
-    deps = [
-        ":TdFiles",
-    ],
-)
-
-gentbl_cc_library(
-    name = "IREELinalgExtPassIncGen",
-    strip_include_prefix = "include",
-    tbl_outs = [
-        (
-            ["--gen-pass-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/Passes/Passes.h.inc",
-        ),
-        (
-            ["--gen-pass-capi-header"],
-            "include/iree-dialects/Dialect/LinalgExt/Passes/Passes.capi.h.inc",
-        ),
-        (
-            ["--gen-pass-capi-impl"],
-            "include/iree-dialects/Dialect/LinalgExt/Passes/Passes.capi.cpp.inc",
-        ),
-    ],
-    tblgen = "@llvm-project//mlir:mlir-tblgen",
-    td_file = "include/iree-dialects/Dialect/LinalgExt/Passes/Passes.td",
-    deps = [
-        ":TdFiles",
-        "@llvm-project//mlir:PassBaseTdFiles",
-    ],
-)
-
-cc_library(
-    name = "IREELinalgExtUtils",
-    srcs = [
-        "lib/Dialect/LinalgExt/Utils/Utils.cpp",
-    ],
-    hdrs = [
-        "include/iree-dialects/Dialect/LinalgExt/Utils/Utils.h",
-        "include/iree-dialects/Dialect/LinalgExt/Utils/WinogradConstants.h",
-    ],
-    includes = ["include"],
-    deps = [
-        "@llvm-project//llvm:Support",
-        "@llvm-project//mlir:ArithDialect",
-        "@llvm-project//mlir:DialectUtils",
-        "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:MemRefDialect",
-        "@llvm-project//mlir:Support",
-        "@llvm-project//mlir:TensorDialect",
-        "@llvm-project//mlir:TensorUtils",
-    ],
-)
-
-cc_library(
-    name = "IREELinalgExtDialect",
-    srcs = glob([
-        "lib/Dialect/LinalgExt/IR/*.cpp",
-    ]),
-    hdrs = glob([
-        "include/iree-dialects/Dialect/LinalgExt/IR/*.h",
-    ]),
-    includes = ["include"],
-    deps = [
-        ":IREELinalgExtIncGen",
-        ":IREELinalgExtInterfacesIncGen",
-        ":IREELinalgExtPassIncGen",
-        ":IREELinalgExtUtils",
-        "@llvm-project//llvm:Support",
-        "@llvm-project//mlir:AffineDialect",
-        "@llvm-project//mlir:AffineUtils",
-        "@llvm-project//mlir:ArithDialect",
-        "@llvm-project//mlir:ArithUtils",
-        "@llvm-project//mlir:ControlFlowInterfaces",
-        "@llvm-project//mlir:DestinationStyleOpInterface",
-        "@llvm-project//mlir:DialectUtils",
-        "@llvm-project//mlir:FuncDialect",
-        "@llvm-project//mlir:FunctionInterfaces",
-        "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:InferTypeOpInterface",
-        "@llvm-project//mlir:LinalgDialect",
-        "@llvm-project//mlir:LinalgUtils",
-        "@llvm-project//mlir:MathDialect",
-        "@llvm-project//mlir:MemRefDialect",
-        "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:SideEffectInterfaces",
-        "@llvm-project//mlir:Support",
-        "@llvm-project//mlir:TensorDialect",
-        "@llvm-project//mlir:TensorUtils",
-        "@llvm-project//mlir:TilingInterface",
-        "@llvm-project//mlir:ViewLikeInterface",
-    ],
-)
-
-# TODO(#9827): Remove aliases and/or backref.
-alias(
-    name = "IREELinalgExtPasses",
-    actual = ":IREELinalgExtPassesAndTransforms",
-)
-
-alias(
-    name = "IREELinalgExtTransforms",
-    actual = ":IREELinalgExtPassesAndTransforms",
-)
-
-gentbl_cc_library(
-    name = "IREELinalgExtTransformOpsIncGen",
-    strip_include_prefix = "include",
-    tbl_outs = [
-        (
-            ["--gen-op-decls"],
-            "include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h.inc",
-        ),
-        (
-            ["--gen-op-defs"],
-            "include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.cpp.inc",
-        ),
-    ],
-    tblgen = "@llvm-project//mlir:mlir-tblgen",
-    td_file = "include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.td",
-    deps = [
-        ":TdFiles",
-        "@llvm-project//mlir:SideEffectInterfacesTdFiles",
-    ],
-)
-
-cc_library(
-    name = "IREELinalgExtTransformOps",
-    srcs = glob(["lib/Dialect/LinalgExt/TransformOps/*.cpp"]),
-    hdrs = glob(["include/iree-dialects/Dialect/LinalgExt/TransformOps/*.h"]),
-    deps = [
-        ":IREEDialectsTransforms",
-        ":IREELinalgExtDialect",
-        ":IREELinalgExtPasses",
-        ":IREELinalgExtTransformOpsIncGen",
-        ":IREELinalgExtTransforms",
-        ":IREELinalgTransformDialect",
-        "@llvm-project//llvm:Support",
-        "@llvm-project//mlir:AsyncDialect",
-        "@llvm-project//mlir:DialectUtils",
-        "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:LinalgDialect",
-        "@llvm-project//mlir:PDLDialect",
-        "@llvm-project//mlir:TransformDialect",
-    ],
-)
-
-cc_library(
-    name = "IREELinalgExtPassesAndTransforms",
-    srcs = glob([
-        "lib/Dialect/LinalgExt/Passes/*.cpp",
-        "lib/Dialect/LinalgExt/Transforms/*.cpp",
-    ]),
-    hdrs = glob([
-        "include/iree-dialects/Dialect/LinalgExt/Passes/*.h",
-        "include/iree-dialects/Dialect/LinalgExt/Transforms/*.h",
-    ]),
-    deps = [
-        ":IREEInputDialect",
-        ":IREELinalgExtDialect",
-        ":IREELinalgExtPassIncGen",
-        ":IREELinalgExtUtils",
-        "@llvm-project//llvm:Support",
-        "@llvm-project//mlir:AffineDialect",
-        "@llvm-project//mlir:AffineUtils",
-        "@llvm-project//mlir:ArithDialect",
-        "@llvm-project//mlir:ArithUtils",
-        "@llvm-project//mlir:AsyncDialect",
-        "@llvm-project//mlir:BufferizationDialect",
-        "@llvm-project//mlir:DialectUtils",
-        "@llvm-project//mlir:FuncDialect",
-        "@llvm-project//mlir:FunctionInterfaces",
-        "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:LinalgDialect",
-        "@llvm-project//mlir:LinalgStructuredOpsIncGen",
-        "@llvm-project//mlir:LinalgTransforms",
-        "@llvm-project//mlir:LinalgUtils",
-        "@llvm-project//mlir:MathDialect",
-        "@llvm-project//mlir:MemRefDialect",
-        "@llvm-project//mlir:MemRefTransforms",
-        "@llvm-project//mlir:Parser",
-        "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:SCFTransforms",
-        "@llvm-project//mlir:Support",
-        "@llvm-project//mlir:TensorDialect",
-        "@llvm-project//mlir:TensorTransforms",
-        "@llvm-project//mlir:TensorUtils",
-        "@llvm-project//mlir:TilingInterface",
-        "@llvm-project//mlir:TransformDialect",
-        "@llvm-project//mlir:TransformUtils",
-        "@llvm-project//mlir:Transforms",
-        "@llvm-project//mlir:VectorDialect",
-        "@llvm-project//mlir:VectorTransforms",
-    ],
-)
-
-################################################################################
-# IREELinalgTransform Dialect
-################################################################################
-
-gentbl_cc_library(
     name = "IREELinalgTransformStructuredIncGen",
     strip_include_prefix = "include",
     tbl_outs = [
@@ -516,9 +225,6 @@
     includes = ["include"],
     deps = [
         ":IREEDialectsTransforms",
-        ":IREELinalgExtDialect",
-        ":IREELinalgExtPasses",
-        ":IREELinalgExtTransforms",
         ":IREELinalgTransformStructuredIncGen",
         "@llvm-project//llvm:Support",
 
@@ -585,7 +291,6 @@
     ]),
     deps = [
         ":IREEDialectsTransforms",
-        ":IREELinalgExtDialect",
         ":IREELinalgTransformDialect",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineDialect",
@@ -750,8 +455,6 @@
     includes = ["include"],
     deps = [
         ":IREEInputDialect",
-        ":IREELinalgExtDialect",
-        ":IREELinalgExtTransformOps",
         ":IREELinalgTransformDialect",
         ":IREELinalgTransformDialectPasses",
         "@llvm-project//mlir:CAPIIR",
@@ -773,7 +476,6 @@
     ]),
     deps = [
         ":IREEDialectsTransforms",
-        ":IREELinalgExtDialect",
         ":IREELinalgTransformDialect",
         ":IREELinalgTransformDialectPasses",
         ":IREEVectorExtDialect",
@@ -795,12 +497,8 @@
     ],
     tags = ["hostonly"],
     deps = [
-        "IREELinalgExtTransforms",
         ":IREEDialectsTest",
         ":IREEInputDialect",
-        ":IREELinalgExtDialect",
-        ":IREELinalgExtPasses",
-        ":IREELinalgExtTransformOps",
         ":IREELinalgTransformDialect",
         ":IREELinalgTransformDialectPasses",
         ":IREEVectorExtDialect",
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects-c/Dialects.h b/llvm-external-projects/iree-dialects/include/iree-dialects-c/Dialects.h
index 0051ee3..c04caa4 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects-c/Dialects.h
+++ b/llvm-external-projects/iree-dialects/include/iree-dialects-c/Dialects.h
@@ -22,12 +22,6 @@
 MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(IREEInput, iree_input);
 
 //===--------------------------------------------------------------------===//
-// IREELinalgExt
-//===--------------------------------------------------------------------===//
-
-MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(IREELinalgExt, iree_linalg_ext);
-
-//===--------------------------------------------------------------------===//
 // LinalgTransform
 //===--------------------------------------------------------------------===//
 
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/CMakeLists.txt b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/CMakeLists.txt
index 18881bd..b83ada2 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/CMakeLists.txt
@@ -1,4 +1,3 @@
 add_subdirectory(Input)
-add_subdirectory(LinalgExt)
 add_subdirectory(LinalgTransform)
 add_subdirectory(VectorExt)
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/CMakeLists.txt b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/CMakeLists.txt
deleted file mode 100644
index 4391ced..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_subdirectory(IR)
-add_subdirectory(Passes)
-add_subdirectory(TransformOps)
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/CMakeLists.txt b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/CMakeLists.txt
deleted file mode 100644
index 01ef3ea..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/CMakeLists.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-function(_add_interfaces)
-  set(LLVM_TARGET_DEFINITIONS LinalgExtInterfaces.td)
-  mlir_tablegen(LinalgExtOpInterfaces.h.inc -gen-op-interface-decls)
-  mlir_tablegen(LinalgExtOpInterfaces.cpp.inc -gen-op-interface-defs)
-  mlir_tablegen(LinalgExtTypeInterfaces.h.inc -gen-type-interface-decls)
-  mlir_tablegen(LinalgExtTypeInterfaces.cpp.inc -gen-type-interface-defs)
-  add_public_tablegen_target(IREELinalgExtInterfacesIncGen)
-  add_dependencies(IREELinalgExtIncGen IREELinalgExtInterfacesIncGen)
-endfunction()
-
-function(_add_dialect)
-  set(LLVM_TARGET_DEFINITIONS LinalgExtOps.td)
-  mlir_tablegen(LinalgExtAttrs.h.inc -gen-attrdef-decls)
-  mlir_tablegen(LinalgExtAttrs.cpp.inc -gen-attrdef-defs)
-  mlir_tablegen(LinalgExtEnums.h.inc -gen-enum-decls)
-  mlir_tablegen(LinalgExtEnums.cpp.inc -gen-enum-defs)
-  mlir_tablegen(LinalgExtOps.h.inc -gen-op-decls)
-  mlir_tablegen(LinalgExtOps.cpp.inc -gen-op-defs)
-  mlir_tablegen(LinalgExtTypes.h.inc -gen-typedef-decls)
-  mlir_tablegen(LinalgExtTypes.cpp.inc -gen-typedef-defs)
-  mlir_tablegen(LinalgExtDialect.h.inc --gen-dialect-decls --dialect=iree_linalg_ext)
-  mlir_tablegen(LinalgExtDialect.cpp.inc --gen-dialect-defs --dialect=iree_linalg_ext)
-  add_public_tablegen_target(IREELinalgExtIncGen)
-  add_dependencies(mlir-headers IREELinalgExtIncGen)
-endfunction()
-
-function(_add_doc)
-  set(LLVM_TARGET_DEFINITIONS LinalgExtOps.td)
-  set(_FLAGS
-    "--strip-prefix=::mlir::iree_compiler::IREE::"
-  )
-  mlir_tablegen(LinalgExtOps.md -gen-dialect-doc ${_FLAGS})
-  set(GEN_DOC_FILE ${IREE_DIALECTS_BINARY_DIR}/docs/Dialects/LinalgExtOps.md)
-  add_custom_command(
-          OUTPUT ${GEN_DOC_FILE}
-          COMMAND ${CMAKE_COMMAND} -E copy
-                  ${CMAKE_CURRENT_BINARY_DIR}/LinalgExtOps.md
-                  ${GEN_DOC_FILE}
-          DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LinalgExtOps.md)
-  add_custom_target(LinalgExtOpsDocGen DEPENDS ${GEN_DOC_FILE})
-  add_dependencies(iree-dialects-doc LinalgExtOpsDocGen)
-endfunction()
-
-_add_dialect()
-_add_interfaces()
-_add_doc()
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h
deleted file mode 100644
index 0a865a1..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/IR/LinalgExtInterfaces.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2021 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
-
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTINTERFACES_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTINTERFACES_H_
-
-#include "mlir/IR/Builders.h"
-#include "mlir/IR/BuiltinTypes.h"
-#include "mlir/IR/IRMapping.h"
-#include "mlir/IR/OpDefinition.h"
-#include "mlir/Interfaces/DestinationStyleOpInterface.h"
-#include "mlir/Interfaces/InferTypeOpInterface.h"
-#include "mlir/Support/LLVM.h"
-
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
-class LinalgExtOp;
-
-namespace detail {
-LogicalResult verifyLinalgExtOpInterface(Operation *op);
-}
-
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h.inc" // IWYU pragma: export
-
-/// Include the generated interface declarations.
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOpInterfaces.h.inc" // IWYU pragma: export
-
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
-
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_IR_LINALGEXTINTERFACES_H_
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/CMakeLists.txt b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/CMakeLists.txt
deleted file mode 100644
index 07379ca..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-set(LLVM_TARGET_DEFINITIONS Passes.td)
-mlir_tablegen(Passes.h.inc -gen-pass-decls)
-mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header)
-mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl)
-add_public_tablegen_target(IREELinalgExtPassesIncGen)
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h
deleted file mode 100644
index f585f4f..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/Passes/PassDetail.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2021 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
-
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_PASS_DETAIL_H_
-#define IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_PASS_DETAIL_H_
-
-#include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/SCF/IR/SCF.h"
-#include "mlir/Dialect/Vector/IR/VectorOps.h"
-#include "mlir/Interfaces/FunctionInterfaces.h"
-#include "mlir/Pass/Pass.h"
-
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
-
-#define GEN_PASS_CLASSES
-
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h.inc" // IWYU pragma: keep
-
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
-
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMS_PASS_DETAIL_H_
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/README.md b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/README.md
deleted file mode 100644
index 60509c1..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-This folder defines dialects, interfaces, operations and transformations that are
-- experimental
-- meant to eventually be upstreamed to LLVM.
-
-These are used (or will be used) within IREE as and when required. They are not
-meant to be part of "features" that IREE exposes, or part of IREEs public
-API. Their use within IREE is an internal implementation detail.
-
-Some of the transformations here might not be as well tested as others, mostly
-depending on how load-bearing it is within IREE. Those that are heavily used are
-expected to be well tested, but that might not be the case for experimental
-features. They are expected to achieve the same level of fidelity and testing as
-upstream MLIR when they are being transitioned out of IREE.
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/CMakeLists.txt b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/CMakeLists.txt
deleted file mode 100644
index 29eb823..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-function(_add_transform_dialect_extension)
-  set(LLVM_TARGET_DEFINITIONS LinalgExtTransformOps.td)
-  mlir_tablegen(LinalgExtTransformOps.h.inc -gen-op-decls)
-  mlir_tablegen(LinalgExtTransformOps.cpp.inc -gen-op-defs)
-  add_public_tablegen_target(IREELinalgExtTransformOpsIncGen)
-  add_dependencies(mlir-headers IREELinalgExtTransformOpsIncGen)
-endfunction()
-
-_add_transform_dialect_extension()
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h
deleted file mode 100644
index a1321cf..0000000
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2022 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
-
-#ifndef IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMOPS_LINALGEXTTRANSFORMOPS_H
-#define IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMOPS_LINALGEXTTRANSFORMOPS_H
-
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-
-#include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/Transform/IR/TransformDialect.h"
-#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
-#include "mlir/IR/OpDefinition.h"
-
-namespace mlir {
-namespace scf {
-class ForOp;
-class ForallOp;
-} // namespace scf
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
-class AttentionOp;
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
-
-#define GET_OP_CLASSES
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h.inc"
-
-namespace mlir {
-namespace iree_compiler {
-namespace IREE {
-namespace LinalgExt {
-class LinalgExtTransformOpsExtension
-    : public transform::TransformDialectExtension<
-          LinalgExtTransformOpsExtension> {
-public:
-  LinalgExtTransformOpsExtension();
-  void init();
-};
-} // namespace LinalgExt
-} // namespace IREE
-} // namespace iree_compiler
-} // namespace mlir
-
-#endif // IREE_DIALECTS_DIALECT_LINALGEXT_TRANSFORMOPS_LINALGEXTTRANSFORMOPS_H
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgTransform/Passes.h b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgTransform/Passes.h
index b94f416..f6950a0 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgTransform/Passes.h
+++ b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/LinalgTransform/Passes.h
@@ -5,6 +5,7 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 #include "mlir/Support/LLVM.h"
+#include "llvm/ADT/StringRef.h"
 #include <memory>
 
 namespace mlir {
diff --git a/llvm-external-projects/iree-dialects/lib/CAPI/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/CAPI/CMakeLists.txt
index 17561a6..6e385cf 100644
--- a/llvm-external-projects/iree-dialects/lib/CAPI/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/CAPI/CMakeLists.txt
@@ -4,8 +4,6 @@
   MLIRIR
   MLIRTransformDialect
   IREEInputDialect
-  IREELinalgExtDialect
-  IREELinalgExtTransformOps
   IREELinalgTransformDialect
   IREELinalgTransformDialectPasses
 )
diff --git a/llvm-external-projects/iree-dialects/lib/CAPI/Dialects.cpp b/llvm-external-projects/iree-dialects/lib/CAPI/Dialects.cpp
index bdc886b..e61c540 100644
--- a/llvm-external-projects/iree-dialects/lib/CAPI/Dialects.cpp
+++ b/llvm-external-projects/iree-dialects/lib/CAPI/Dialects.cpp
@@ -7,8 +7,6 @@
 #include "iree-dialects-c/Dialects.h"
 
 #include "iree-dialects/Dialect/Input/InputDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/Passes.h"
 #include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 #include "mlir/CAPI/IR.h"
@@ -32,14 +30,6 @@
     IREEInput, iree_input, mlir::iree_compiler::IREE::Input::IREEInputDialect)
 
 //===--------------------------------------------------------------------===//
-// IREELinalgExt
-//===--------------------------------------------------------------------===//
-
-MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(
-    IREELinalgExt, iree_linalg_ext,
-    mlir::iree_compiler::IREE::LinalgExt::IREELinalgExtDialect)
-
-//===--------------------------------------------------------------------===//
 // IREELinalgTransform
 //===--------------------------------------------------------------------===//
 
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/CMakeLists.txt
index 18881bd..b83ada2 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/CMakeLists.txt
@@ -1,4 +1,3 @@
 add_subdirectory(Input)
-add_subdirectory(LinalgExt)
 add_subdirectory(LinalgTransform)
 add_subdirectory(VectorExt)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/CMakeLists.txt
deleted file mode 100644
index 3e119c9..0000000
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-add_subdirectory(IR)
-add_subdirectory(Passes)
-add_subdirectory(TransformOps)
-add_subdirectory(Transforms)
-add_subdirectory(Utils)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
deleted file mode 100644
index fbcd1bf..0000000
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-add_mlir_library(IREELinalgExtDialect
-  LinalgExtDialect.cpp
-  LinalgExtInterfaces.cpp
-  LinalgExtOps.cpp
-
-  ADDITIONAL_HEADER_DIRS
-  ${IREE_DIALECTS_SOURCE_DIR}/include
-
-  DEPENDS
-  IREELinalgExtIncGen
-
-  LINK_LIBS PUBLIC
-  IREELinalgExtUtils
-  MLIRAffineDialect
-  MLIRAffineUtils
-  MLIRArithUtils
-  MLIRDestinationStyleOpInterface
-  MLIRDialectUtils
-  MLIRIR
-  MLIRInferTypeOpInterface
-  MLIRLinalgDialect
-  MLIRLinalgUtils
-  MLIRMathDialect
-  MLIRMemRefDialect
-  MLIRPass
-  MLIRSideEffectInterfaces
-  MLIRSupport
-  MLIRSCFDialect
-  MLIRFuncDialect
-  MLIRTensorDialect
-  MLIRTensorUtils
-  MLIRTilingInterface
-  MLIRViewLikeInterface
-)
-
-iree_dialects_target_includes(IREELinalgExtDialect)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/CMakeLists.txt
deleted file mode 100644
index 2bafb8b..0000000
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-add_mlir_library(IREELinalgExtPasses
-  ConvertConv2DToWinograd.cpp
-  ConvertToLoops.cpp
-  PadContractionToBlockSize.cpp
-  Passes.cpp
-  SplitReduction.cpp
-  TileAndDecomposeAttention.cpp
-  TileAndDecomposeWinogradPass.cpp
-
-  DEPENDS
-  IREELinalgExtPassesIncGen
-
-  LINK_LIBS PUBLIC
-  IREEInputDialect
-  IREELinalgExtDialect
-  IREELinalgExtUtils
-  MLIRAffineDialect
-  MLIRIR
-  MLIRLinalgDialect
-  MLIRLinalgTransforms
-  MLIRMathDialect
-  MLIRMemRefDialect
-  MLIRMemRefTransforms
-  MLIRPass
-  MLIRSCFDialect
-  MLIRFuncDialect
-  MLIRSupport
-  MLIRTensorDialect
-  MLIRTransforms
-)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/TransformOps/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/TransformOps/CMakeLists.txt
deleted file mode 100644
index 03ca35c..0000000
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/TransformOps/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-add_mlir_library(IREELinalgExtTransformOps
-  LinalgExtTransformOps.cpp
-
-  DEPENDS
-  mlir-headers
-
-  LINK_LIBS PUBLIC
-  IREEDialectsTransforms
-  MLIRAsyncDialect
-  MLIRRewrite
-  MLIRTransformDialect
-  IREELinalgExtDialect
-  IREELinalgExtPasses
-  IREELinalgExtTransforms
-
-  MLIRPDLDialect
-)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
deleted file mode 100644
index 3ec7fc7..0000000
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-add_mlir_library(IREELinalgExtTransforms
-  ForeachThreadToAsync.cpp
-
-  PARTIAL_SOURCES_INTENDED
-  DEPENDS
-  mlir-headers
-  IREELinalgExtDialect
-
-  LINK_LIBS PUBLIC
-  IREELinalgExtDialect
-
-  MLIRAffineToStandard
-  MLIRAsyncDialect
-  MLIRSCFToControlFlow
-  MLIRDialectUtils
-  MLIRVectorToLLVM
-  MLIRMathToLLVM
-  MLIRMemRefToLLVM
-  MLIRIR
-  MLIRMathDialect
-  MLIRLinalgDialect
-  MLIRLinalgTransforms
-  MLIRPass
-  MLIRSCFDialect
-  MLIRTensorTransforms
-  MLIRTransforms
-)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Utils/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Utils/CMakeLists.txt
deleted file mode 100644
index 85bdc21..0000000
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Utils/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-add_mlir_library(IREELinalgExtUtils
-  Utils.cpp
-
-  PARTIAL_SOURCES_INTENDED
-  DEPENDS
-  mlir-headers
-
-  LINK_LIBS PUBLIC
-  MLIRDialectUtils
-  MLIRIR
-  MLIRTensorDialect
-  MLIRMemRefDialect
-)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/CMakeLists.txt
index 9d99c95..ab0a526 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/CMakeLists.txt
@@ -8,10 +8,6 @@
   IREEDialectsTransforms
   MLIRIR
 
-  # Dialects
-  IREELinalgExtDialect
-  IREELinalgExtTransforms
-
   MLIRAsyncDialect
   MLIRControlFlowInterfaces
   MLIRLinalgDialect
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/StructuredTransformOpsExt.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/StructuredTransformOpsExt.cpp
index efd0609..828d9cc 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/StructuredTransformOpsExt.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/IR/StructuredTransformOpsExt.cpp
@@ -6,7 +6,6 @@
 
 #include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
 #include "iree-dialects/Transforms/TransformMatchers.h"
 #include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
 #include "mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h"
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Passes/TransformInterpreter.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Passes/TransformInterpreter.cpp
index 440f8a1..49ac7d4 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Passes/TransformInterpreter.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Passes/TransformInterpreter.cpp
@@ -4,8 +4,6 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/Passes.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arith/IR/Arith.h"
@@ -52,8 +50,7 @@
     // nested pass manager and this will go away.
 
     // clang-format off
-    registry.insert<mlir::iree_compiler::IREE::LinalgExt::IREELinalgExtDialect,
-                    arith::ArithDialect,
+    registry.insert<arith::ArithDialect,
                     affine::AffineDialect,
                     bufferization::BufferizationDialect,
                     linalg::LinalgDialect,
@@ -142,9 +139,7 @@
   void runOnOperation() override {
     SmallVector<Operation *> toDelete;
     getOperation()->walk<WalkOrder::PreOrder>([&](Operation *nestedOp) {
-      if (isa<iree_compiler::IREE::LinalgExt::DoNotDCEOperandsOp>(nestedOp)) {
-        toDelete.push_back(nestedOp);
-      } else if (isa<::mlir::transform::TransformOpInterface>(nestedOp)) {
+      if (isa<::mlir::transform::TransformOpInterface>(nestedOp)) {
         toDelete.push_back(nestedOp);
         return WalkResult::skip();
       }
diff --git a/llvm-external-projects/iree-dialects/lib/Transforms/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Transforms/CMakeLists.txt
index e0c1ee7..95034ec 100644
--- a/llvm-external-projects/iree-dialects/lib/Transforms/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Transforms/CMakeLists.txt
@@ -14,8 +14,6 @@
 
   DEPENDS
   mlir-headers
-  IREELinalgExtIncGen
-  IREELinalgExtInterfacesIncGen
 )
 
 iree_dialects_target_includes(IREEDialectsTransforms)
diff --git a/llvm-external-projects/iree-dialects/python/CMakeLists.txt b/llvm-external-projects/iree-dialects/python/CMakeLists.txt
index 8169057..00198b4 100644
--- a/llvm-external-projects/iree-dialects/python/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/python/CMakeLists.txt
@@ -23,14 +23,6 @@
   DIALECT_NAME iree_input
 )
 
-declare_mlir_dialect_python_bindings(
-  ADD_TO_PARENT IREEDialectsPythonSources.Dialects
-  ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/iree/compiler"
-  TD_FILE dialects/IreeLinalgExtBinding.td
-  SOURCES dialects/iree_linalg_ext.py
-  DIALECT_NAME iree_linalg_ext
-)
-
 declare_mlir_dialect_extension_python_bindings(
   ADD_TO_PARENT IREEDialectsPythonSources.Dialects
   ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/iree/compiler"
diff --git a/llvm-external-projects/iree-dialects/python/IREEDialectsModule.cpp b/llvm-external-projects/iree-dialects/python/IREEDialectsModule.cpp
index 3a55179..4753e2d 100644
--- a/llvm-external-projects/iree-dialects/python/IREEDialectsModule.cpp
+++ b/llvm-external-projects/iree-dialects/python/IREEDialectsModule.cpp
@@ -36,21 +36,6 @@
       py::arg("context") = py::none(), py::arg("load") = true);
 
   //===--------------------------------------------------------------------===//
-  // IREELinalgExt
-  //===--------------------------------------------------------------------===//
-  auto iree_linalg_ext_m = m.def_submodule("iree_linalg_ext");
-  iree_linalg_ext_m.def(
-      "register_dialect",
-      [](MlirContext context, bool load) {
-        MlirDialectHandle handle = mlirGetDialectHandle__iree_linalg_ext__();
-        mlirDialectHandleRegisterDialect(handle, context);
-        if (load) {
-          mlirDialectHandleLoadDialect(handle, context);
-        }
-      },
-      py::arg("context") = py::none(), py::arg("load") = true);
-
-  //===--------------------------------------------------------------------===//
   // TransformDialect
   //===--------------------------------------------------------------------===//
   auto transform_m = m.def_submodule("transform");
diff --git a/llvm-external-projects/iree-dialects/python/iree/compiler/dialects/IreeLinalgExtBinding.td b/llvm-external-projects/iree-dialects/python/iree/compiler/dialects/IreeLinalgExtBinding.td
deleted file mode 100644
index 7502545..0000000
--- a/llvm-external-projects/iree-dialects/python/iree/compiler/dialects/IreeLinalgExtBinding.td
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2021 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
-
-#ifndef PYTHON_BINDINGS_IREE_LINALGEXT_OPS
-#define PYTHON_BINDINGS_IREE_LINALGEXT_OPS
-
-include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtOps.td"
-
-#endif // PYTHON_BINDINGS_IREE_LINALGEXT_OPS
diff --git a/llvm-external-projects/iree-dialects/python/iree/compiler/dialects/iree_linalg_ext.py b/llvm-external-projects/iree-dialects/python/iree/compiler/dialects/iree_linalg_ext.py
deleted file mode 100644
index 01fb430..0000000
--- a/llvm-external-projects/iree-dialects/python/iree/compiler/dialects/iree_linalg_ext.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright 2021 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
-
-from ._iree_linalg_ext_ops_gen import *
-from .._mlir_libs._ireeDialects.iree_linalg_ext import *
diff --git a/llvm-external-projects/iree-dialects/test/python/smoketest.py b/llvm-external-projects/iree-dialects/test/python/smoketest.py
index dae437c..50e2f3b 100644
--- a/llvm-external-projects/iree-dialects/test/python/smoketest.py
+++ b/llvm-external-projects/iree-dialects/test/python/smoketest.py
@@ -2,8 +2,6 @@
 
 import iree.compiler.ir
 from iree.compiler.dialects import iree_input as iree_d
-from iree.compiler.dialects import iree_linalg_ext
 
 with iree.compiler.ir.Context() as ctx:
     iree_d.register_dialect()
-    iree_linalg_ext.register_dialect()
diff --git a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
index 55d1e6d..c8e9f8c 100644
--- a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
@@ -1,10 +1,6 @@
 set(LIBS
   # Local dialects.
   IREEInputDialect
-  IREELinalgExtDialect
-  IREELinalgExtPasses
-  IREELinalgExtTransformOps
-  IREELinalgExtTransforms
   IREELinalgTransformDialect
   IREELinalgTransformDialectPasses
   IREEVectorExtDialect
diff --git a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
index be1dbe1..79f1c90 100644
--- a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
+++ b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
@@ -5,9 +5,6 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 #include "iree-dialects/Dialect/Input/InputDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/IR/LinalgExtDialect.h"
-#include "iree-dialects/Dialect/LinalgExt/Passes/Passes.h"
-#include "iree-dialects/Dialect/LinalgExt/TransformOps/LinalgExtTransformOps.h"
 #include "iree-dialects/Dialect/LinalgTransform/Passes.h"
 #include "iree-dialects/Dialect/LinalgTransform/StructuredTransformOpsExt.h"
 #include "iree-dialects/Dialect/VectorExt/IR/VectorExtDialect.h"
@@ -59,7 +56,6 @@
       // clang-format off
       // Local dialects
       mlir::iree_compiler::IREE::Input::IREEInputDialect,
-      mlir::iree_compiler::IREE::LinalgExt::IREELinalgExtDialect,
       mlir::iree_compiler::IREE::VectorExt::IREEVectorExtDialect,
       // Upstream dialects
       mlir::async::AsyncDialect,
@@ -83,7 +79,6 @@
   registerTransformsPasses();
   registerSCFPasses();
   // Local dialect passes.
-  mlir::iree_compiler::IREE::LinalgExt::registerPasses();
   mlir::linalg::transform::registerTransformDialectInterpreterPass();
   mlir::linalg::transform::registerDropSchedulePass();
   // Local test passes.
@@ -93,8 +88,7 @@
   mlir::func::registerInlinerExtension(registry);
   mlir::linalg::registerTilingInterfaceExternalModels(registry);
 
-  registry.addExtensions<IREE::LinalgExt::LinalgExtTransformOpsExtension,
-                         transform_ext::StructuredTransformOpsExtension>();
+  registry.addExtensions<transform_ext::StructuredTransformOpsExtension>();
   mlir::bufferization::registerTransformDialectExtension(registry);
   mlir::linalg::registerTransformDialectExtension(registry);
   mlir::scf::registerTransformDialectExtension(registry);
diff --git a/tests/transform_dialect/cpu/attention_codegen_spec.mlir b/tests/transform_dialect/cpu/attention_codegen_spec.mlir
index ab64721..1bfb3d3 100644
--- a/tests/transform_dialect/cpu/attention_codegen_spec.mlir
+++ b/tests/transform_dialect/cpu/attention_codegen_spec.mlir
@@ -20,10 +20,10 @@
     // Tile and decompose attention
     // ==========================================
     %attention4 = transform.structured.match ops{["iree_linalg_ext.attention"]} in %variant_op : (!transform.any_op) -> !transform.any_op
-    %acc_fill, %max_fill, %sum_fill, %inner_loop, %final_scaling, %blocked_attention = transform.tile_attention %attention4 :
+    %acc_fill, %max_fill, %sum_fill, %inner_loop, %final_scaling, %blocked_attention = transform.iree.tile_attention %attention4 :
       (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
     %fill_op, %first_matmul, %reduce_max, %partial_softmax, %scale_factor, %update, %reduce_sum, %scale_acc, %second_matmul
-        = transform.decompose_tiled_attention %blocked_attention :
+        = transform.iree.decompose_tiled_attention %blocked_attention :
       (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
 
     // Vectorize function