[mlir][spirv] Fix links in docs and update dialect docs

Summary:
This commit fixes links to code directories and uses doc links on
mlir.llvm.org where possible. The docs in TableGen dialect definition
is also updated to reflect recent developments.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D72051
This commit is contained in:
Lei Zhang 2020-01-01 22:39:28 -05:00
parent 45765c52bc
commit 5d38b2610f
2 changed files with 28 additions and 26 deletions

View File

@ -480,7 +480,7 @@ we can have
```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 @@ custom types.
[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 @@ custom types.
[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/

View File

@ -25,22 +25,24 @@ include "mlir/Dialect/SPIRV/SPIRVAvailability.td"
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 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.
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.
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";