[PATCH] D73491: [mlir][spirv] Add GroupNonUniform arithmetic operations.

Denis Khalikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 03:27:56 PST 2020


denis13 marked an inline comment as done.
denis13 added inline comments.


================
Comment at: mlir/lib/Dialect/SPIRV/SPIRVOps.cpp:631
+          << stringifyScope(static_cast<spirv::Scope>(
+                 groupOp->getAttrOfType<IntegerAttr>(kExecutionScopeAttrName)
+                     .getInt()))
----------------
mravishankar wrote:
> One suggestion is to make this a templated method (templated on OpTy). Then you could use ".execution_scope()" and ".group_operation()" to get the attribute values
@mravishankar @antiagainst  I agree that templated methods look more readable, but on the other hand for each GroupNonUniform arithmetic operation will be created 3 methods with only one difference - function signature. They will implement the same logic and code.  Also I was looking on the other parser/printer/verifier functions for operations from the same category, for example `cast op`, and they use Operation* as function parameter, what do you think? Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73491/new/

https://reviews.llvm.org/D73491





More information about the llvm-commits mailing list