================
@@ -4554,6 +4679,25 @@ static std::optional<int64_t> extractConstInteger(Value 
value) {
   return std::nullopt;
 }
 
+static uint64_t getTypeByteSize(mlir::Type type, const DataLayout &dl) {
+  uint64_t sizeInBits = dl.getTypeSizeInBits(type);
+  uint64_t sizeInBytes = sizeInBits / 8;
+  return sizeInBytes;
+}
+
+template <typename OpTy>
+static uint64_t getReductionDataSize(OpTy &op) {
+  if (op.getNumReductionVars() > 0) {
+    assert(op.getNumReductionVars() &&
----------------
skatrak wrote:

Is the condition for the assert correct? By looking at the message, it seems 
like this is what it should check instead:
```suggestion
    assert(op.getNumReductionVars() == 1 &&
```

https://github.com/llvm/llvm-project/pull/133310
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to