[PATCH] D72051: [mlir][spirv] Fix links in docs and update dialect docs
Lei Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 1 19:40:53 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5d38b2610f58: [mlir][spirv] Fix links in docs and update dialect docs (authored by antiagainst).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72051/new/
https://reviews.llvm.org/D72051
Files:
mlir/docs/Dialects/SPIR-V.md
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Index: mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
===================================================================
--- mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
+++ mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
@@ -25,22 +25,24 @@
def SPV_Dialect : Dialect {
let name = "spv";
+ let summary = "The SPIR-V dialect in MLIR.";
+
let description = [{
- The SPIR-V dialect in MLIR.
-
- SPIR-V is the Khronos Group's binary intermediate language for representing
- graphical-shader stages and compute kernels for multiple Khronos APIs,
- including OpenCL, OpenGL, and Vulkan.
- See https://www.khronos.org/registry/spir-v for more details.
-
- This dialect aims to be a simple proxy for the SPIR-V binary format to
- enable straightforward and lightweight conversion from/to the binary
- format. Ops in this dialect should stay at the same semantic level and
- try to be a mechanical mapping to the corresponding SPIR-V instructions;
- but they may deviate representationally to allow using MLIR mechanisms.
- As a convention, if such deviation happens, the op name follows "snake_case"
- style; otherwise, the op name just follows the SPIR-V mnemonic (by removing
- the leading `Op` prefix) to use "CamelCase" style.
+ SPIR-V is a binary intermediate language for representing graphical-shader
+ stages and compute kernels for multiple Khronos APIs, including OpenCL,
+ OpenGL, and Vulkan.
+ See https://www.khronos.org/registry/spir-v for more details regarding
+ SPIR-V itself.
+
+ The SPIR-V dialect aims to be a proper compiler intermediate representation
+ to faciliate transformations. Ops in this dialect stay at the same semantic
+ level as the SPIR-V specification and try to have one-to-one mapping to the
+ corresponding SPIR-V instructions; but they may deviate representationally
+ to utilize MLIR mechanisms if it results in better representation and thus
+ benefits transformations. The dialect also aims to maintain straightforward
+ serialization into and deserialization from the SPIR-V binary format.
+ See https://mlir.llvm.org/docs/Dialects/SPIR-V/ for more details regarding
+ high-level designs and implementation structures of the SPIR-V dialect.
}];
let cppNamespace = "spirv";
Index: mlir/docs/Dialects/SPIR-V.md
===================================================================
--- mlir/docs/Dialects/SPIR-V.md
+++ mlir/docs/Dialects/SPIR-V.md
@@ -480,7 +480,7 @@
```mlir
%1 = "spv.GLSL.Log"(%cst) : (f32) -> (f32)
-%2 = "spv.GLSL.Sqrt(%cst) : (f32) -> (f32)
+%2 = "spv.GLSL.Sqrt"(%cst) : (f32) -> (f32)
```
## Control Flow
@@ -1059,17 +1059,17 @@
[RuntimeArrayType]: https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#OpTypeRuntimeArray
[StructType]: https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#Structure
[SpirvTools]: https://github.com/KhronosGroup/SPIRV-Tools
-[Rationale]: https://github.com/llvm/llvm-project/blob/master/mlir/docs/Rationale.md#block-arguments-vs-phi-nodes
-[ODS]: https://github.com/llvm/llvm-project/blob/master/mlir/docs/OpDefinitions.md
+[Rationale]: https://mlir.llvm.org/docs/Rationale/#block-arguments-vs-phi-nodes
+[ODS]: https://mlir.llvm.org/docs/OpDefinitions/
[GreedyPatternRewriter]: https://github.com/llvm/llvm-project/blob/master/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
-[MlirSpirvHeaders]: https://github.com/tensorflow/mlir/tree/master/include/mlir/Dialect/SPIRV
-[MlirSpirvLibs]: https://github.com/tensorflow/mlir/tree/master/lib/Dialect/SPIRV
-[MlirSpirvTests]: https://github.com/tensorflow/mlir/tree/master/test/Dialect/SPIRV
-[MlirSpirvUnittests]: https://github.com/tensorflow/mlir/tree/master/unittests/Dialect/SPIRV
-[MlirGpuToSpirvHeaders]: https://github.com/tensorflow/mlir/tree/master/include/mlir/Conversion/GPUToSPIRV
-[MlirGpuToSpirvLibs]: https://github.com/tensorflow/mlir/tree/master/lib/Conversion/GPUToSPIRV
-[MlirStdToSpirvHeaders]: https://github.com/tensorflow/mlir/tree/master/include/mlir/Conversion/StandardToSPIRV
-[MlirStdToSpirvLibs]: https://github.com/tensorflow/mlir/tree/master/lib/Conversion/StandardToSPIRV
+[MlirSpirvHeaders]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Dialect/SPIRV
+[MlirSpirvLibs]: https://github.com/llvm/llvm-project/tree/master/mlir/lib/Dialect/SPIRV
+[MlirSpirvTests]: https://github.com/llvm/llvm-project/tree/master/mlir/test/Dialect/SPIRV
+[MlirSpirvUnittests]: https://github.com/llvm/llvm-project/tree/master/mlir/unittests/Dialect/SPIRV
+[MlirGpuToSpirvHeaders]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Conversion/GPUToSPIRV
+[MlirGpuToSpirvLibs]: https://github.com/llvm/llvm-project/tree/master/mlir/lib/Conversion/GPUToSPIRV
+[MlirStdToSpirvHeaders]: https://github.com/llvm/llvm-project/tree/master/mlir/include/mlir/Conversion/StandardToSPIRV
+[MlirStdToSpirvLibs]: https://github.com/llvm/llvm-project/tree/master/mlir/lib/Conversion/StandardToSPIRV
[MlirSpirvDialect]: https://github.com/llvm/llvm-project/blob/master/mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
[MlirSpirvTypes]: https://github.com/llvm/llvm-project/blob/master/mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
[MlirSpirvOpsH]: https://github.com/llvm/llvm-project/blob/master/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
@@ -1083,4 +1083,4 @@
[GitHubLoweringTracking]: https://github.com/tensorflow/mlir/issues/303
[GenSpirvUtilsPy]: https://github.com/llvm/llvm-project/blob/master/mlir/utils/spirv/gen_spirv_dialect.py
[LlvmMlirSpirvDoc]: https://mlir.llvm.org/docs/Dialects/SPIRVOps/
-[CustomTypeAttrTutorial]: https://github.com/llvm/llvm-project/blob/master/mlir/docs/DefiningAttributesAndTypes.md
+[CustomTypeAttrTutorial]: https://mlir.llvm.org/docs/DefiningAttributesAndTypes/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72051.235814.patch
Type: text/x-patch
Size: 5817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200102/b5e7ce2f/attachment.bin>
More information about the llvm-commits
mailing list