[all-commits] [llvm/llvm-project] 47c6ab: [mlir][spirv] Properly support SPIR-V conversion t...
Lei Zhang via All-commits
all-commits at lists.llvm.org
Tue Jan 14 16:19:06 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 47c6ab2b97773ee5fb360fc093a5824be64b8c68
https://github.com/llvm/llvm-project/commit/47c6ab2b97773ee5fb360fc093a5824be64b8c68
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-01-14 (Tue, 14 Jan 2020)
Changed paths:
M mlir/docs/Dialects/SPIR-V.md
M mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.td
M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
M mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
M mlir/test/Dialect/SPIRV/TestAvailability.cpp
M mlir/test/Dialect/SPIRV/target-and-abi.mlir
A mlir/test/Dialect/SPIRV/target-env.mlir
Log Message:
-----------
[mlir][spirv] Properly support SPIR-V conversion target
This commit defines a new SPIR-V dialect attribute for specifying
a SPIR-V target environment. It is a dictionary attribute containing
the SPIR-V version, supported extension list, and allowed capability
list. A SPIRVConversionTarget subclass is created to take in the
target environment and sets proper dynmaically legal ops by querying
the op availability interface of SPIR-V ops to make sure they are
available in the specified target environment. All existing conversions
targeting SPIR-V is changed to use this SPIRVConversionTarget. It
probes whether the input IR has a `spv.target_env` attribute,
otherwise, it uses the default target environment: SPIR-V 1.0 with
Shader capability and no extra extensions.
Differential Revision: https://reviews.llvm.org/D72256
More information about the All-commits
mailing list