Fix low-frequency typos in compiler (non-Codegen). NFC. (4/6) (#23604)

Preparation for adding a typos pre-commit spell checker (6/6).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
diff --git a/compiler/bindings/python/IREECompilerDialectsModule.cpp b/compiler/bindings/python/IREECompilerDialectsModule.cpp
index 5d31248..82bb85e 100644
--- a/compiler/bindings/python/IREECompilerDialectsModule.cpp
+++ b/compiler/bindings/python/IREECompilerDialectsModule.cpp
@@ -535,7 +535,7 @@
             for (py::handle item : mmaIntrinsicObjs) {
               if (!py::isinstance(item, mmaIntrinsicClass) &&
                   !py::isinstance(item, virtualMmaIntrinsicClass)) {
-                throw py::type_error("All items must be MMA atributes");
+                throw py::type_error("All items must be MMA attributes");
               }
               mmaIntrinsicVals.push_back(
                   py::cast<mma_intrinsic_enum_t>(item.attr("value")));
diff --git a/compiler/bindings/python/iree/build/compile_actions.py b/compiler/bindings/python/iree/build/compile_actions.py
index 2c2056c..c73fc31 100644
--- a/compiler/bindings/python/iree/build/compile_actions.py
+++ b/compiler/bindings/python/iree/build/compile_actions.py
@@ -101,7 +101,7 @@
         raw_flags: list[str] = []
 
         # Set any defaults derived from the input_file metadata. These are set
-        # first because they can be overriden by explicit flag settings.
+        # first because they can be overridden by explicit flag settings.
         meta = CompileSourceMeta.get(self.input_file)
         raw_flags.append(f"--iree-input-type={meta.input_type}")
 
diff --git a/compiler/bindings/python/iree/build/executor.py b/compiler/bindings/python/iree/build/executor.py
index af41fdf..616f37a 100644
--- a/compiler/bindings/python/iree/build/executor.py
+++ b/compiler/bindings/python/iree/build/executor.py
@@ -449,7 +449,7 @@
     ) -> BuildFile:
         """Allocates a file in the build tree with local path |path|.
 
-        If |path| is absoluate (starts with '/'), then it is used as-is. Otherwise,
+        If |path| is absolute (starts with '/'), then it is used as-is. Otherwise,
         it is joined with the path of this context.
         """
         if not path.startswith("/"):
diff --git a/compiler/bindings/python/iree/compiler/tools/binaries.py b/compiler/bindings/python/iree/compiler/tools/binaries.py
index e5dde22..ddc075e 100644
--- a/compiler/bindings/python/iree/compiler/tools/binaries.py
+++ b/compiler/bindings/python/iree/compiler/tools/binaries.py
@@ -58,7 +58,7 @@
 }
 
 # Environment variable holding directories to be searched for named tools.
-# Delimitted by os.pathsep.
+# Delimited by os.pathsep.
 _TOOL_PATH_ENVVAR = "IREE_TOOL_PATH"
 
 # We do complicated logging so retain our own Logger instance.
