diff --git a/mlir/include/mlir-c/IR.h b/mlir/include/mlir-c/IR.h --- a/mlir/include/mlir-c/IR.h +++ b/mlir/include/mlir-c/IR.h @@ -33,7 +33,7 @@ * instead of typedefs enables some type safety as structs are not implicitly * convertible to each other. * - * Instaces of these types may or may not own the underlying object (most often + * Instances of these types may or may not own the underlying object (most often * only point to an IR fragment without owning it). The ownership semantics is * defined by how an instance of the type was obtained. */ @@ -67,7 +67,7 @@ }; typedef struct MlirNamedAttribute MlirNamedAttribute; -/** A callback for returning string referenes. +/** A callback for returning string references. * * This function is called back by the functions that need to return a reference * to the portion of the string with the following arguments: @@ -226,7 +226,7 @@ /** Return `pos`-th attribute of the operation. */ MlirNamedAttribute mlirOperationGetAttribute(MlirOperation op, intptr_t pos); -/** Returns an attrbute attached to the operation given its name. */ +/** Returns an attribute attached to the operation given its name. */ MlirAttribute mlirOperationGetAttributeByName(MlirOperation op, const char *name); @@ -363,7 +363,7 @@ void mlirAttributePrint(MlirAttribute attr, MlirStringCallback callback, void *userData); -/** Prints the attrbute to the standard error stream. */ +/** Prints the attribute to the standard error stream. */ void mlirAttributeDump(MlirAttribute attr); /** Associates an attribute with the name. Takes ownership of neither. */ diff --git a/mlir/include/mlir-c/StandardAttributes.h b/mlir/include/mlir-c/StandardAttributes.h --- a/mlir/include/mlir-c/StandardAttributes.h +++ b/mlir/include/mlir-c/StandardAttributes.h @@ -149,7 +149,7 @@ intptr_t dataLength, const char *data, MlirType type); -/** Returns the namepsace of the dialect with which the given opaque attribute +/** Returns the namespace of the dialect with which the given opaque attribute * is associated. The namespace string is owned by the context. */ const char *mlirOpaqueAttrGetDialectNamespace(MlirAttribute attr); diff --git a/mlir/include/mlir-c/StandardTypes.h b/mlir/include/mlir-c/StandardTypes.h --- a/mlir/include/mlir-c/StandardTypes.h +++ b/mlir/include/mlir-c/StandardTypes.h @@ -157,7 +157,7 @@ /** Checks whether the given type is a Vector type. */ int mlirTypeIsAVector(MlirType type); -/** Creates a vector type of the shape identified by its rank and dimensios, +/** Creates a vector type of the shape identified by its rank and dimensions, * with the given element type in the same context as the element type. The type * is owned by the context. */ MlirType mlirVectorTypeGet(intptr_t rank, int64_t *shape, MlirType elementType); diff --git a/mlir/include/mlir/Analysis/Presburger/Simplex.h b/mlir/include/mlir/Analysis/Presburger/Simplex.h --- a/mlir/include/mlir/Analysis/Presburger/Simplex.h +++ b/mlir/include/mlir/Analysis/Presburger/Simplex.h @@ -117,7 +117,7 @@ /// /// The Simplex class supports redundancy checking via detectRedundant and /// isMarkedRedundant. A redundant constraint is one which is never violated as -/// long as the other constrants are not violated, i.e., removing a redundant +/// long as the other constraints are not violated, i.e., removing a redundant /// constraint does not change the set of solutions to the constraints. As a /// heuristic, constraints that have been marked redundant can be ignored for /// most operations. Therefore, these constraints are kept in rows 0 to @@ -125,7 +125,7 @@ /// of constraints that have been marked redundant. /// /// This Simplex class also supports taking snapshots of the current state -/// and rolling back to prior snapshots. This works by maintaing an undo log +/// and rolling back to prior snapshots. This works by maintaining an undo log /// of operations. Snapshots are just pointers to a particular location in the /// log, and rolling back to a snapshot is done by reverting each log entry's /// operation from the end until we reach the snapshot's location. diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td --- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td +++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td @@ -630,7 +630,7 @@ Example (3x3 valid convolution): ```mlir - fuction @conv_2d(%D : memref<100x100xf32>, %K : memref<3x3xf32>) -> (memref<98x98xf32>) { + function @conv_2d(%D : memref<100x100xf32>, %K : memref<3x3xf32>) -> (memref<98x98xf32>) { %O = alloc memref<98x98xf32> affine.parallel (%x, %y) = (0, 0) to (98, 98) { %0 = affine.parallel (%kx, %ky) = (0, 0) to (2, 2) reduce ("addf") { diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h b/mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h --- a/mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h +++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h @@ -50,8 +50,8 @@ /// Base class for LLVM dialect types. /// /// The LLVM dialect in MLIR fully reflects the LLVM IR type system, prodiving a -/// sperate MLIR type for each LLVM IR type. All types are represted as separate -/// subclasses and are compatible with the isa/cast infrastructure. For +/// separate MLIR type for each LLVM IR type. All types are represented as +/// separate subclasses and are compatible with the isa/cast infrastructure. For /// convenience, the base class provides most of the APIs available on /// llvm::Type in addition to MLIR-compatible APIs. /// @@ -422,7 +422,7 @@ class LLVMStructType : public Type::TypeBase { public: - /// Inherit base construtors. + /// Inherit base constructors. using Base::Base; /// Checks if the given type can be contained in a structure type. diff --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h --- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h +++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h @@ -114,7 +114,7 @@ useFullTileBuffersDefault = use; return *this; } - /// Allow the use of dynamicaly-sized buffers. + /// Allow the use of dynamically-sized buffers. bool dynamicBuffers = false; LinalgPromotionOptions &setDynamicBuffers(unsigned dynamic) { dynamicBuffers = dynamic; @@ -187,8 +187,8 @@ LogicalResult linalgOpToAffineLoops(OpBuilder &builder, Operation *op); //===----------------------------------------------------------------------===// -// Preconditions that ensure the corresponding transformation suceeds and can be -// applied as a rewrite pattern. +// Preconditions that ensure the corresponding transformation succeeds and can +// be applied as a rewrite pattern. //===----------------------------------------------------------------------===// /// Emits a `generic` or `indexed_generic` operation with the `indexing_maps` /// and `iterator_types` permutated according to `permutation`. diff --git a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h --- a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h +++ b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h @@ -149,7 +149,7 @@ /// scf.parallel(%iv)= (%lb + %procId * %step) to (%ub) step (%step * %nprocs) Cyclic = 0, - /// Cyclic distribtuion where the number of processors can be assumed to be + /// Cyclic distribution where the number of processors can be assumed to be /// more than or equal to the number of iterations of the distributed loop. In /// such cases, a simple in-bounds check is enough (instead of materializing a /// loop). Distributes the following loop @@ -165,7 +165,7 @@ /// } CyclicNumProcsGeNumIters = 1, - /// Cyclic distribtuion where the number of processors can be assumed to be + /// Cyclic distribution where the number of processors can be assumed to be /// equal to the number of iterations of the distributed loop. In such cases, /// no bounds check is needed. Distributes the following loop /// diff --git a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td --- a/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td +++ b/mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td @@ -81,7 +81,7 @@ let summary = "parallel construct"; let description = [{ The "acc.parallel" operation represents a parallel construct block. It has - one region to be executued in parallel on the current device. + one region to be executed in parallel on the current device. Example: diff --git a/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td b/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td --- a/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td +++ b/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td @@ -231,7 +231,7 @@ omitted. When used within a rewriting context, i.e. when defined within a - `pdl.rewrite`, all of the result types must be "inferrable". This means that + `pdl.rewrite`, all of the result types must be "inferable". This means that the type must be attributable to either a constant type value or the result type of another entity, such as an attribute, the result of a `createNative`, or the result type of another operation. If the result type diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h b/mlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h @@ -43,7 +43,7 @@ using Base::Base; /// Gets a InterfaceVarABIAttr. - static InterfaceVarABIAttr get(uint32_t descirptorSet, uint32_t binding, + static InterfaceVarABIAttr get(uint32_t descriptorSet, uint32_t binding, Optional storageClass, MLIRContext *context); static InterfaceVarABIAttr get(IntegerAttr descriptorSet, IntegerAttr binding, diff --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td --- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td +++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td @@ -440,7 +440,7 @@ value and shape equal to `shape`. If the ValueShape and given `shape` are non-conformant, then the returned ValueShape will represent an error of this mismatch. Similarly if either inputs are in an error state, then an - error is popagated. + error is propagated. Usage: %0 = shape.with_shape %1, %2 : tensor<...>, !shape.shape diff --git a/mlir/include/mlir/Dialect/Vector/VectorOps.td b/mlir/include/mlir/Dialect/Vector/VectorOps.td --- a/mlir/include/mlir/Dialect/Vector/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/VectorOps.td @@ -946,7 +946,7 @@ The permutation_map [attribute](../LangRef.md#attributes) is an [affine-map](Affine.md#affine-maps) which specifies the transposition on the slice to match the vector shape. The permutation map may be implicit and - ommitted from parsing and printing if it is the canonical minor identity map + omitted from parsing and printing if it is the canonical minor identity map (i.e. if it does not permute or broadcast any dimension). The size of the slice is specified by the size of the vector, given as the @@ -1110,7 +1110,7 @@ The permutation_map [attribute](../LangRef.md#attributes) is an [affine-map](Affine.md#affine-maps) which specifies the transposition on the slice to match the vector shape. The permutation map may be implicit and - ommitted from parsing and printing if it is the canonical minor identity map + omitted from parsing and printing if it is the canonical minor identity map (i.e. if it does not permute or broadcast any dimension). The size of the slice is specified by the size of the vector. diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -1124,7 +1124,7 @@ /// Ensure that the given region has the terminator required by this trait. /// If OpBuilder is provided, use it to build the terminator and notify the - /// OpBuilder litsteners accoridngly. If only a Builder is provided, locally + /// OpBuilder litsteners accordingly. If only a Builder is provided, locally /// construct an OpBuilder with no listeners; this should only be used if no /// OpBuilder is available at the call site, e.g., in the parser. static void ensureTerminator(Region ®ion, Builder &builder, diff --git a/mlir/include/mlir/IR/StorageUniquerSupport.h b/mlir/include/mlir/IR/StorageUniquerSupport.h --- a/mlir/include/mlir/IR/StorageUniquerSupport.h +++ b/mlir/include/mlir/IR/StorageUniquerSupport.h @@ -69,7 +69,7 @@ static TypeID getTypeID() { return TypeID::get(); } /// Provide an implementation of 'classof' that compares the type id of the - /// provided value with that of the concerete type. + /// provided value with that of the concrete type. template static bool classof(T val) { static_assert(std::is_convertible::value, "casting from a non-convertible type"); diff --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td b/mlir/include/mlir/Interfaces/SideEffectInterfaces.td --- a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td +++ b/mlir/include/mlir/Interfaces/SideEffectInterfaces.td @@ -20,7 +20,7 @@ // Resource Bindings //===----------------------------------------------------------------------===// -// A generic resource that can be attachted to a general base side effect. +// A generic resource that can be attached to a general base side effect. class Resource { /// The resource that the associated effect is being applied to. string name = resourceName; diff --git a/mlir/include/mlir/Pass/AnalysisManager.h b/mlir/include/mlir/Pass/AnalysisManager.h --- a/mlir/include/mlir/Pass/AnalysisManager.h +++ b/mlir/include/mlir/Pass/AnalysisManager.h @@ -268,7 +268,7 @@ return nest(op).template getAnalysis(); } - /// Query for an analysis of a child operation of a specifc derived operation + /// Query for an analysis of a child operation of a specific derived operation /// type, constructing it if necessary. template AnalysisT &getChildAnalysis(OpT child) { diff --git a/mlir/include/mlir/Reducer/Passes/OpReducer.h b/mlir/include/mlir/Reducer/Passes/OpReducer.h --- a/mlir/include/mlir/Reducer/Passes/OpReducer.h +++ b/mlir/include/mlir/Reducer/Passes/OpReducer.h @@ -86,7 +86,7 @@ /// Return the name of this reducer class. StringRef getName() { return impl->getName(); } - /// Return the initial transformSpace cointaing the transformable indices. + /// Return the initial transformSpace containing the transformable indices. std::vector initTransformSpace(ModuleOp module) { return impl->initTransformSpace(module); } diff --git a/mlir/include/mlir/Reducer/ReductionNode.h b/mlir/include/mlir/Reducer/ReductionNode.h --- a/mlir/include/mlir/Reducer/ReductionNode.h +++ b/mlir/include/mlir/Reducer/ReductionNode.h @@ -26,7 +26,7 @@ /// This class defines the ReductionNode which is used to wrap the module of /// a generated variant and keep track of the necessary metadata for the -/// reduction pass. The nodes are linked together in a reduction tree stucture +/// reduction pass. The nodes are linked together in a reduction tree structure /// which defines the relationship between all the different generated variants. class ReductionNode { public: @@ -83,7 +83,7 @@ // has been evaluated. int size; - // This indicates if the module has been evalueated (measured and tested). + // This indicates if the module has been evaluated (measured and tested). bool evaluated; // Indicates the indices in the node that have been transformed in previous diff --git a/mlir/include/mlir/Reducer/ReductionTreeUtils.h b/mlir/include/mlir/Reducer/ReductionTreeUtils.h --- a/mlir/include/mlir/Reducer/ReductionTreeUtils.h +++ b/mlir/include/mlir/Reducer/ReductionTreeUtils.h @@ -30,7 +30,7 @@ /// Update the golden module's content with that of the reduced module. void updateGoldenModule(ModuleOp &golden, ModuleOp reduced); -/// Update the the smallest node traversed so far in the reduction tree and +/// Update the smallest node traversed so far in the reduction tree and /// print the debugging information for the currNode being traversed. void updateSmallestNode(ReductionNode *currNode, ReductionNode *&smallestNode, std::vector path); @@ -40,7 +40,7 @@ std::vector createTransformSpace(ModuleOp module, int numIndices); /// Create the specified number of variants by applying the transform method -/// to different ranges of indices in the parent module. The isDeletion bolean +/// to different ranges of indices in the parent module. The isDeletion boolean /// specifies if the transformation is the deletion of indices. void createVariants(ReductionNode *parent, const Tester &test, int numVariants, llvm::function_ref transform, diff --git a/mlir/include/mlir/Reducer/Tester.h b/mlir/include/mlir/Reducer/Tester.h --- a/mlir/include/mlir/Reducer/Tester.h +++ b/mlir/include/mlir/Reducer/Tester.h @@ -9,7 +9,7 @@ // This file defines the Tester class used in the MLIR Reduce tool. // // A Tester object is passed as an argument to the reduction passes and it is -// used to run the interestigness testing script on the different generated +// used to run the interestingness testing script on the different generated // reduced variants of the test case. // //===----------------------------------------------------------------------===// diff --git a/mlir/include/mlir/Support/InterfaceSupport.h b/mlir/include/mlir/Support/InterfaceSupport.h --- a/mlir/include/mlir/Support/InterfaceSupport.h +++ b/mlir/include/mlir/Support/InterfaceSupport.h @@ -26,7 +26,7 @@ /// This class represents an abstract interface. An interface is a simplified /// mechanism for attaching concept based polymorphism to a class hierarchy. An -/// interace is comprised of two components: +/// interface is comprised of two components: /// * The derived interface class: This is what users interact with, and invoke /// methods on. /// * An interface `Trait` class: This is the class that is attached to the