[PATCH] D79508: [mlir][gpu] Refactor functions for workgroup and private buffer attributions.
Wen-Heng (Jack) Chung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 07:54:15 PDT 2020
whchung marked 3 inline comments as done.
whchung added inline comments.
================
Comment at: mlir/include/mlir/Dialect/GPU/GPUOps.td:233
+ // private memory.
+ BlockArgument addPrivateAttribution(Type type) {
+ auto attrName = getNumPrivateAttributionsAttrName();
----------------
herhut wrote:
> It is not clear to me why we have two versions of this function. While you have not caused this, could you clean it up and unify them? One could implement `addWorkgroupAttribution(ArrayRef<int64_t> shape, Type elementType)` by means of `BlockArgument addWorkgroupAttribution(Type type)`.
>
> I see only one use of the former form in `MemoryPromotion`. Changing that use to the type based one and removing the shape/elementType versions would be best.
>
> Also, both of these could be implemented in the cpp file and only be declared here.
@herhut I was somewhat puzzled by the two versions of interfaces too. I've revised the patch so we we consolidate the interfaces. Could you help conduct another round of review? Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79508/new/
https://reviews.llvm.org/D79508
More information about the llvm-commits
mailing list