This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][SPIRVToLLVM] Documentation for SPIR-V to LLVM conversion
ClosedPublic

Authored by georgemitenkov on Jul 7 2020, 9:43 AM.

Details

Summary

This patch adds documentation for SPIR-V to LLVM conversion. It describes the approaches taken and what is currently supported by this conversion framework.

Diff Detail

Event Timeline

georgemitenkov created this revision.Jul 7 2020, 9:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2020, 9:43 AM
georgemitenkov edited the summary of this revision. (Show Details)Jul 7 2020, 9:44 AM
antiagainst requested changes to this revision.Jul 15 2020, 8:47 AM

This is awesome doc! Thanks George!

mlir/docs/SPIRVToLLVMDialectConversion.md
44

A SPIR-V pointer ..

48

Shorten this line?

74

... one would place struct members explicitly at particular offsets.

91

I think we want to use <some-spirv> -> <some-llvm> instead of put the llvm part in comment.

101

Let's call them as "not implemented". There is a difference between not implemented at the moment vs. it will never be supported.

120

And empty line before the table?

169

Bitfield ops??

215

s/safe/permitted/

326

s/supported/possible/

358

I think we will eventually have a dedicated ## section for control flow ops. But it's fine to be here for now given it's empty at the moment. :)

384

I think this can be a ## section ?

434

This should be ### .

450

... This is correct because in SPIR-V, like LLVM, how to interpret an integer number is also dictated by the opcode. But in reality hardware implementation might show unexpected behavior..

462

Might want to make this as ##.

539

Not implemented

This should be part of the operation section and be a ### header?

This revision now requires changes to proceed.Jul 15 2020, 8:47 AM

Drive by to say that documentation work is very appreciated, thanks!

georgemitenkov marked 15 inline comments as done.

Addressed comments. Also restructured ops section so that there are the following groups:

  • ops
  • control flow
  • decorations
  • function
  • GLSL set
  • module
antiagainst accepted this revision.Jul 16 2020, 3:06 PM

Awesome!

This revision is now accepted and ready to land.Jul 16 2020, 3:06 PM
This revision was automatically updated to reflect the committed changes.