This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Update SPIR-V docs with information about utilities to convert to SPIR-V
ClosedPublic

Authored by mravishankar on Jan 2 2020, 3:52 PM.

Details

Summary

Add information about

  • SPIRVTypeConverter
  • SPIRVOpLowering
  • Utility functions used in lowering to SPIR-V dialect.

Diff Detail

Event Timeline

mravishankar created this revision.Jan 2 2020, 3:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 2 2020, 3:52 PM

Unit tests: pass. 61175 tests passed, 0 failed and 729 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

antiagainst requested changes to this revision.Jan 3 2020, 12:27 PM

Nice! Just a few nits.

mlir/docs/Dialects/SPIR-V.md
849

s/class/classes/

851

While SPIR-V has general validation rules, additional rules are imposed by the Vulkan execution environment. The lowering ... implements both sets of requirements.

879

SPIRVOpLowering is a base class ... can be used to define the patterns for ...

888

with spv._address_of to get ...

889

The method ... creates a spv.globalVariable ..., and then returns such a SSA value generated from spv._addresss_of.

900

Move this section as the first one? It's the most important one and sets the background for others.

921

A module ...

923

A function ...

1160
1163

Similarly use https://mlir.llvm.org/docs/LangRef/ here and other markdown files

1191

Can we also point to the chunked doc here? The monolithic one is super slow to load.

This revision now requires changes to proceed.Jan 3 2020, 12:27 PM
mravishankar marked 8 inline comments as done.
mravishankar edited the summary of this revision. (Show Details)

Addressing comments from antiagainst

mravishankar marked 4 inline comments as done.Jan 3 2020, 4:58 PM
mravishankar added inline comments.
mlir/docs/Dialects/SPIR-V.md
888

I think "used to get" is better...

1160

Updated to use relative paths.

1163

Updated to use relative paths.

mravishankar marked an inline comment as done.

Adding link to chunked Vulkan Spec pages.

mravishankar marked an inline comment as done.Jan 3 2020, 5:01 PM
mravishankar marked an inline comment as done.

Unit tests: pass. 61238 tests passed, 0 failed and 729 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Unit tests: pass. 61238 tests passed, 0 failed and 729 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

antiagainst accepted this revision.Jan 4 2020, 2:48 PM

Thanks!

This revision is now accepted and ready to land.Jan 4 2020, 2:48 PM