diff --git a/compiler/bindings/python/iree/compiler/tools/import_onnx/importer_externalization_overrides.py b/compiler/bindings/python/iree/compiler/tools/import_onnx/importer_externalization_overrides.py
index cda3f6a..bcd6930 100644
--- a/compiler/bindings/python/iree/compiler/tools/import_onnx/importer_externalization_overrides.py
+++ b/compiler/bindings/python/iree/compiler/tools/import_onnx/importer_externalization_overrides.py
@@ -135,7 +135,7 @@
                 dims, data_type = self.get_type_info_from_type(t.type)
             else:
                 raise TypeError(
-                    f"Expected an onnx.TensorProto or an onnx.ValueInfoProto, recieved {type(t)} from {name}"
+                    f"Expected an onnx.TensorProto or an onnx.ValueInfoProto, received {type(t)} from {name}"
                 )
 
             vtensor_type = RankedTensorType.get(
@@ -265,7 +265,7 @@
             dims, data_type = self.get_type_info_from_type(initializer.type)
         else:
             raise TypeError(
-                f"Expected an onnx.TensorProto or an onnx.ValueInfoProto, recieved {type(initializer)} from {initializer_name}"
+                f"Expected an onnx.TensorProto or an onnx.ValueInfoProto, received {type(initializer)} from {initializer_name}"
             )
 
         actual_symbol_name, tensor_type = self.create_tensor_global(initializer)
diff --git a/compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp
index ce941fa..387e788 100644
--- a/compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/StableHLOToStableHLO.cpp
@@ -269,7 +269,7 @@
 /// {batch_dims, parallel_dims, contraction_dims}.
 ///   {batch_dims, contraction_dims, parallel_dims}
 /// After that, batch_dims, contraction_dims, parallel_dims are
-/// in consecutive order and not spliting the domain. This pattern inserts
+/// in consecutive order and not splitting the domain. This pattern inserts
 /// reshapes to collapse consecutive reduction and parallel dims to always
 /// generate a rank-3 dot_general op.
 struct TransposeReshapeGenericDotGeneral final
diff --git a/compiler/src/iree/compiler/API/Internal/CompilerDriver.cpp b/compiler/src/iree/compiler/API/Internal/CompilerDriver.cpp
index 43da63f..6101e86 100644
--- a/compiler/src/iree/compiler/API/Internal/CompilerDriver.cpp
+++ b/compiler/src/iree/compiler/API/Internal/CompilerDriver.cpp
@@ -1356,8 +1356,8 @@
   if (installSignalHandlers) {
     // A few other things from InitLLVM to setup default command-line signal
     // handlers. See InitLLVM::InitLLVM for the initialization sequence and
-    // commentary, should it ever be necessary to revist this (it hasn't changed
-    // in many years).
+    // commentary, should it ever be necessary to revisit this (it hasn't
+    // changed in many years).
     llvm::sys::SetOneShotPipeSignalFunction(
         llvm::sys::DefaultOneShotPipeSignalHandler);
     static llvm::PrettyStackTraceProgram stackPrinter(argc, argv);
diff --git a/compiler/src/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp b/compiler/src/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp
index e67988d..4ca0e57 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp
@@ -968,7 +968,7 @@
 
 OpFoldResult TensorSliceOp::fold(FoldAdaptor operands) {
   if (llvm::count(operands.getOperands(), nullptr) == 0) {
-    // Ignore DenseResources for now and do not perfom folding on them.
+    // Ignore DenseResources for now and do not perform folding on them.
     if (isa<DenseResourceElementsAttr>(operands.getSource())) {
       return {};
     }
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/ConvertRegionToWorkgroups.cpp b/compiler/src/iree/compiler/Dialect/Flow/Transforms/ConvertRegionToWorkgroups.cpp
index f1214d0..ba8cb83 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/ConvertRegionToWorkgroups.cpp
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/ConvertRegionToWorkgroups.cpp
@@ -210,7 +210,7 @@
 
   // Move regionOp body into the workgroupsOp.
   rewriter.inlineRegionBefore(region, newBody, newBody.end());
-  // Merge the enrty block of `newBody` with the original entry block from the
+  // Merge the entry block of `newBody` with the original entry block from the
   // region.
   Block *origEntry = &(*(std::next(newBody.begin())));
   rewriter.mergeBlocks(origEntry, newBodyEntry);
diff --git a/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.h b/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.h
index c849123..1614cc0 100644
--- a/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.h
+++ b/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.h
@@ -40,7 +40,7 @@
 FailureOr<IREE::Flow::WorkloadBuilder> getWorkloadBuilder(OpBuilder &builder,
                                                           Operation *rootOp);
 
-/// Simplfy the given tensor::DimOps as much as possible.
+/// Simplify the given tensor::DimOps as much as possible.
 /// * Static dimensions are replaced by constant.
 /// * Dynamic dim ops are pushed as much as possible to the top of the function,
 ///   i.e., if the dim of a value is known to be equal to the dim of a value on
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/Utils.cpp b/compiler/src/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/Utils.cpp
index a4a6293..f4835bf 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/Utils.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/Utils.cpp
@@ -35,7 +35,7 @@
 }
 
 static std::tuple<SmallVector<Value>, SmallVector<Value>>
-lookupDevicesAndQueueAffintiesFor(Operation *op, OpBuilder &builder) {
+lookupDevicesAndQueueAffinitiesFor(Operation *op, OpBuilder &builder) {
   auto affinityAttr = IREE::Stream::AffinityAttr::lookupOrDefault(op);
   SmallVector<Value> devices;
   SmallVector<Value> queueAffinities;
@@ -67,7 +67,7 @@
                                                          Value bufferUsage,
                                                          OpBuilder &builder) {
   auto [devices, queueAffinities] =
-      lookupDevicesAndQueueAffintiesFor(op, builder);
+      lookupDevicesAndQueueAffinitiesFor(op, builder);
   // Returns the device and queue affinity for the first device, if only one
   // exists.
   if (devices.size() == 1) {
diff --git a/compiler/src/iree/compiler/Dialect/HAL/IR/HALOps.cpp b/compiler/src/iree/compiler/Dialect/HAL/IR/HALOps.cpp
index 5a20ae1..70bbbd0 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/IR/HALOps.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/IR/HALOps.cpp
@@ -26,7 +26,7 @@
 
 namespace {
 
-// We aribtrarily say that unbounded dimensions in a torch program cannot
+// We arbitrarily say that unbounded dimensions in a torch program cannot
 // exceed 53bits, making the maximum safe dimension 9007199254740991. The
 // astute reader will note that this is also the maximum safe value in
 // JavaScript, which also "happens" to be the largest mantissa value in a
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Target/TargetOptions.cpp b/compiler/src/iree/compiler/Dialect/HAL/Target/TargetOptions.cpp
index 9d5b1d0..e72f2fb 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Target/TargetOptions.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/Target/TargetOptions.cpp
@@ -18,7 +18,7 @@
       "IREE HAL executable target options");
 
   // This function is called as part of registering the pass
-  // TranslateAllExecutablesPass. Pass registry is also staticly
+  // TranslateAllExecutablesPass. Pass registry is also statically
   // initialized, so targetBackendsFlags needs to be here to be initialized
   // first.
   binder.list<std::string>(
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Transforms/AnnotateTargetDevices.cpp b/compiler/src/iree/compiler/Dialect/HAL/Transforms/AnnotateTargetDevices.cpp
index bbc81d6..1d0d9b6 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Transforms/AnnotateTargetDevices.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/Transforms/AnnotateTargetDevices.cpp
@@ -24,7 +24,7 @@
 // --iree-hal-annotate-target-devices
 //===----------------------------------------------------------------------===//
 
-// Sorts |attrs| in lexigraphical order.
+// Sorts |attrs| in lexicographical order.
 // We have to do this as the PVS elements we source from are unsorted.
 static void sortAttributes(SmallVectorImpl<Attribute> &attrs) {
   if (attrs.size() <= 1) {
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.td b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.td
index 77e452d..c268fdd 100644
--- a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.td
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/Passes.td
@@ -41,7 +41,7 @@
   let summary = "Topk split reduction pass.";
   let description = [{
     Produces a "map-reduce" style of parallelizing a Topk Op. The op is split
-    into two, on containing reducitons in parallel and the other contianing the
+    into two, on containing reducitons in parallel and the other containing the
     combination of the parallel reductions into a final result.
   }];
   let options = [
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
index 651467b..ab6684f 100644
--- a/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
@@ -440,7 +440,7 @@
 // CHECK-SAME:          iterator_types = ["parallel", "parallel"]
 // CHECK-SAME:          outs(%[[L_REAL_SLICE]], %[[L_IMAG_SLICE]], %[[R_REAL_SLICE]], %[[R_IMAG_SLICE]]
 //
-//                    The computation is bascially the same, and they are
+//                    The computation is basically the same, and they are
 //                    checked above. Here only checks the different part.
 // CHECK:             %{{.+}} = linalg.index 1 : index
 
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/IndexingUtils.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/IndexingUtils.h
index 3b51a4b..07a769c 100644
--- a/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/IndexingUtils.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/IndexingUtils.h
@@ -24,7 +24,7 @@
 /// S = reduce QKT dim=2 keep_dims=True
 /// att = S @ V
 ///
-/// By this defination, K1 and K2 can be seen as reduction dimensions and
+/// By this definition, K1 and K2 can be seen as reduction dimensions and
 /// B, M, N can be seen as parallel dimensions.
 ///
 /// Generally, K1 and N are really small (64/128), K2 and M are really large
diff --git a/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h
index 32fd0e1..6773db2 100644
--- a/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h
+++ b/compiler/src/iree/compiler/Dialect/LinalgExt/Utils/Utils.h
@@ -133,7 +133,7 @@
   }
 }
 
-/// Return dim expresssions that can be used as replacements in map that
+/// Return dim expressions that can be used as replacements in map that
 /// contains `numSymbols` symbols. The new dim expressions have positions
 /// `numDims, numDims + 1, numDims + 2, ...., numDims + numSymbols - 1`.
 SmallVector<AffineExpr> getDimExprsForSymbols(MLIRContext *context,
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Analysis/Partitioning.h b/compiler/src/iree/compiler/Dialect/Stream/Analysis/Partitioning.h
index 923a5a4..30f8468 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Analysis/Partitioning.h
+++ b/compiler/src/iree/compiler/Dialect/Stream/Analysis/Partitioning.h
@@ -85,7 +85,7 @@
 // separating non-interfering subgraphs, etc.
 //
 // This is a well-researched area and there are many algorithms to choose from.
-// We'll mostly want to focus on ones that are able to handle multiple critera
+// We'll mostly want to focus on ones that are able to handle multiple criteria
 // (like memory consumption, compute utilization, available capacity, etc).
 //
 // See for example:
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/Passes.td b/compiler/src/iree/compiler/Dialect/Stream/Transforms/Passes.td
index 9c15ada..a93b8d3 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/Passes.td
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/Passes.td
@@ -27,7 +27,7 @@
     used on the program ABI boundary for interoperating with external buffers
     and fences. These ops, such as `hal.tensor.import` and `hal.tensor.barrier`,
     will be converted to their `stream` dialect form and preserve the implicit
-    synchronization guaranteeds required for proper analysis.
+    synchronization guarantees required for proper analysis.
 
     Dispatched executables are allowed to be in one of the supported input
     dialects (like `flow.executable`), already be lowered into
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp b/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp
index 50391ac..977c03a 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp
@@ -319,7 +319,7 @@
   });
 
   // Inline that constant table into the dispatch function and look up the
-  // contants to use based on a parameterized input. All unneeded operands
+  // constants to use based on a parameterized input. All unneeded operands
   // are removed.
   insertConstantTableLookup(funcOp, constantTable);
 
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeEncodings.cpp b/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeEncodings.cpp
index c3bc4de..67a4fb5 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeEncodings.cpp
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/SpecializeEncodings.cpp
@@ -143,7 +143,7 @@
 }
 
 /// Returns all the stream tensor ops that implement AffinityOpInterface, where
-/// a stream affinity indicates the kind of enviroment the ops are expected run
+/// a stream affinity indicates the kind of environment the ops are expected run
 /// in.
 static SmallVector<IREE::Stream::AffinityOpInterface>
 collectStreamTensorOps(ModuleOp moduleOp, SymbolTable &symbolTable,
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/fuse_dispatch_bindings.mlir b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/fuse_dispatch_bindings.mlir
index 81bf5cf..99cc0c7 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/fuse_dispatch_bindings.mlir
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/fuse_dispatch_bindings.mlir
@@ -82,7 +82,7 @@
 // Tests that bindings that are duplicated at all dispatch sites are folded.
 // This will happen even if the offsets differ as we are rebasing them to 0 and
 // moving the offsetting into the dispatched function. To ensure that we are
-// offseting things correctly we have pre-offset subspans in the dispatch region
+// offsetting things correctly we have pre-offset subspans in the dispatch region
 // that must have the host binding offsets added to them.
 //
 // NOTE: the offset operands are inserted at the start of the operand list and
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir
index 1495953..5fb293f 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir
@@ -119,7 +119,7 @@
 // Tests invalid transfer conflict resolution.
 // Constants cannot be mutated even though it is tied. This survives after
 // copy-on-write materialization because of the transfer and we need to preserve
-// it such that the copy is performed as epxected.
+// it such that the copy is performed as expected.
 
 // CHECK-LABEL: @transferResolution
 // CHECK-SAME: (%[[ARG0:.+]]: !stream.resource<constant>, %[[SIZE:.+]]: index)
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/specialize_encodings.mlir b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/specialize_encodings.mlir
index 548c7ff..f993c71 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/specialize_encodings.mlir
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/specialize_encodings.mlir
@@ -735,7 +735,7 @@
 
 // -----
 
-// This test is simliar to the set_encoding test, but with unset_encoding ops.
+// This test is similar to the set_encoding test, but with unset_encoding ops.
 
 #executable_target_a = #hal.executable.target<"target_a", "abc", {iree.encoding.resolver = #iree_encoding.specialization_resolver<123>}>
 #executable_target_b = #hal.executable.target<"target_b", "xyz", {iree.encoding.resolver = #iree_encoding.specialization_resolver<456>}>
diff --git a/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOpFolders.cpp b/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOpFolders.cpp
index 517046c..f6f4484 100644
--- a/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOpFolders.cpp
+++ b/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOpFolders.cpp
@@ -339,7 +339,7 @@
 
 // Inlining producers of an input to the dispatch region results in the
 // `flow.dispatch.input.load` having a `tensor` type as input. This fails
-// verification. Fold such uses of the offsets, size and strides are emtpy.
+// verification. Fold such uses of the offsets, size and strides are empty.
 // i.e, flow.dispatch.input.load %v -> %v
 OpFoldResult DispatchTensorLoadOp::fold(FoldAdaptor operands) {
   if (getSource().getType() && isa<RankedTensorType>(getSource().getType()) &&
diff --git a/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOps.td b/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOps.td
index dbe318a..ffc2e02 100644
--- a/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOps.td
+++ b/compiler/src/iree/compiler/Dialect/TensorExt/IR/TensorExtOps.td
@@ -579,7 +579,7 @@
     - `column_lengths` is [0, 4, 10, 13, 18]
     - result has an encoding attribute of `#iree_tensor_ext.ragged_shape<n>`.
 
-    Contraints are
+    Constraints are
     1. `ragged_dim` < rank(`source`)
     2. rank(`columnLengths`) == 1.
     3. dim(`columnLengths`, 0) == `num_rows` + 1.
diff --git a/compiler/src/iree/compiler/Dialect/TensorExt/IR/test/invalid.mlir b/compiler/src/iree/compiler/Dialect/TensorExt/IR/test/invalid.mlir
index ba668a7..34c9c60 100644
--- a/compiler/src/iree/compiler/Dialect/TensorExt/IR/test/invalid.mlir
+++ b/compiler/src/iree/compiler/Dialect/TensorExt/IR/test/invalid.mlir
@@ -176,7 +176,7 @@
 // -----
 
 // Error when `column_lengths` is static shaped when `num_ragged_rows` is dynamic.
-util.func public @staticColumnLenghtsWithDynamicNumRaggedRows(%source : tensor<?x?x?xf32>,
+util.func public @staticColumnLengthsWithDynamicNumRaggedRows(%source : tensor<?x?x?xf32>,
     %columnLengths : tensor<4xindex>, %numRaggedRows : index,
     %d0 : index, %d1 : index, %d2 : index) -> tensor<?x?x?x?xf32, #iree_tensor_ext.ragged_shape<1>> {
   // expected-error @+1 {{invalid to have static dimensions for `column_lengths` when `num_ragged_rows` is dynamic}}
diff --git a/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/Solver.h b/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/Solver.h
index 8bec39c..d4e415e 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/Solver.h
+++ b/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/Solver.h
@@ -296,7 +296,7 @@
     SEEDING,
     // Fixed point iteration is running.
     UPDATE,
-    // Iteration has completed; does not indicate whether it coverged.
+    // Iteration has completed; does not indicate whether it converged.
     DONE,
   } phase = Phase::SEEDING;
 
diff --git a/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/State.h b/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/State.h
index 5782b9a..6f0fa18 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/State.h
+++ b/compiler/src/iree/compiler/Dialect/Util/Analysis/DFX/State.h
@@ -181,7 +181,7 @@
   // Returns true if the state is known to hold.
   bool isKnown() const { return getKnown(); }
 
-  // Sets the known and asssumed value to |value|.
+  // Sets the known and assumed value to |value|.
   void setKnown(bool value) {
     known |= value;
     assumed |= value;
@@ -414,13 +414,14 @@
   // Returns this set. We should check whether this set is valid or not by
   // isValidState() before calling this function.
   const SetTy &getAssumedSet() const {
-    assert(isValidState() && "This set shoud not be used when it is invalid!");
+    assert(isValidState() && "This set should not be used when it is invalid!");
     return set;
   }
 
   // Returns whether this state contains an undef value or not.
   bool isUndefContained() const {
-    assert(isValidState() && "This flag shoud not be used when it is invalid!");
+    assert(isValidState() &&
+           "This flag should not be used when it is invalid!");
     return undefIsContained;
   }
 
diff --git a/compiler/src/iree/compiler/Dialect/Util/IR/UtilAttrs.td b/compiler/src/iree/compiler/Dialect/Util/IR/UtilAttrs.td
index ce611f5..8de4070 100644
--- a/compiler/src/iree/compiler/Dialect/Util/IR/UtilAttrs.td
+++ b/compiler/src/iree/compiler/Dialect/Util/IR/UtilAttrs.td
@@ -223,8 +223,8 @@
   let summary = "[{Preprocessing pass-pipeline to run on the function.}]";
   let description = [{
     Textual description of the preprocessing pass-pipeline to run on the
-    function-like object that the attribute is specified on. Note that the
-    string pipeline is implicitly nested to `builtin.module(func-lik(..))`
+    function-likee object that the attribute is specified on. Note that the
+    string pipeline is implicitly nested to `builtin.module(func-like(..))`
     operation. For example to run the transpose convolution pipeline, the
     attribute is specified as
 
diff --git a/compiler/src/iree/compiler/Dialect/Util/IR/UtilOps.td b/compiler/src/iree/compiler/Dialect/Util/IR/UtilOps.td
index d7206fc..9ffeb93 100644
--- a/compiler/src/iree/compiler/Dialect/Util/IR/UtilOps.td
+++ b/compiler/src/iree/compiler/Dialect/Util/IR/UtilOps.td
@@ -465,7 +465,7 @@
     Typically multiple permutations record a specific subset of assumptions
     broken down per call-site in some way that is meaningful to the receiver.
     Implementations can use this information to specialize on each
-    permutation if it is meaninful to do so (i.e. vs unioning across them).
+    permutation if it is meaningful to do so (i.e. vs unioning across them).
     In such cases, there will typically be one such op at the top of a
     function or scope which passes all covered operands through it.
   }];
diff --git a/compiler/src/iree/compiler/Dialect/Util/Transforms/OptimizeIntArithmetic.cpp b/compiler/src/iree/compiler/Dialect/Util/Transforms/OptimizeIntArithmetic.cpp
index 4910758..e43b56f 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Transforms/OptimizeIntArithmetic.cpp
+++ b/compiler/src/iree/compiler/Dialect/Util/Transforms/OptimizeIntArithmetic.cpp
@@ -42,7 +42,7 @@
 // platforms, demoting to an index is only conservatively correct if all
 // operands and all results are within the unsigned 32bit bounds.
 // While there is a good chance that such arithmetic that exceeds these
-// bounds is simply wrong/overflow-ridden, we opt to do no harm and preseve
+// bounds is simply wrong/overflow-ridden, we opt to do no harm and preserve
 // the exact results. This optimization is targeted at "small" sequences
 // anyway and this catches everything known to exist. If needed, this rule
 // could be dropped if it is ever appropriate to unconditionally assume
@@ -466,7 +466,7 @@
     expandAffineOps(op);
 
     DataFlowSolver solver;
-    // Needed to make the dead code analyis not be too conservative.
+    // Needed to make the dead code analysis not be too conservative.
     solver.load<SparseConstantPropagation>();
     solver.load<DeadCodeAnalysis>();
     solver.load<IntegerRangeAnalysis>();
diff --git a/compiler/src/iree/compiler/Dialect/Util/Transforms/Passes.h b/compiler/src/iree/compiler/Dialect/Util/Transforms/Passes.h
index 188c545..cfe4d9a 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Transforms/Passes.h
+++ b/compiler/src/iree/compiler/Dialect/Util/Transforms/Passes.h
@@ -36,7 +36,7 @@
   using RegisterDialectsFn = std::function<void(DialectRegistry &)>;
 
   // Hook to register extra dependent dialects needed for types implementing
-  // the `HoistableTypeInterace`.
+  // the `HoistableTypeInterface`.
   std::optional<RegisterDialectsFn> registerDependentDialectsFn = std::nullopt;
 
   // Threshold for controlling the maximum allowed increase in the stored size
diff --git a/compiler/src/iree/compiler/Dialect/Util/Transforms/test/hoist_into_globals.mlir b/compiler/src/iree/compiler/Dialect/Util/Transforms/test/hoist_into_globals.mlir
index 188face..e2502b1 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Transforms/test/hoist_into_globals.mlir
+++ b/compiler/src/iree/compiler/Dialect/Util/Transforms/test/hoist_into_globals.mlir
@@ -466,7 +466,7 @@
 
 // -----
 
-// Check that hoisting happens in a determinsitic order. If this is ordered
+// Check that hoisting happens in a deterministic order. If this is ordered
 // incorrectly it will result in >1 util.initializer.
 
 // CHECK-LABEL: @hoist_multiple_globals_ordered
diff --git a/compiler/src/iree/compiler/Dialect/Util/Transforms/test/optimize_int_arithmetic.mlir b/compiler/src/iree/compiler/Dialect/Util/Transforms/test/optimize_int_arithmetic.mlir
index 8e580ee..fa4ecac 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Transforms/test/optimize_int_arithmetic.mlir
+++ b/compiler/src/iree/compiler/Dialect/Util/Transforms/test/optimize_int_arithmetic.mlir
@@ -417,7 +417,7 @@
   %1 = arith.index_castui %arg0 : index to i64
   %2 = arith.trunci %1 : i64 to i32
   // CHECK: %[[RESULT:.*]] = arith.index_castui %arg0 : index to i32
-  // CHECH: util.return %[[RESULT]]
+  // CHECK: util.return %[[RESULT]]
   util.return %2 : i32
 }
 
@@ -427,7 +427,7 @@
   %1 = arith.index_cast %arg0 : index to i64
   %2 = arith.trunci %1 : i64 to i32
   // CHECK: %[[RESULT:.*]] = arith.index_castui %arg0 : index to i32
-  // CHECH: util.return %[[RESULT]]
+  // CHECK: util.return %[[RESULT]]
   util.return %2 : i32
 }
 
diff --git a/compiler/src/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp b/compiler/src/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp
index 0d06bdc..740e317 100644
--- a/compiler/src/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp
+++ b/compiler/src/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp
@@ -92,7 +92,7 @@
       builder.getArrayAttr({builder.getStringAttr("static")}));
   newFuncOp.setPrivate();
 
-  // This call shold be equivalent to rewriter.inlineRegionBefore()
+  // This call should be equivalent to rewriter.inlineRegionBefore()
   newFuncOp.getFunctionBody().getBlocks().splice(
       newFuncOp.end(), funcOp.getFunctionBody().getBlocks());
 
@@ -1508,7 +1508,7 @@
     // printed as the arguments to the function call.
     SmallVector<Attribute> args_;
 
-    // If the operation has attributes, we need to explicitely build the args
+    // If the operation has attributes, we need to explicitly build the args
     // attribute of the emitc opaque_call op. This consists of index attributes
     // for the operands, followed by the source op attributes themselves.
     if (op->getAttrs().size() > 0) {
diff --git a/compiler/src/iree/compiler/Dialect/VM/IR/VMBase.td b/compiler/src/iree/compiler/Dialect/VM/IR/VMBase.td
index 9134403..b3f4ed8 100644
--- a/compiler/src/iree/compiler/Dialect/VM/IR/VMBase.td
+++ b/compiler/src/iree/compiler/Dialect/VM/IR/VMBase.td
@@ -412,7 +412,7 @@
 def VM_Ordinal : SignlessIntegerAttrBase<I32, "ordinal value">;
 
 // NOTE: today we only support a single bit width for pointers/indices/sizes.
-// This is to keep our compatability matrix smaller but is not a fundamental
+// This is to keep our compatibility matrix smaller but is not a fundamental
 // limitation of the VM.
 // TODO(#5732): allow for this to change and be specified as an attribute of the
 // compiled module (a module compiled with 32-bit indices may not be usable on
diff --git a/compiler/src/iree/compiler/Dialect/VM/IR/VMDialect.cpp b/compiler/src/iree/compiler/Dialect/VM/IR/VMDialect.cpp
index 378e77c..f0c34d7 100644
--- a/compiler/src/iree/compiler/Dialect/VM/IR/VMDialect.cpp
+++ b/compiler/src/iree/compiler/Dialect/VM/IR/VMDialect.cpp
@@ -291,7 +291,7 @@
   } else if (isa<IREE::VM::RefType>(type)) {
     // The only constant type we support for refs is null so we can just
     // emit that here.
-    // TODO(benvanik): relace unit attr with a proper null ref attr.
+    // TODO(benvanik): replace unit attr with a proper null ref attr.
     return VM::ConstRefZeroOp::create(builder, loc, type);
   }
   // TODO(benvanik): handle other constant value types.
diff --git a/compiler/src/iree/compiler/Dialect/VM/Target/Bytecode/ArchiveWriter.cpp b/compiler/src/iree/compiler/Dialect/VM/Target/Bytecode/ArchiveWriter.cpp
index 8784f52..2d30582 100644
--- a/compiler/src/iree/compiler/Dialect/VM/Target/Bytecode/ArchiveWriter.cpp
+++ b/compiler/src/iree/compiler/Dialect/VM/Target/Bytecode/ArchiveWriter.cpp
@@ -257,7 +257,7 @@
   uint32_t crc32;
 };
 
-// Computes the minimum length of the ZIP header we write preceeding the file.
+// Computes the minimum length of the ZIP header we write preceding the file.
 // This can have any alignment. The result value is only a minimum as up to 64KB
 // of padding can be added following it.
 static uint64_t computeMinHeaderLength(StringRef fileName) {
diff --git a/compiler/src/iree/compiler/Dialect/VM/Transforms/GlobalInitialization.cpp b/compiler/src/iree/compiler/Dialect/VM/Transforms/GlobalInitialization.cpp
index eb944a1..ff848b3 100644
--- a/compiler/src/iree/compiler/Dialect/VM/Transforms/GlobalInitialization.cpp
+++ b/compiler/src/iree/compiler/Dialect/VM/Transforms/GlobalInitialization.cpp
@@ -115,7 +115,7 @@
   });
 }
 
-// Finds all global variables and moves their inital values/initializer calls
+// Finds all global variables and moves their initial values/initializer calls
 // into a single function. Relies on the inliner to later make the uber function
 // better.
 //
diff --git a/compiler/src/iree/compiler/Dialect/VM/Transforms/OrdinalAllocation.cpp b/compiler/src/iree/compiler/Dialect/VM/Transforms/OrdinalAllocation.cpp
index d539c82..c37258b 100644
--- a/compiler/src/iree/compiler/Dialect/VM/Transforms/OrdinalAllocation.cpp
+++ b/compiler/src/iree/compiler/Dialect/VM/Transforms/OrdinalAllocation.cpp
@@ -37,7 +37,7 @@
 // NOTE: symbols are serialized in ordinal-order (hence the name!) and we have
 // an opportunity here to set the layout of the final binaries, similar to how
 // old-timey games would layout files on their spinning plastic discs to
-// optimize the time spent moving a physical laser carridge around. Functions
+// optimize the time spent moving a physical laser carriage around. Functions
 // related to each other and global data accessed in proximity should be
 // clustered together to make use of paging in memory mapped files.
 class OrdinalAllocationPass
diff --git a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/ResolveBufferDescriptors.cpp b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/ResolveBufferDescriptors.cpp
index 4284b1b..ed2d018 100644
--- a/compiler/src/iree/compiler/Dialect/VMVX/Transforms/ResolveBufferDescriptors.cpp
+++ b/compiler/src/iree/compiler/Dialect/VMVX/Transforms/ResolveBufferDescriptors.cpp
@@ -446,7 +446,7 @@
 };
 
 //===---------------------------------------------------------------------===//
-// Pass To resovle descriptors.
+// Pass To resolve descriptors.
 //===---------------------------------------------------------------------===//
 
 class ResolveBufferDescriptorsPass final
diff --git a/compiler/src/iree/compiler/DispatchCreation/Passes.cpp b/compiler/src/iree/compiler/DispatchCreation/Passes.cpp
index 6f6152d..d5c8395 100644
--- a/compiler/src/iree/compiler/DispatchCreation/Passes.cpp
+++ b/compiler/src/iree/compiler/DispatchCreation/Passes.cpp
@@ -234,7 +234,7 @@
             options);
       })
 
