diff options
author | Christian Sigg <csigg@google.com> | 2019-10-04 04:37:14 -0700 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-10-04 04:37:53 -0700 |
commit | 85dcaf19c721c4c745cd4fa3972aa9093acd69d3 (patch) | |
tree | c311b0c28846249bdfaa6f124ceda4b79d5757be | |
parent | 5830f71a45df33e24c864bea4c5de070be47b488 (diff) | |
download | bcm5719-llvm-85dcaf19c721c4c745cd4fa3972aa9093acd69d3.tar.gz bcm5719-llvm-85dcaf19c721c4c745cd4fa3972aa9093acd69d3.zip |
Fix typos, NFC.
PiperOrigin-RevId: 272851237
44 files changed, 75 insertions, 75 deletions
diff --git a/mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp b/mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp index c1c31d1d09c..4c51ae7e675 100644 --- a/mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp +++ b/mlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp @@ -132,7 +132,7 @@ struct LinalgTypeConverter : public LLVMTypeConverter { } // end anonymous namespace // Helper function that allocates the descriptor converters and adds load/store -// coverters to the list. +// converters to the list. static void populateLinalg3ToLLVMConversionPatterns( mlir::OwningRewritePatternList &patterns, mlir::MLIRContext *context) { patterns.insert<LoadOpConversion, StoreOpConversion>(context); diff --git a/mlir/examples/toy/Ch1/include/toy/Parser.h b/mlir/examples/toy/Ch1/include/toy/Parser.h index 75c660b7c78..5962a982ff0 100644 --- a/mlir/examples/toy/Ch1/include/toy/Parser.h +++ b/mlir/examples/toy/Ch1/include/toy/Parser.h @@ -140,7 +140,7 @@ private: auto *firstLiteral = llvm::dyn_cast<LiteralExprAST>(values.front().get()); if (!firstLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); // Append the nested dimensions to the current level auto &firstDims = firstLiteral->getDims(); @@ -151,10 +151,10 @@ private: auto *exprLiteral = llvm::cast<LiteralExprAST>(expr.get()); if (!exprLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); if (exprLiteral->getDims() != firstDims) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); } } return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values), diff --git a/mlir/examples/toy/Ch2/include/toy/Parser.h b/mlir/examples/toy/Ch2/include/toy/Parser.h index 75c660b7c78..5962a982ff0 100644 --- a/mlir/examples/toy/Ch2/include/toy/Parser.h +++ b/mlir/examples/toy/Ch2/include/toy/Parser.h @@ -140,7 +140,7 @@ private: auto *firstLiteral = llvm::dyn_cast<LiteralExprAST>(values.front().get()); if (!firstLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); // Append the nested dimensions to the current level auto &firstDims = firstLiteral->getDims(); @@ -151,10 +151,10 @@ private: auto *exprLiteral = llvm::cast<LiteralExprAST>(expr.get()); if (!exprLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); if (exprLiteral->getDims() != firstDims) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); } } return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values), diff --git a/mlir/examples/toy/Ch3/include/toy/Dialect.h b/mlir/examples/toy/Ch3/include/toy/Dialect.h index 87d737f375f..a256379661b 100644 --- a/mlir/examples/toy/Ch3/include/toy/Dialect.h +++ b/mlir/examples/toy/Ch3/include/toy/Dialect.h @@ -38,19 +38,19 @@ namespace toy { /// This is the definition of the Toy dialect. A dialect inherits from /// mlir::Dialect and register custom operations and types (in its constructor). -/// It can also overridding general behavior of dialects exposed as virtual +/// It can also overriding general behavior of dialects exposed as virtual /// method, for example regarding verification and parsing/printing. class ToyDialect : public mlir::Dialect { public: explicit ToyDialect(mlir::MLIRContext *ctx); - /// Parse a type registered to this dialect. Overridding this method is + /// Parse a type registered to this dialect. Overriding this method is /// required for dialects that have custom types. /// Technically this is only needed to be able to round-trip to textual IR. mlir::Type parseType(llvm::StringRef tyData, mlir::Location loc) const override; - /// Print a type registered to this dialect. Overridding this method is + /// Print a type registered to this dialect. Overriding this method is /// only required for dialects that have custom types. /// Technically this is only needed to be able to round-trip to textual IR. void printType(mlir::Type type, llvm::raw_ostream &os) const override; diff --git a/mlir/examples/toy/Ch3/include/toy/Parser.h b/mlir/examples/toy/Ch3/include/toy/Parser.h index 75c660b7c78..5962a982ff0 100644 --- a/mlir/examples/toy/Ch3/include/toy/Parser.h +++ b/mlir/examples/toy/Ch3/include/toy/Parser.h @@ -140,7 +140,7 @@ private: auto *firstLiteral = llvm::dyn_cast<LiteralExprAST>(values.front().get()); if (!firstLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); // Append the nested dimensions to the current level auto &firstDims = firstLiteral->getDims(); @@ -151,10 +151,10 @@ private: auto *exprLiteral = llvm::cast<LiteralExprAST>(expr.get()); if (!exprLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); if (exprLiteral->getDims() != firstDims) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); } } return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values), diff --git a/mlir/examples/toy/Ch3/parser/AST.cpp b/mlir/examples/toy/Ch3/parser/AST.cpp index 869f2ef2013..fde8b101e83 100644 --- a/mlir/examples/toy/Ch3/parser/AST.cpp +++ b/mlir/examples/toy/Ch3/parser/AST.cpp @@ -125,7 +125,7 @@ void ASTDumper::dump(NumberExprAST *num) { llvm::errs() << num->getValue() << " " << loc(num) << "\n"; } -/// Helper to print recurisvely a literal. This handles nested array like: +/// Helper to print recursively a literal. This handles nested array like: /// [ [ 1, 2 ], [ 3, 4 ] ] /// We print out such array with the dimensions spelled out at every level: /// <2,2>[<2>[ 1, 2 ], <2>[ 3, 4 ] ] diff --git a/mlir/examples/toy/Ch4/include/toy/Dialect.h b/mlir/examples/toy/Ch4/include/toy/Dialect.h index 149d9008848..b0838870b5a 100644 --- a/mlir/examples/toy/Ch4/include/toy/Dialect.h +++ b/mlir/examples/toy/Ch4/include/toy/Dialect.h @@ -38,19 +38,19 @@ namespace toy { /// This is the definition of the Toy dialect. A dialect inherits from /// mlir::Dialect and register custom operations and types (in its constructor). -/// It can also overridding general behavior of dialects exposed as virtual +/// It can also overriding general behavior of dialects exposed as virtual /// method, for example regarding verification and parsing/printing. class ToyDialect : public mlir::Dialect { public: explicit ToyDialect(mlir::MLIRContext *ctx); - /// Parse a type registered to this dialect. Overridding this method is + /// Parse a type registered to this dialect. Overriding this method is /// required for dialects that have custom types. /// Technically this is only needed to be able to round-trip to textual IR. mlir::Type parseType(llvm::StringRef tyData, mlir::Location loc) const override; - /// Print a type registered to this dialect. Overridding this method is + /// Print a type registered to this dialect. Overriding this method is /// only required for dialects that have custom types. /// Technically this is only needed to be able to round-trip to textual IR. void printType(mlir::Type type, llvm::raw_ostream &os) const override; diff --git a/mlir/examples/toy/Ch4/include/toy/Parser.h b/mlir/examples/toy/Ch4/include/toy/Parser.h index 75c660b7c78..5962a982ff0 100644 --- a/mlir/examples/toy/Ch4/include/toy/Parser.h +++ b/mlir/examples/toy/Ch4/include/toy/Parser.h @@ -140,7 +140,7 @@ private: auto *firstLiteral = llvm::dyn_cast<LiteralExprAST>(values.front().get()); if (!firstLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); // Append the nested dimensions to the current level auto &firstDims = firstLiteral->getDims(); @@ -151,10 +151,10 @@ private: auto *exprLiteral = llvm::cast<LiteralExprAST>(expr.get()); if (!exprLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); if (exprLiteral->getDims() != firstDims) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); } } return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values), diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp index d0f3de134d7..c66335a70d5 100644 --- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp +++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp @@ -104,7 +104,7 @@ private: /// The builder is a helper class to create IR inside a function. It is /// re-initialized every time we enter a function and kept around as a /// convenience for emitting individual operations. - /// The builder is stateful, in particular it keeeps an "insertion point": + /// The builder is stateful, in particular it keeps an "insertion point": /// this is where the next operations will be introduced. std::unique_ptr<mlir::OpBuilder> builder; diff --git a/mlir/examples/toy/Ch5/include/toy/Dialect.h b/mlir/examples/toy/Ch5/include/toy/Dialect.h index f93b351751e..ee85dbec9bc 100644 --- a/mlir/examples/toy/Ch5/include/toy/Dialect.h +++ b/mlir/examples/toy/Ch5/include/toy/Dialect.h @@ -39,19 +39,19 @@ namespace toy { /// This is the definition of the Toy dialect. A dialect inherits from /// mlir::Dialect and register custom operations and types (in its constructor). -/// It can also overridding general behavior of dialects exposed as virtual +/// It can also overriding general behavior of dialects exposed as virtual /// method, for example regarding verification and parsing/printing. class ToyDialect : public mlir::Dialect { public: explicit ToyDialect(mlir::MLIRContext *ctx); - /// Parse a type registered to this dialect. Overridding this method is + /// Parse a type registered to this dialect. Overriding this method is /// required for dialects that have custom types. /// Technically this is only needed to be able to round-trip to textual IR. mlir::Type parseType(llvm::StringRef tyData, mlir::Location loc) const override; - /// Print a type registered to this dialect. Overridding this method is + /// Print a type registered to this dialect. Overriding this method is /// only required for dialects that have custom types. /// Technically this is only needed to be able to round-trip to textual IR. void printType(mlir::Type type, llvm::raw_ostream &os) const override; diff --git a/mlir/examples/toy/Ch5/include/toy/Parser.h b/mlir/examples/toy/Ch5/include/toy/Parser.h index 75c660b7c78..5962a982ff0 100644 --- a/mlir/examples/toy/Ch5/include/toy/Parser.h +++ b/mlir/examples/toy/Ch5/include/toy/Parser.h @@ -140,7 +140,7 @@ private: auto *firstLiteral = llvm::dyn_cast<LiteralExprAST>(values.front().get()); if (!firstLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); // Append the nested dimensions to the current level auto &firstDims = firstLiteral->getDims(); @@ -151,10 +151,10 @@ private: auto *exprLiteral = llvm::cast<LiteralExprAST>(expr.get()); if (!exprLiteral) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); if (exprLiteral->getDims() != firstDims) return parseError<ExprAST>("uniform well-nested dimensions", - "inside literal expession"); + "inside literal expression"); } } return std::make_unique<LiteralExprAST>(std::move(loc), std::move(values), diff --git a/mlir/include/mlir/Analysis/Utils.h b/mlir/include/mlir/Analysis/Utils.h index b012cc1e60e..cffa222154f 100644 --- a/mlir/include/mlir/Analysis/Utils.h +++ b/mlir/include/mlir/Analysis/Utils.h @@ -183,7 +183,7 @@ struct MemRefRegion { explicit MemRefRegion(Location loc) : loc(loc) {} /// Computes the memory region accessed by this memref with the region - /// represented as constraints symbolic/parameteric in 'loopDepth' loops + /// represented as constraints symbolic/parametric in 'loopDepth' loops /// surrounding opInst. The computed region's 'cst' field has exactly as many /// dimensional identifiers as the rank of the memref, and *potentially* /// additional symbolic identifiers which could include any of the loop IVs diff --git a/mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h b/mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h index 161f68701d6..d929b7942f4 100644 --- a/mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h +++ b/mlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h @@ -57,7 +57,7 @@ createConvertGPUKernelToCubinPass(CubinGenerator cubinGenerator); /// /// This pass does not generate code to call CUDA directly but instead uses a /// small wrapper library that exports a stable and conveniently typed ABI -/// ontop of CUDA. +/// on top of CUDA. std::unique_ptr<OpPassBase<ModuleOp>> createConvertGpuLaunchFuncToCudaCallsPass(); diff --git a/mlir/include/mlir/Dialect/QuantOps/UniformSupport.h b/mlir/include/mlir/Dialect/QuantOps/UniformSupport.h index 65f05f37958..b68d40fb5a9 100644 --- a/mlir/include/mlir/Dialect/QuantOps/UniformSupport.h +++ b/mlir/include/mlir/Dialect/QuantOps/UniformSupport.h @@ -60,7 +60,7 @@ struct ExpressedToQuantizedConverter { /// Reference implementation of converting between real numbers and values /// represented by a UniformQuantizedType. -/// Note that this is not expected to be speedy and may be superceded eventually +/// Note that this is not expected to be speedy and may be superseded eventually /// by a more optimal implementation. /// Also, the interface assumes that quantization is done per-layer and will /// need to be wider for various per-channel schemes. As such, this is a @@ -101,7 +101,7 @@ public: // This function is a performance critical code path in quantization // since it runs for each single float parameter value. - // Specalize f32->u8/i8 case to optimize performance. + // Specialize f32->u8/i8 case to optimize performance. if (&expressedValue.getSemantics() == &APFloat::IEEEsingle() && storageBitWidth == 8 && roundMode == llvm::APFloatBase::rmNearestTiesToAway) { diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td index b3b7df69f12..8754b7b0872 100644 --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td @@ -886,7 +886,7 @@ def SPV_UGreaterThanOp : SPV_LogicalBinaryOp<"UGreaterThan", SPV_Integer, []> { For example: ``` - %4 = spv.UGreaterhan %0, %1 : i32 + %4 = spv.UGreaterThan %0, %1 : i32 %5 = spv.UGreaterThan %2, %3 : vector<4xi32> ``` diff --git a/mlir/include/mlir/Dialect/StandardOps/Ops.h b/mlir/include/mlir/Dialect/StandardOps/Ops.h index 8c272849d57..31ebae37297 100644 --- a/mlir/include/mlir/Dialect/StandardOps/Ops.h +++ b/mlir/include/mlir/Dialect/StandardOps/Ops.h @@ -165,7 +165,7 @@ public: // source memref, destination memref, and the tag memref have the same // restrictions as any load/store. The optional stride arguments should be of // 'index' type, and specify a stride for the slower memory space (memory space -// with a lower memory space id), tranferring chunks of +// with a lower memory space id), transferring chunks of // number_of_elements_per_stride every stride until %num_elements are // transferred. Either both or no stride arguments should be specified. // diff --git a/mlir/include/mlir/IR/Block.h b/mlir/include/mlir/IR/Block.h index decf4cceec4..37ce002bd37 100644 --- a/mlir/include/mlir/IR/Block.h +++ b/mlir/include/mlir/IR/Block.h @@ -207,7 +207,7 @@ private: : llvm::filter_iterator<Block::iterator, bool (*)(Operation &)>( it, end, &filter) {} - /// Allow implict conversion to the underlying block iterator. + /// Allow implicit conversion to the underlying block iterator. operator Block::iterator() const { return this->wrapped(); } }; diff --git a/mlir/include/mlir/IR/Diagnostics.h b/mlir/include/mlir/IR/Diagnostics.h index 307d58778ee..d53327371c2 100644 --- a/mlir/include/mlir/IR/Diagnostics.h +++ b/mlir/include/mlir/IR/Diagnostics.h @@ -435,7 +435,7 @@ public: HandlerID registerHandler(const HandlerTy &handler); /// Set the diagnostic handler with a function that returns void. This is a - /// convient wrapper for handlers that always completely process the given + /// convenient wrapper for handlers that always completely process the given /// diagnostic. template <typename FuncTy, typename RetT = decltype(std::declval<FuncTy>()( std::declval<Diagnostic &>()))> diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td index 4bb88a2192e..a906076c314 100644 --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -998,7 +998,7 @@ def ArrayAttr : ArrayAttrBase<CPred<"$_self.isa<ArrayAttr>()">, // `element` specifies the element attribute kind stored in this array. class TypedArrayAttrBase<Attr element, string description>: ArrayAttrBase< And<[ - // Guranatee this is an ArrayAttr first + // Guarantee this is an ArrayAttr first CPred<"$_self.isa<ArrayAttr>()">, // Guarantee all elements satisfy the constraints from `element` Concat<"llvm::all_of($_self.cast<ArrayAttr>(), " diff --git a/mlir/include/mlir/IR/Operation.h b/mlir/include/mlir/IR/Operation.h index b4b138484df..e7f22ffa6dc 100644 --- a/mlir/include/mlir/IR/Operation.h +++ b/mlir/include/mlir/IR/Operation.h @@ -112,7 +112,7 @@ public: /// Return the context this operation is associated with. MLIRContext *getContext(); - /// Return the dialact this operation is associated with, or nullptr if the + /// Return the dialect this operation is associated with, or nullptr if the /// associated dialect is not registered. Dialect *getDialect(); @@ -569,7 +569,7 @@ private: /// model. Block *getParent() const { return block; } - /// The operation block that containts this operation. + /// The operation block that contains this operation. Block *block = nullptr; /// This holds information about the source location the operation was defined @@ -721,7 +721,7 @@ private: /// The operation whose uses are being iterated over. Operation *op; - /// The result of op whoses uses are being iterated over. + /// The result of op who's uses are being iterated over. Operation::result_iterator res; /// The use of the result. Value::use_iterator use; diff --git a/mlir/include/mlir/Support/StringExtras.h b/mlir/include/mlir/Support/StringExtras.h index 9948d15011a..2f75c8e5d20 100644 --- a/mlir/include/mlir/Support/StringExtras.h +++ b/mlir/include/mlir/Support/StringExtras.h @@ -46,7 +46,7 @@ inline std::string convertToSnakeCase(llvm::StringRef input) { return snakeCase; } -/// Converts a string from camel-case to snake_case by replacing all occurences +/// Converts a string from camel-case to snake_case by replacing all occurrences /// of '_' followed by a lowercase letter with the letter in /// uppercase. Optionally allow capitalization of the first letter (if it is a /// lowercase letter) diff --git a/mlir/include/mlir/TableGen/OpTrait.h b/mlir/include/mlir/TableGen/OpTrait.h index cfa1d93951d..c3ea9a7bda0 100644 --- a/mlir/include/mlir/TableGen/OpTrait.h +++ b/mlir/include/mlir/TableGen/OpTrait.h @@ -99,7 +99,7 @@ public: // OpTrait corresponding to an OpInterface on the operation. class InterfaceOpTrait : public OpTrait { public: - // Returns member function defitions corresponding to the trait, + // Returns member function definitions corresponding to the trait, OpInterface getOpInterface() const; // Returns the trait corresponding to a C++ trait class. diff --git a/mlir/lib/Analysis/AffineAnalysis.cpp b/mlir/lib/Analysis/AffineAnalysis.cpp index 92997ad27a7..4d2fac96913 100644 --- a/mlir/lib/Analysis/AffineAnalysis.cpp +++ b/mlir/lib/Analysis/AffineAnalysis.cpp @@ -372,7 +372,7 @@ static void addDomainConstraints(const FlatAffineConstraints &srcDomain, // Source access function: // (a0 * d0 + a1 * s0 + a2, b0 * d0 + b1 * s0 + b2) // -// Destination acceses function: +// Destination access function: // (c0 * d0 + c1 * s0 + c2, f0 * d0 + f1 * s0 + f2) // // This method constructs the following equality constraints in diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp index 3feb15b60cb..b568d6eacf6 100644 --- a/mlir/lib/Analysis/AffineStructures.cpp +++ b/mlir/lib/Analysis/AffineStructures.cpp @@ -2220,7 +2220,7 @@ Optional<int64_t> FlatAffineConstraints::getConstantBoundOnDimSize( (*ub)[c] = atIneq(minUbPosition, getNumDimIds() + c); } // The lower bound leads to a ceildiv while the upper bound is a floordiv - // whenever the cofficient at pos != 1. ceildiv (val / d) = floordiv (val + + // whenever the coefficient at pos != 1. ceildiv (val / d) = floordiv (val + // d - 1 / d); hence, the addition of 'atIneq(minLbPosition, pos) - 1' to // the constant term for the lower bound. (*lb)[getNumSymbolIds()] += atIneq(minLbPosition, pos) - 1; @@ -2298,7 +2298,7 @@ FlatAffineConstraints::getConstantUpperBound(unsigned pos) const { return tmpCst.computeConstantLowerOrUpperBound</*isLower=*/false>(pos); } -// A simple (naive and conservative) check for hyper-rectangularlity. +// A simple (naive and conservative) check for hyper-rectangularity. bool FlatAffineConstraints::isHyperRectangular(unsigned pos, unsigned num) const { assert(pos < getNumCols() - 1); diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp index 8145ec4617d..b7b1109b491 100644 --- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp +++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp @@ -350,7 +350,7 @@ private: static constexpr int kWarpSize = 32; }; -// A pass that replaces all occurences of GPU device operations with their +// A pass that replaces all occurrences of GPU device operations with their // corresponding NVVM equivalent. // // This pass only handles device code and is not meant to be run on GPU host diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp index 1cff75de2d4..cab62ff457e 100644 --- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp +++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp @@ -102,7 +102,7 @@ public: } }; -// A pass that replaces all occurences of GPU device operations with their +// A pass that replaces all occurrences of GPU device operations with their // corresponding ROCDL equivalent. // // This pass only handles device code and is not meant to be run on GPU host diff --git a/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp index 02d661a4270..c4bf7cdd9f7 100644 --- a/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp +++ b/mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp @@ -745,7 +745,7 @@ struct CallOpInterfaceLowering : public LLVMLegalizationPattern<CallOpType> { auto newOp = rewriter.create<LLVM::CallOp>(op->getLoc(), packedResult, promoted, op->getAttrs()); - // If < 2 results, packingdid not do anything and we can just return. + // If < 2 results, packing did not do anything and we can just return. if (numResults < 2) { SmallVector<Value *, 4> results(newOp.getResults()); rewriter.replaceOp(op, results); @@ -980,7 +980,7 @@ struct LoadOpLowering : public LoadStoreOpLowering<LoadOp> { } }; -// Store opreation is lowered to obtaining a pointer to the indexed element, +// Store operation is lowered to obtaining a pointer to the indexed element, // and storing the given value to it. struct StoreOpLowering : public LoadStoreOpLowering<StoreOp> { using Base::Base; diff --git a/mlir/lib/Dialect/AffineOps/AffineOps.cpp b/mlir/lib/Dialect/AffineOps/AffineOps.cpp index f2f9f92cb82..b9a849d6100 100644 --- a/mlir/lib/Dialect/AffineOps/AffineOps.cpp +++ b/mlir/lib/Dialect/AffineOps/AffineOps.cpp @@ -155,7 +155,7 @@ static bool isValidAffineIndexOperand(Value *value) { } /// Utility function to verify that a set of operands are valid dimension and -/// symbol identifiers. The operands should be layed out such that the dimension +/// symbol identifiers. The operands should be laid out such that the dimension /// operands are before the symbol operands. This function returns failure if /// there was an invalid operand. An operation is provided to emit any necessary /// errors. diff --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp index ff05802d521..98f5651279f 100644 --- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp +++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp @@ -221,7 +221,7 @@ void LaunchOp::print(OpAsmPrinter &p) { // (%region_arg, %region_arg, %region_arg) in // (%region_arg = %operand, %region_arg = %operand, %region_arg = %operand) // where %region_arg are percent-identifiers for the region arguments to be -// introduced futher (SSA defs), and %operand are percent-identifiers for the +// introduced further (SSA defs), and %operand are percent-identifiers for the // SSA value uses. static ParseResult parseSizeAssignment(OpAsmParser &parser, @@ -267,10 +267,10 @@ ParseResult LaunchOp::parse(OpAsmParser &parser, OperationState &result) { kNumConfigRegionAttributes); MutableArrayRef<OpAsmParser::OperandType> regionArgsRef(regionArgs); - // Parse the size assignment segments: the first segment assigns grid siezs + // Parse the size assignment segments: the first segment assigns grid sizes // and defines values for block identifiers; the second segment assigns block - // sies and defines values for thread identifiers. In the region argument - // list, identifiers preceed sizes, and block-related values preceed + // sizes and defines values for thread identifiers. In the region argument + // list, identifiers precede sizes, and block-related values precede // thread-related values. if (parser.parseKeyword(getBlocksKeyword().data()) || parseSizeAssignment(parser, sizesRef.take_front(3), @@ -338,7 +338,7 @@ class PropagateConstantBounds : public OpRewritePattern<LaunchOp> { PatternMatchResult matchAndRewrite(LaunchOp launchOp, PatternRewriter &rewriter) const override { - auto oringInsertionPoint = rewriter.saveInsertionPoint(); + auto origInsertionPoint = rewriter.saveInsertionPoint(); rewriter.setInsertionPointToStart(&launchOp.getBody().front()); // Traverse operands passed to kernel and check if some of them are known @@ -365,7 +365,7 @@ class PropagateConstantBounds : public OpRewritePattern<LaunchOp> { kernelArg->replaceAllUsesWith(internalConstant); launchOp.eraseKernelArgument(index); } - rewriter.restoreInsertionPoint(oringInsertionPoint); + rewriter.restoreInsertionPoint(origInsertionPoint); if (!found) return matchFailure(); diff --git a/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp b/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp index e65f30d035b..83fa9237dee 100644 --- a/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp +++ b/mlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp @@ -38,7 +38,7 @@ public: } // end anonymous namespace /// Base class rewrites ConstFakeQuant into a qbarrier/dbarrier pair. -template <typename ConcretRewriteClass, typename FakeQuantOp> +template <typename ConcreteRewriteClass, typename FakeQuantOp> class FakeQuantRewrite : public OpRewritePattern<FakeQuantOp> { public: using OpRewritePattern<FakeQuantOp>::OpRewritePattern; @@ -68,7 +68,7 @@ private: } QuantizedType elementType = - static_cast<const ConcretRewriteClass *>(this) + static_cast<const ConcreteRewriteClass *>(this) ->convertFakeQuantAttrsToType(op, converter.expressedType); if (!elementType) { diff --git a/mlir/lib/Dialect/StandardOps/Ops.cpp b/mlir/lib/Dialect/StandardOps/Ops.cpp index 0252d090471..f71fde7a925 100644 --- a/mlir/lib/Dialect/StandardOps/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/Ops.cpp @@ -1683,7 +1683,7 @@ static LogicalResult verify(ExtractElementOp op) { } OpFoldResult ExtractElementOp::fold(ArrayRef<Attribute> operands) { - assert(!operands.empty() && "extract_element takes atleast one operand"); + assert(!operands.empty() && "extract_element takes at least one operand"); // The aggregate operand must be a known constant. Attribute aggregate = operands.front(); diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp index 83919f7a87b..d9ca6f19cf5 100644 --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -356,7 +356,7 @@ protected: void printLocationInternal(LocationAttr loc, bool pretty = false); void printDenseElementsAttr(DenseElementsAttr attr); - /// This enum is used to represent the binding stength of the enclosing + /// This enum is used to represent the binding strength of the enclosing /// context that an AffineExprStorage is being printed in, so we can /// intelligently produce parens. enum class BindingStrength { diff --git a/mlir/lib/IR/Attributes.cpp b/mlir/lib/IR/Attributes.cpp index dc72886d873..d74cacbe695 100644 --- a/mlir/lib/IR/Attributes.cpp +++ b/mlir/lib/IR/Attributes.cpp @@ -415,7 +415,7 @@ ElementsAttr ElementsAttr::mapValues( } } -/// Returns the 1 dimenional flattened row-major index from the given +/// Returns the 1 dimensional flattened row-major index from the given /// multi-dimensional index. uint64_t ElementsAttr::getFlattenedIndex(ArrayRef<uint64_t> index) const { assert(isValidIndex(index) && "expected valid multi-dimensional index"); diff --git a/mlir/lib/IR/Dialect.cpp b/mlir/lib/IR/Dialect.cpp index 2daf46e514f..6a7dcaed058 100644 --- a/mlir/lib/IR/Dialect.cpp +++ b/mlir/lib/IR/Dialect.cpp @@ -49,7 +49,7 @@ void mlir::registerDialectAllocator(const DialectAllocatorFunction &function) { } /// Registers a function to set specific hooks for a specific dialect, typically -/// used through the DialectHooksRegistreation template. +/// used through the DialectHooksRegistration template. void mlir::registerDialectHooksSetter(const DialectHooksSetter &function) { assert( function && diff --git a/mlir/lib/IR/IntegerSet.cpp b/mlir/lib/IR/IntegerSet.cpp index 139ca504b58..e5715877649 100644 --- a/mlir/lib/IR/IntegerSet.cpp +++ b/mlir/lib/IR/IntegerSet.cpp @@ -45,7 +45,7 @@ unsigned IntegerSet::getNumInequalities() const { } bool IntegerSet::isEmptyIntegerSet() const { - // This will only work if uniqui'ing is on. + // This will only work if uniquing is on. static_assert(kUniquingThreshold >= 1, "uniquing threshold should be at least one"); return *this == getEmptySet(set->dimCount, set->symbolCount, getContext()); diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp index ab27ab1cbf5..d64d08a2fe9 100644 --- a/mlir/lib/IR/MLIRContext.cpp +++ b/mlir/lib/IR/MLIRContext.cpp @@ -64,7 +64,7 @@ static ValueT safeGetOrCreate(DenseSet<ValueT, DenseInfoT> &container, return *it; } - // Aquire a writer-lock so that we can safely create the new instance. + // Acquire a writer-lock so that we can safely create the new instance. llvm::sys::SmartScopedWriter<true> instanceLock(mutex); // Check for an existing instance again here, because another writer thread @@ -208,7 +208,7 @@ public: using IntegerSets = DenseSet<IntegerSet, IntegerSetKeyInfo>; IntegerSets integerSets; - // Affine expression uniqui'ing. + // Affine expression uniquing. StorageUniquer affineUniquer; //===--------------------------------------------------------------------===// @@ -445,7 +445,7 @@ Identifier Identifier::get(StringRef str, MLIRContext *context) { return Identifier(it->getKeyData()); } - // Aquire a writer-lock so that we can safely create the new instance. + // Acquire a writer-lock so that we can safely create the new instance. llvm::sys::SmartScopedWriter<true> contextLock(impl.identifierMutex); auto it = impl.identifiers.insert({str, char()}).first; return Identifier(it->getKeyData()); @@ -642,7 +642,7 @@ IntegerSet IntegerSet::get(unsigned dimCount, unsigned symbolCount, constructorFn); } - // Otherwise, aquire a writer-lock so that we can safely create the new + // Otherwise, acquire a writer-lock so that we can safely create the new // instance. llvm::sys::SmartScopedWriter<true> affineLock(impl.affineMutex); return constructorFn(); diff --git a/mlir/lib/Quantizer/Support/UniformSolvers.cpp b/mlir/lib/Quantizer/Support/UniformSolvers.cpp index b4c14ca80ef..db5eaa0a05c 100644 --- a/mlir/lib/Quantizer/Support/UniformSolvers.cpp +++ b/mlir/lib/Quantizer/Support/UniformSolvers.cpp @@ -82,7 +82,7 @@ bool UniformParamsFromMinMaxSolver::compute() { auto fMid = fns::overshoot(origMinAdj, origMaxAdj, numLevelsDouble, deltaMid); if (fMid == 0 || (fMid > 0 && std::fabs(deltaMid - prevDeltaMid) < 1e-15)) { - // Solution found (or step size is infinitessimal and an overshoot). + // Solution found (or step size is infinitesimal and an overshoot). // Empirically, this seems to terminate around 30-50 steps or so. // This will find a zero point for exactly representable ranges and // will terminate on a small step size for inexact, biasing towards diff --git a/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp b/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp index 2c2d1169a3d..f9cab379420 100644 --- a/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp +++ b/mlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp @@ -38,7 +38,7 @@ using namespace mlir; namespace { -// Create a call to llvm intrisic +// Create a call to llvm intrinsic static llvm::Value *createIntrinsicCall(llvm::IRBuilder<> &builder, llvm::Intrinsic::ID intrinsic, ArrayRef<llvm::Value *> args = {}) { diff --git a/mlir/lib/Transforms/DialectConversion.cpp b/mlir/lib/Transforms/DialectConversion.cpp index 1b6b9f73868..39d4893e1f3 100644 --- a/mlir/lib/Transforms/DialectConversion.cpp +++ b/mlir/lib/Transforms/DialectConversion.cpp @@ -1015,7 +1015,7 @@ enum OpConversionMode { Partial, // In this mode, all operations must be legal for the given target for the - // conversion to succeeed. + // conversion to succeed. Full, // In this mode, operations are analyzed for legality. No actual rewrites are diff --git a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp index d45eb1307f6..870804d989b 100644 --- a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp +++ b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp @@ -211,7 +211,7 @@ void MemRefDataFlowOpt::runOnFunction() { } // Check if the store fwd'ed memrefs are now left with only stores and can - // thus be completely deleted. Note: the canononicalize pass should be able + // thus be completely deleted. Note: the canonicalize pass should be able // to do this as well, but we'll do it here since we collected these anyway. for (auto *memref : memrefsToErase) { // If the memref hasn't been alloc'ed in this function, skip. diff --git a/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp b/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp index 7b2c323b806..fd803390ce7 100644 --- a/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp +++ b/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp @@ -219,7 +219,7 @@ FusionResult mlir::canFuseLoops(AffineForOp srcForOp, AffineForOp dstForOp, return FusionResult::FailBlockDependence; } - // Check if 'srcForOp' precedeces 'dstForOp' in 'block'. + // Check if 'srcForOp' precedes 'dstForOp' in 'block'. bool isSrcForOpBeforeDstForOp = srcForOp.getOperation()->isBeforeInBlock(dstForOp.getOperation()); // 'forOpA' executes before 'forOpB' in 'block'. diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp index a8205590b2c..889a1b00400 100644 --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -898,7 +898,7 @@ void OpEmitter::genBuilder() { // attribute, and genSeparateParamBuilder(); // 2. one having a stand-alone parameter for each operand / attribute and - // an aggregrated parameter for all result types, and + // an aggregated parameter for all result types, and genCollectiveTypeParamBuilder(); // 3. one having an aggregated parameter for all result types / operands / // attributes, and diff --git a/mlir/tools/mlir-tblgen/ReferenceImplGen.cpp b/mlir/tools/mlir-tblgen/ReferenceImplGen.cpp index 3e6893a23d3..9181d0e90ed 100644 --- a/mlir/tools/mlir-tblgen/ReferenceImplGen.cpp +++ b/mlir/tools/mlir-tblgen/ReferenceImplGen.cpp @@ -87,7 +87,7 @@ static void emitReferenceImplementations(const RecordKeeper &recordKeeper, static mlir::GenRegistration genRegister("gen-reference-implementations", - "Generate reference implemenations", + "Generate reference implementations", [](const RecordKeeper &records, raw_ostream &os) { emitReferenceImplementations(records, os); return false; diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp index 7a125f50c7d..bed6b0423d1 100644 --- a/mlir/tools/mlir-tblgen/RewriterGen.cpp +++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp @@ -163,7 +163,7 @@ private: raw_ostream &os; - // Format contexts containing placeholder substitutations. + // Format contexts containing placeholder substitutions. FmtContext fmtCtx; // Number of op processed. @@ -313,7 +313,7 @@ void PatternEmitter::emitAttributeMatch(DagNode tree, int index, int depth, << ";\n"; } else if (attr.isOptional()) { // For a missing attribute that is optional according to definition, we - // should just capature a mlir::Attribute() to signal the missing state. + // should just capture a mlir::Attribute() to signal the missing state. // That is precisely what getAttr() returns on missing attributes. } else { os.indent(indent) << "if (!tblgen_attr) return matchFailure();\n"; |