[all-commits] [llvm/llvm-project] 6a9701: [mlir][spirv] Add implied capabilities and availab...

Lei Zhang via All-commits all-commits at lists.llvm.org
Thu Jan 16 18:32:56 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a970135904d234039a15616481a909363b77739
      https://github.com/llvm/llvm-project/commit/6a970135904d234039a15616481a909363b77739
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [mlir][spirv] Add implied capabilities and availability for capabilities

Certain SPIR-V capabilities are only available in certain SPIR-V versions
or extensions. Also a SPIR-V capability may implicitly declares other
capabilities.

This commit updates gen_spirv_dialect.py to support generating such
information into SPIRVBase.td. It requires us to topologically sort
all capabilities because now a capability can refer to another one.

This commits also registers a few extensions because their symbols are
used by capability availability.

Note that this commit hasn't updated SPIRVConversionTarget to take
into consideration such relationship yet. That will be done in a
following-up commit.

Differential Revision: https://reviews.llvm.org/D72760


  Commit: ccedb918bb33d2190e81688186946d00aa908e44
      https://github.com/llvm/llvm-project/commit/ccedb918bb33d2190e81688186946d00aa908e44
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/utils/spirv/gen_spirv_dialect.py

  Log Message:
  -----------
  [mlir][spirv] Use symbolize functions in enum attribute predicates

By default, for an enum attribute, we will generate a list of equality
comparisons for all supported cases inside it's predicate. This list
can be fairly large for certain SPIR-V enum attributes. Instead, we
already have such a list generated by EnumsGen in the symbolize
functions. Leverage that to simplify the generated C++ code.

Differential Revision: https://reviews.llvm.org/D72763


  Commit: 961174f8787b0b7f6d9c699e71dd278b66b16c38
      https://github.com/llvm/llvm-project/commit/961174f8787b0b7f6d9c699e71dd278b66b16c38
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-01-16 (Thu, 16 Jan 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    M mlir/test/Dialect/SPIRV/availability.mlir

  Log Message:
  -----------
  [mlir][spirv] Fix SPV_MM_Vulkan extension reqirements

SPV_MM_Vulkan can be enabled by the SPV_KHR_vulkan_memory_model extension.

Differential Revision: https://reviews.llvm.org/D72764


Compare: https://github.com/llvm/llvm-project/compare/ad83bed2411f...961174f8787b


More information about the All-commits mailing list