-      // Clone all producers into the dispatch region to perpare for being
+      // Clone all producers into the dispatch region to prepare for being
       // isolated from above. This enables running additional transformations
       // afterwards that would need the full dispatch content but don't want to
       // handle explicit captures as materialized as dispatch workgroup operands
diff --git a/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp b/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp
index 16afe0c..fe1f107 100644
--- a/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp
+++ b/compiler/src/iree/compiler/DispatchCreation/TransposeGenericOps.cpp
@@ -48,7 +48,7 @@
         }
       }
     }
-    // If all the parallel loops are outter loops skip the pattern.
+    // If all the parallel loops are outer loops skip the pattern.
     if (!needInterchange) {
       return failure();
     }
diff --git a/compiler/src/iree/compiler/DispatchCreation/test/materialize_default_workgroup_count_region.mlir b/compiler/src/iree/compiler/DispatchCreation/test/materialize_default_workgroup_count_region.mlir
index 1b0c354..f555d13 100644
--- a/compiler/src/iree/compiler/DispatchCreation/test/materialize_default_workgroup_count_region.mlir
+++ b/compiler/src/iree/compiler/DispatchCreation/test/materialize_default_workgroup_count_region.mlir
@@ -107,7 +107,7 @@
 
 // -----
 
-// Check that mutliple scf.forall loops within dispatch is not supported.
+// Check that multiple scf.forall loops within dispatch is not supported.
 util.func @error_multiple_scf_forall(%arg0 : index, %arg1 : index, %arg2 : index) {
   // expected-error @below {{unhandled multiple scf.forall ops in a dispatch}}
   %0:2 = flow.dispatch.workgroups[%arg0, %arg1](%arg0, %arg1, %arg2)
diff --git a/compiler/src/iree/compiler/DispatchCreation/test/pad_fusion_with_producer.mlir b/compiler/src/iree/compiler/DispatchCreation/test/pad_fusion_with_producer.mlir
index f3345dd..f4714f7 100644
--- a/compiler/src/iree/compiler/DispatchCreation/test/pad_fusion_with_producer.mlir
+++ b/compiler/src/iree/compiler/DispatchCreation/test/pad_fusion_with_producer.mlir
@@ -48,4 +48,4 @@
 //  CHECK-SAME:         ins(%[[CONV]], %[[ARG3]]
 //       CHECK:     %[[PADDED:.+]] = tensor.pad %[[GENERIC]]
 //       CHECK:     flow.return %[[PADDED]]
-//       CHEKC:   util.return %[[RETURN]]
+//       CHECK:   util.return %[[RETURN]]
diff --git a/compiler/src/iree/compiler/GlobalOptimization/DecomposeConcat.cpp b/compiler/src/iree/compiler/GlobalOptimization/DecomposeConcat.cpp
index cfef1f7..0d2e969 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/DecomposeConcat.cpp
+++ b/compiler/src/iree/compiler/GlobalOptimization/DecomposeConcat.cpp
@@ -36,7 +36,7 @@
 }
 
 // Transposes the concatenation dimension to happen along the outer most
