[PATCH] D72256: [mlir][spirv] Properly support SPIR-V conversion target
Ben Vanik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 13:47:14 PST 2020
benvanik accepted this revision.
benvanik added inline comments.
This revision is now accepted and ready to land.
Herald added a subscriber: liufengdb.
================
Comment at: mlir/test/Dialect/SPIRV/target-env.mlir:22
+// Version: 1.0 (0), 1.1 (1), 1.2 (2), 1.3 (3), 1.4 (4)
+// Capability: Kernel (6), AtomicStorage (21), GroupNonUniformBallot (64),
+// SubgroupBallotKHR (4423)
----------------
I think I get why the capability needs to be an int (as you wouldn't know the encoding of unknown capabilities in the compiler otherwise), but to improve the readability of the MLIR what about adding comments on the spv.target_env printer like `capabilities = [6, 7]} // ["Foo", "Bar"]` for known ones? Would help for those of us who may want to ensure the IR is referencing the right caps but don't have the IDs memorized :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72256/new/
https://reviews.llvm.org/D72256
More information about the llvm-commits
mailing list