[PATCH] D80766: [mlir][gpu] Fix logic error in D79508 computing number of private attributions.
Stephan Herhut via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 11:53:05 PDT 2020
herhut added inline comments.
================
Comment at: mlir/lib/Dialect/GPU/IR/GPUDialect.cpp:678-679
+ // wraps around within unsigned type.
+ int64_t numFuncArguments = getNumArguments();
+ int64_t numWorkgroupAttributions = getNumWorkgroupAttributions();
+ int64_t numPrivateAttributions = getNumPrivateAttributions();
----------------
This produces error messages that are not overly helpful. I would verify this is follows. We need at least `getNumArguments()` + `getNumWorkgroupAttributions()` many operands, as otherwise there are not enough. The `getNumPrivateAttributions()` does not need to be verified, as it is computed as the remaining operands that are left over.
So the only error case is when we do not have enough operands to satisfy function arguments and workgroup attributions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80766/new/
https://reviews.llvm.org/D80766
More information about the llvm-commits
mailing list