-// non-unit dim of the inputs. The idea is that outer dim concatentations
+// non-unit dim of the inputs. The idea is that outer dim concatenations
 // can lower to `flow.tensor.update` and ideally disappear, in the worst case
 // becoming a sequence of copies. The hope then is that the transposes on the
 // inputs and output is then fusable with surrounding operations.
diff --git a/compiler/src/iree/compiler/GlobalOptimization/Utils.h b/compiler/src/iree/compiler/GlobalOptimization/Utils.h
index f530576..b6aa69d 100644
--- a/compiler/src/iree/compiler/GlobalOptimization/Utils.h
+++ b/compiler/src/iree/compiler/GlobalOptimization/Utils.h
@@ -26,7 +26,7 @@
 /// The CastOpInterface op should extend the bitwidth of the source.
 /// The bitwidth of the source element type should be greater than 1. If it is
 /// casting from i1 types, a std::nullopt is returned. It is dangerous to mix
-/// boalean concept and i1 subtypes concept at graph optimizatoin level. We
+/// boalean concept and i1 subtypes concept at graph optimization level. We
 /// ignore this type of casting ops intentionally.
 /// TODO(hanchung): Remove the restriction about i1 after we can handle i1
 /// sub-type emulation and deprecate TypePropagation pass.
diff --git a/compiler/src/iree/compiler/Pipelines/Options.h b/compiler/src/iree/compiler/Pipelines/Options.h
index 811bd5b..9271415 100644
--- a/compiler/src/iree/compiler/Pipelines/Options.h
+++ b/compiler/src/iree/compiler/Pipelines/Options.h
@@ -81,7 +81,7 @@
   bool promoteF16ToF32 = false;
   bool promoteBF16ToF32 = false;
 
