[PATCH] D74270: [mlir][GPUToSPIRV] Modify the lowering of gpu.block_dim to be consistent with Vulkan SPEC
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 8 18:24:06 PST 2020
mravishankar marked an inline comment as done.
mravishankar added inline comments.
================
Comment at: mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp:257
-template <typename SourceOp, spirv::BuiltIn builtin>
-PatternMatchResult LaunchConfigConversion<SourceOp, builtin>::matchAndRewrite(
- SourceOp op, ArrayRef<Value> operands,
- ConversionPatternRewriter &rewriter) const {
- auto dimAttr =
- op.getOperation()->template getAttrOfType<StringAttr>("dimension");
+static Optional<int32_t> getIndexForLaunchConfigOp(Operation *op) {
+ auto dimAttr = op->getAttrOfType<StringAttr>("dimension");
----------------
antiagainst wrote:
> Nit: getLaunchConfigIndex ? This actually does not check what the op is; it's just querying the launch configuration index.
Are you saying it should. It just returns {} if it doesnt find the right attribute and attribute value.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74270/new/
https://reviews.llvm.org/D74270
More information about the llvm-commits
mailing list