[all-commits] [llvm/llvm-project] e672f5: [mlir][spirv] Add a field for client API in target...

Lei Zhang via All-commits all-commits at lists.llvm.org
Fri Nov 25 13:38:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e672f5126fcfca650534ee5fd81425df36c76eb6
      https://github.com/llvm/llvm-project/commit/e672f5126fcfca650534ee5fd81425df36c76eb6
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
    M mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp
    M mlir/lib/Dialect/SPIRV/IR/TargetAndABI.cpp
    M mlir/test/Dialect/SPIRV/IR/target-and-abi.mlir

  Log Message:
  -----------
  [mlir][spirv] Add a field for client API in target environment

SPIR-V can be directly consumed by APIs like Vulkan and OpenCL,
where we can use the capability list to diffferentiate. It can
also be used as a compilation target to transcompile to shading
languages like WGSL to target WebGPU. We have no way to tell
that with just the capability list, so we cannot perform certain
transformations only applicable to those targets thus far. So
this commit add a field in the target environment to indicate
the client API for such purposes.

Reviewed By: kuhar

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




More information about the All-commits mailing list