-  // Perfoms early optimizations geared towards optimizing/simplifying the
+  // Performs early optimizations geared towards optimizing/simplifying the
   // types of integer arithmetic inefficiencies that frontends typically
   // include and which are implicated in blocking downstream optimizations.
   bool optimizeIndexArithmetic = true;
diff --git a/compiler/src/iree/compiler/Preprocessing/Common/ApplyPDLPatterns.cpp b/compiler/src/iree/compiler/Preprocessing/Common/ApplyPDLPatterns.cpp
index f5db486..2f3cf5e 100644
--- a/compiler/src/iree/compiler/Preprocessing/Common/ApplyPDLPatterns.cpp
+++ b/compiler/src/iree/compiler/Preprocessing/Common/ApplyPDLPatterns.cpp
@@ -38,7 +38,7 @@
 
 } // namespace mlir::iree_compiler::Preprocessing
 
-/// Get strides for row-major oredering of a tensor with the given `shape`.
+/// Get strides for row-major ordering of a tensor with the given `shape`.
 static SmallVector<int64_t> getStridesFromShape(ArrayRef<int64_t> shape) {
   if (shape.empty()) {
     return {};
diff --git a/compiler/src/iree/compiler/Preprocessing/Common/ConvertConv2DToImg2Col.cpp b/compiler/src/iree/compiler/Preprocessing/Common/ConvertConv2DToImg2Col.cpp
index 86f4077..e48934e 100644
--- a/compiler/src/iree/compiler/Preprocessing/Common/ConvertConv2DToImg2Col.cpp
+++ b/compiler/src/iree/compiler/Preprocessing/Common/ConvertConv2DToImg2Col.cpp
@@ -49,7 +49,7 @@
 // Convert linalg.conv_2d_nhwc_hwcf into linalg.generic (for img2col packing)
 // and linalg.matmul.
 //
-// A convolution operaton can be written as a matrix-matrix multiplication by
+// A convolution operation can be written as a matrix-matrix multiplication by
 // unfolding the cross correlation between input and filter and explicitly copy
 // overlapped sliding window inputs.
 //
@@ -78,7 +78,7 @@
 // and output (N, Ho, Wo, D) the convolutin is the following matrix-matrix
 // multiplication (Ho x Wo, Kh x Kw x C) * (Kh x Kw x C, D) for each input in
 // the N input. For the case where N > 1 its a batched matrxi-matrix
-// multplication.
+// multiplication.
 class ConvertConv2DNhwcHwcf final
     : public OpRewritePattern<linalg::Conv2DNhwcHwcfOp> {
 public:
diff --git a/compiler/src/iree/compiler/Utils/OptionUtils.h b/compiler/src/iree/compiler/Utils/OptionUtils.h
index db7b3a7..56dce64 100644
--- a/compiler/src/iree/compiler/Utils/OptionUtils.h
+++ b/compiler/src/iree/compiler/Utils/OptionUtils.h
@@ -154,7 +154,7 @@
     }
   }
 
-  // Bind a flag with a single `opt_initialier` that specifies defaults at a
+  // Bind a flag with a single `opt_initializer` that specifies defaults at a
   // given optimization level.
   template <typename T, typename V, typename... Mods>
   void opt(llvm::StringRef name, V &value,