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 @@ -92,7 +92,7 @@ }; /// An attribute that specifies the target version, allowed extensions and -/// capabilities, and resource limits. These information describles a SPIR-V +/// capabilities, and resource limits. These information describes a SPIR-V /// target environment. class TargetEnvAttr : public Attribute::AttrBase createStripDebugInfoPass(); -/// Creates a pass which prints the list of ops and the number of occurences in +/// Creates a pass which prints the list of ops and the number of occurrences in /// the module. std::unique_ptr> createPrintOpStatsPass(); diff --git a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp --- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp +++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp @@ -258,7 +258,7 @@ return value; } -/// Emit instructions that correspond to computing the maximum value amoung the +/// Emit instructions that correspond to computing the maximum value among the /// values of a (potentially) multi-output affine map applied to `operands`. static Value lowerAffineMapMax(OpBuilder &builder, Location loc, AffineMap map, ValueRange operands) { @@ -267,7 +267,7 @@ return nullptr; } -/// Emit instructions that correspond to computing the minimum value amoung the +/// Emit instructions that correspond to computing the minimum value among the /// values of a (potentially) multi-output affine map applied to `operands`. static Value lowerAffineMapMin(OpBuilder &builder, Location loc, AffineMap map, ValueRange operands) { diff --git a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp --- a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp +++ b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp @@ -69,7 +69,7 @@ /// This is separate because in Vulkan workgroup size is exposed to shaders via /// a constant with WorkgroupSize decoration. So here we cannot generate a -/// builtin variable; instead the infromation in the `spv.entry_point_abi` +/// builtin variable; instead the information in the `spv.entry_point_abi` /// attribute on the surrounding FuncOp is used to replace the gpu::BlockDimOp. class WorkGroupSizeConversion : public SPIRVOpLowering { public: diff --git a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp --- a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp +++ b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp @@ -48,7 +48,7 @@ LogicalResult createBinaryShader(ModuleOp module, std::vector &binaryShader); - /// Converts the given `luanchOp` to vulkan launch call. + /// Converts the given `launchOp` to vulkan launch call. void convertGpuLaunchFunc(gpu::LaunchFuncOp launchOp); /// Checks where the given type is supported by Vulkan runtime. diff --git a/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp b/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp --- a/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp +++ b/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp @@ -70,7 +70,7 @@ if (!genericOp.hasBufferSemantics()) return llvm::None; - // Make sure this is reudction with one input and one output. + // Make sure this is reduction with one input and one output. if (genericOp.args_in().getZExtValue() != 1 || genericOp.args_out().getZExtValue() != 1) return llvm::None; diff --git a/mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp b/mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp --- a/mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp +++ b/mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp @@ -301,8 +301,8 @@ // A loop is constructed with an empty "yield" terminator by default. // Replace it with another "yield" that forwards the results of the nested // loop to the parent loop. We need to explicitly make sure the new - // terminator is the last operation in the block because further transfoms - // rely on this. + // terminator is the last operation in the block because further + // transforms rely on this. rewriter.setInsertionPointToEnd(rewriter.getInsertionBlock()); rewriter.replaceOpWithNewOp( rewriter.getInsertionBlock()->getTerminator(), forOp.getResults()); diff --git a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp --- a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp +++ b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp @@ -624,7 +624,7 @@ // If there was also a bound, insert that, too. // TODO(herhut): Check that we do not assign bounds twice. if (annotation.bound().getValue()) { - // We pass as the single opererand to the bound-map the number of + // We pass as the single operand to the bound-map the number of // iterations, which is (upperBound - lowerBound) ceilDiv step. To // support inner loops with dynamic upper bounds (as generated by e.g. // tiling), try to derive a max for the bounds. If the used bound for @@ -774,7 +774,7 @@ // Now walk over the body and clone it. // TODO: This is only correct if there either is no further loop.parallel // nested or this code is side-effect free. Otherwise we might need - // predication. We are overly consertaive for now and only allow + // predication. We are overly conservative for now and only allow // side-effects in the innermost scope. if (auto nestedParallel = dyn_cast(op)) { // Before entering a nested scope, make sure there have been no diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp --- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp +++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp @@ -2136,7 +2136,7 @@ void AffineParallelOp::build(Builder *builder, OperationState &result, ArrayRef ranges) { - // Default initalize empty maps. + // Default initialize empty maps. auto lbMap = AffineMap::get(builder->getContext()); auto ubMap = AffineMap::get(builder->getContext()); // If there are ranges, set each to [0, N). diff --git a/mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp b/mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp @@ -203,7 +203,7 @@ class LinalgScopedEmitter { public: /// Returns the input value of convOp. If the indices in `imIdx` is out of - /// boundrary, returns 0 instead. + /// boundary, returns 0 instead. static ValueHandle getConvOpInput(ConvOp convOp, IndexedValueType im, ArrayRef imIdx) { // TODO(ntv): add a level of indirection to linalg.generic. @@ -234,7 +234,7 @@ ValueHandle rightBound = std_dim(convOp.input(), idx); conds.push_back(conds.back() || (dim >= rightBound)); - // When padding is involed, the indices will only be shifted to negative, + // When padding is involved, the indices will only be shifted to negative, // so having a max op is enough. auto maxMap = AffineMap::get(/*dimCount=*/1, 0, {getAffineDimExpr(/*position=*/0, context), diff --git a/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp b/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp --- a/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp @@ -751,7 +751,7 @@ if (attrKind == spirv::VerCapExtAttr::getKindName()) return parseVerCapExtAttr(parser); - parser.emitError(parser.getNameLoc(), "unknown SPIR-V attriubte kind: ") + parser.emitError(parser.getNameLoc(), "unknown SPIR-V attribute kind: ") << attrKind; return {}; } diff --git a/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp b/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp --- a/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp @@ -100,9 +100,9 @@ /// Mapping between SPIR-V storage classes to memref memory spaces. /// -/// Note: memref does not have a defined smenatics for each memory space; it +/// Note: memref does not have a defined semantics for each memory space; it /// depends on the context where it is used. There are no particular reasons -/// behind the number assigments; we try to follow NVVM conventions and largely +/// behind the number assignments; we try to follow NVVM conventions and largely /// give common storage classes a smaller number. The hope is use symbolic /// memory space representation eventually after memref supports it. // TODO(antiagainst): swap Generic and StorageBuffer assignment to be more akin @@ -239,7 +239,7 @@ // bitwidth given this is a scalar type. // TODO(antiagainst): We are unconditionally converting the bitwidth here, // this might be okay for non-interface types (i.e., types used in - // Priviate/Function storage classes), but not for interface types (i.e., + // Private/Function storage classes), but not for interface types (i.e., // types used in StorageBuffer/Uniform/PushConstant/etc. storage classes). // This is because the later actually affects the ABI contract with the // runtime. So we may want to expose a control on SPIRVTypeConverter to fail diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp --- a/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp @@ -553,11 +553,11 @@ MIN_VERSION_CASE(5); #undef MIN_VERSION_CASE default: - return emitError(unknownLoc, "unspported SPIR-V minor version: ") + return emitError(unknownLoc, "unsupported SPIR-V minor version: ") << minorVersion; } } else { - return emitError(unknownLoc, "unspported SPIR-V major version: ") + return emitError(unknownLoc, "unsupported SPIR-V major version: ") << majorVersion; } diff --git a/mlir/lib/Dialect/Traits.cpp b/mlir/lib/Dialect/Traits.cpp --- a/mlir/lib/Dialect/Traits.cpp +++ b/mlir/lib/Dialect/Traits.cpp @@ -202,7 +202,7 @@ auto rankedResults = make_filter_range( op->getResultTypes(), [](Type t) { return t.isa(); }); - // If all of the results are unranked then no further verfication. + // If all of the results are unranked then no further verification. if (rankedResults.empty()) return success(); diff --git a/mlir/lib/Dialect/Vector/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/VectorTransforms.cpp --- a/mlir/lib/Dialect/Vector/VectorTransforms.cpp +++ b/mlir/lib/Dialect/Vector/VectorTransforms.cpp @@ -270,7 +270,7 @@ // insertslice // | -// TODO(andydavis) Add the following canonicalization/simplifcation patterns: +// TODO(andydavis) Add the following canonicalization/simplification patterns: // *) Add pattern which matches InsertStridedSlice -> StridedSlice and forwards // InsertStridedSlice operand to StridedSlice. // *) Add pattern which matches SourceOp -> StridedSlice -> UserOp which checks diff --git a/mlir/lib/ExecutionEngine/RunnerUtils.cpp b/mlir/lib/ExecutionEngine/RunnerUtils.cpp --- a/mlir/lib/ExecutionEngine/RunnerUtils.cpp +++ b/mlir/lib/ExecutionEngine/RunnerUtils.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This file imlpements basic functions to debug structured MLIR types at +// This file implements basic functions to debug structured MLIR types at // runtime. Entities in this file may not be compatible with targets without a // C++ runtime. These may be progressively migrated to CRunnerUtils.cpp over // time. diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -898,7 +898,7 @@ mlir::interleaveComma(c, os, each_fn); } - /// This enum descripes the different kinds of elision for the type of an + /// This enum describes the different kinds of elision for the type of an /// attribute when printing it. enum class AttrTypeElision { /// The type must not be elided, @@ -2025,7 +2025,7 @@ state->getSSANameState().shadowRegionArgs(region, namesToUse); } - /// Print the given affine map with the smybol and dimension operands printed + /// Print the given affine map with the symbol and dimension operands printed /// inline with the map. void printAffineMapOfSSAIds(AffineMapAttr mapAttr, ValueRange operands) override; diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp --- a/mlir/lib/IR/MLIRContext.cpp +++ b/mlir/lib/IR/MLIRContext.cpp @@ -458,7 +458,7 @@ return *it->second; } -/// Returns the storage unqiuer used for constructing type storage instances. +/// Returns the storage uniquer used for constructing type storage instances. /// This should not be used directly. StorageUniquer &MLIRContext::getTypeUniquer() { return getImpl().typeUniquer; } diff --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp --- a/mlir/lib/Parser/Parser.cpp +++ b/mlir/lib/Parser/Parser.cpp @@ -2140,7 +2140,7 @@ if (parseElementAttrHexValues(p, hexStorage.getValue(), data)) return nullptr; - // Check that the size of the hex data correpsonds to the size of the type, or + // Check that the size of the hex data corresponds to the size of the type, or // a splat of the type. // TODO: bf16 is currently stored as a double, this should be removed when // APFloat properly supports it. diff --git a/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp b/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp --- a/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp +++ b/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp @@ -18,7 +18,7 @@ namespace { /// Simple pass for testing the mapping of parallel loops to hardware ids using -/// a greedy mapping stratgegy. +/// a greedy mapping strategy. class TestGpuGreedyParallelLoopMappingPass : public OperationPass { void runOnOperation() override { diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp --- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp @@ -1234,12 +1234,12 @@ Optional transformer; }; - /// Given the values of an `AllTypesMatch` trait, check for inferrable type + /// Given the values of an `AllTypesMatch` trait, check for inferable type /// resolution. void handleAllTypesMatchConstraint( ArrayRef values, llvm::StringMap &variableTyResolver); - /// Check for inferrable type resolution given all operands, and or results, + /// Check for inferable type resolution given all operands, and or results, /// have the same type. If 'includeResults' is true, the results also have the /// same type as all of the operands. void handleSameTypesConstraint( diff --git a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.h b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.h --- a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.h +++ b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.h @@ -57,7 +57,7 @@ struct DescriptorSetInfo { /// Index of a descriptor set in descriptor sets. DescriptorSetIndex descriptorSet{0}; - /// Number of desriptors in a set. + /// Number of descriptors in a set. uint32_t descriptorSize{0}; /// Type of a descriptor set. VkDescriptorType descriptorType{VK_DESCRIPTOR_TYPE_MAX_ENUM}; diff --git a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp --- a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp +++ b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp @@ -138,7 +138,7 @@ // For each descriptor set. for (auto &deviceMemoryBufferMapPair : deviceMemoryBufferMap) { auto &deviceMemoryBuffers = deviceMemoryBufferMapPair.second; - // For each descirptor binding. + // For each descriptor binding. for (auto &memoryBuffer : deviceMemoryBuffers) { vkFreeMemory(device, memoryBuffer.deviceMemory, nullptr); vkDestroyBuffer(device, memoryBuffer.buffer, nullptr); @@ -254,14 +254,14 @@ if (failed(getBestComputeQueue())) return failure(); - const float queuePrioritory = 1.0f; + const float queuePriority = 1.0f; VkDeviceQueueCreateInfo deviceQueueCreateInfo = {}; deviceQueueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; deviceQueueCreateInfo.pNext = nullptr; deviceQueueCreateInfo.flags = 0; deviceQueueCreateInfo.queueFamilyIndex = queueFamilyIndex; deviceQueueCreateInfo.queueCount = 1; - deviceQueueCreateInfo.pQueuePriorities = &queuePrioritory; + deviceQueueCreateInfo.pQueuePriorities = &queuePriority; // Structure specifying parameters of a newly created device. VkDeviceCreateInfo deviceCreateInfo = {}; @@ -599,7 +599,7 @@ LogicalResult VulkanRuntime::allocateDescriptorSets() { VkDescriptorSetAllocateInfo descriptorSetAllocateInfo = {}; - // Size of desciptor sets and descriptor layout sets is the same. + // Size of descriptor sets and descriptor layout sets is the same. descriptorSets.resize(descriptorSetLayouts.size()); descriptorSetAllocateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; @@ -631,7 +631,7 @@ VkWriteDescriptorSet wSet = {}; wSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; wSet.pNext = nullptr; - // Descirptor set. + // Descriptor set. wSet.dstSet = *descriptorSetIt; wSet.dstBinding = memoryBuffer.bindingIndex; wSet.dstArrayElement = 0;