This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Simplify scalar type size calculation.
ClosedPublic

Authored by denis13 on Jan 19 2020, 6:52 AM.

Details

Summary

Simplify scalar type size calculation and handle boolean types.

Diff Detail

Event Timeline

denis13 created this revision.Jan 19 2020, 6:52 AM

Unit tests: pass. 62001 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: pass.

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

antiagainst added inline comments.Jan 21 2020, 7:42 AM
mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir
297

Hmm, we cannot have bool type in externally visible storage classes: https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#OpTypeBool.

This is something that should be fixed. Could you just change to reject memref of booleans for now?

denis13 updated this revision to Diff 239332.Jan 21 2020, 8:27 AM

Addressed review comments.

@antiagainst thanks for mention this, fixed!

Unit tests: pass. 62001 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: pass.

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

antiagainst accepted this revision.Jan 21 2020, 8:43 AM

Thanks!

This revision is now accepted and ready to land.Jan 21 2020, 8:43 AM
This revision was automatically updated to reflect the committed changes.