[Mlir-commits] [mlir] 56c385c - Apply clang-tidy fixes for modernize-loop-convert in SparseGPUCodegen.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Feb 12 13:28:16 PST 2024


Author: Mehdi Amini
Date: 2024-02-12T13:27:49-08:00
New Revision: 56c385cd677bcc4f191e8c09044155159bc9bf7b

URL: https://github.com/llvm/llvm-project/commit/56c385cd677bcc4f191e8c09044155159bc9bf7b
DIFF: https://github.com/llvm/llvm-project/commit/56c385cd677bcc4f191e8c09044155159bc9bf7b.diff

LOG: Apply clang-tidy fixes for modernize-loop-convert in SparseGPUCodegen.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
index 3f352c868467fe..cdee8a46f551b8 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
@@ -77,8 +77,8 @@ static gpu::GPUFuncOp genGPUFunc(OpBuilder &builder, gpu::GPUModuleOp gpuModule,
   // Then we insert a new kernel with given arguments into the module.
   builder.setInsertionPointToStart(&gpuModule.getBodyRegion().front());
   SmallVector<Type> argsTp;
-  for (unsigned i = 0, e = args.size(); i < e; i++)
-    argsTp.push_back(args[i].getType());
+  for (auto arg : args)
+    argsTp.push_back(arg.getType());
   FunctionType type = FunctionType::get(gpuModule->getContext(), argsTp, {});
   auto gpuFunc =
       builder.create<gpu::GPUFuncOp>(gpuModule->getLoc(), kernelName, type);


        


More information about the Mlir-commits mailing list