[Mlir-commits] [mlir] 76e79b0 - Fix duplicate mapping detection in gpu::setMappingAttr() (#77499)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 20 01:54:04 PST 2024


Author: Thomas Preud'homme
Date: 2024-02-20T09:54:00Z
New Revision: 76e79b0bef6c547e74b0c5e5900e41b44eb2a2f8

URL: https://github.com/llvm/llvm-project/commit/76e79b0bef6c547e74b0c5e5900e41b44eb2a2f8
DIFF: https://github.com/llvm/llvm-project/commit/76e79b0bef6c547e74b0c5e5900e41b44eb2a2f8.diff

LOG: Fix duplicate mapping detection in gpu::setMappingAttr() (#77499)

Added: 
    

Modified: 
    mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp b/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
index 72e0ebc132e862..9d398998dd63bd 100644
--- a/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
@@ -41,6 +41,7 @@ gpu::setMappingAttr(ParallelOp ploopOp,
         specifiedMappings.count(processor))
       return ploopOp.emitError(
           "invalid mapping multiple loops to same processor");
+    specifiedMappings.insert(processor);
   }
   ArrayRef<Attribute> mappingAsAttrs(mapping.data(), mapping.size());
   ploopOp->setAttr(getMappingAttrName(),


        


More information about the Mlir-commits mailing list