[all-commits] [llvm/llvm-project] e115a4: [mlir][spirv] Use separate attribute for (version, ...
Lei Zhang via All-commits
all-commits at lists.llvm.org
Thu Mar 12 16:39:44 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: e115a40f5020b188c01ecfd435b02e7e46393b0d
https://github.com/llvm/llvm-project/commit/e115a40f5020b188c01ecfd435b02e7e46393b0d
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M mlir/docs/Dialects/SPIR-V.md
M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
M mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
M mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
M mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir
M mlir/test/Dialect/SPIRV/availability.mlir
M mlir/test/Dialect/SPIRV/target-and-abi.mlir
M mlir/test/Dialect/SPIRV/target-env.mlir
Log Message:
-----------
[mlir][spirv] Use separate attribute for (version, capabilities, extensions)
We also need the (version, capabilities, extensions) triple on the
spv.module op. Thus far we have been using separate 'extensions'
and 'capabilities' attributes there and 'version' is missing. Creating
a separate attribute for the trip allows us to reuse the assembly
form and verification.
Differential Revision: https://reviews.llvm.org/D75868
Commit: 66c378d66e93b67c71aaf99974577f2bd72f336e
https://github.com/llvm/llvm-project/commit/66c378d66e93b67c71aaf99974577f2bd72f336e
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M mlir/docs/Dialects/SPIR-V.md
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
M mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
Log Message:
-----------
[mlir][spirv] Use larger range for target environment lookup function
Previously we only look at the directly passed-in op for a potential
spv.target_env attribute. This commit switches to use a larger range
and recursively check enclosing symbol tables.
Differential Revision: https://reviews.llvm.org/D75869
Commit: 9414db10906a845e8e485a22102440833d131e48
https://github.com/llvm/llvm-project/commit/9414db10906a845e8e485a22102440833d131e48
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/Passes.h
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
M mlir/include/mlir/InitAllPasses.h
M mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
A mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
A mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
Log Message:
-----------
[mlir][spirv] Add a pass to deduce version/extension/capability
Creates an operation pass that deduces and attaches the minimal version/
capabilities/extensions requirements for spv.module ops.
For each spv.module op, this pass requires a `spv.target_env` attribute on
it or an enclosing module-like op to drive the deduction. The reason is
that an op can be enabled by multiple extensions/capabilities. So we need
to know which one to pick. `spv.target_env` gives the hard limit as for
what the target environment can support; this pass deduces what are
actually needed for a specific spv.module op.
Differential Revision: https://reviews.llvm.org/D75870
Commit: c818c3cc96ec0894fc08e490a74066da57f7b6d3
https://github.com/llvm/llvm-project/commit/c818c3cc96ec0894fc08e490a74066da57f7b6d3
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
A mlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h
M mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
M mlir/lib/Dialect/SPIRV/CMakeLists.txt
A mlir/lib/Dialect/SPIRV/SPIRVAttributes.cpp
M mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
Log Message:
-----------
[mlir][spirv] NFC: put SPIR-V attributes in separate files
Differential Revision: https://reviews.llvm.org/D75871
Commit: 3148f10b1791e3227e194b1c974bb3e83a1c4d0e
https://github.com/llvm/llvm-project/commit/3148f10b1791e3227e194b1c974bb3e83a1c4d0e
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
M mlir/include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h
M mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
M mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
M mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
M mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
M mlir/lib/Dialect/SPIRV/Serialization/SPIRVBinaryUtils.cpp
M mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
M mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
M mlir/test/Conversion/GPUToSPIRV/builtins.mlir
M mlir/test/Conversion/GPUToSPIRV/load-store.mlir
M mlir/test/Conversion/GPUToSPIRV/simple.mlir
M mlir/test/Conversion/GPUToVulkan/lower-gpu-launch-vulkan-launch.mlir
M mlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/array.mlir
M mlir/test/Dialect/SPIRV/Serialization/atomic-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/barrier.mlir
M mlir/test/Dialect/SPIRV/Serialization/bit-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/composite-op.mlir
M mlir/test/Dialect/SPIRV/Serialization/constant.mlir
M mlir/test/Dialect/SPIRV/Serialization/entry-point.mlir
M mlir/test/Dialect/SPIRV/Serialization/execution-mode.mlir
M mlir/test/Dialect/SPIRV/Serialization/function-call.mlir
M mlir/test/Dialect/SPIRV/Serialization/global-variable.mlir
M mlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/group-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/logical-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/loop.mlir
M mlir/test/Dialect/SPIRV/Serialization/memory-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/module.mlir
M mlir/test/Dialect/SPIRV/Serialization/non-uniform-ops.mlir
M mlir/test/Dialect/SPIRV/Serialization/phi.mlir
M mlir/test/Dialect/SPIRV/Serialization/selection.mlir
M mlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
M mlir/test/Dialect/SPIRV/Serialization/struct.mlir
M mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
M mlir/test/Dialect/SPIRV/Serialization/undef.mlir
M mlir/test/Dialect/SPIRV/Transforms/abi-load-store.mlir
M mlir/test/Dialect/SPIRV/Transforms/abi-simple.mlir
M mlir/test/Dialect/SPIRV/Transforms/inlining.mlir
M mlir/test/Dialect/SPIRV/Transforms/layout-decoration.mlir
M mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
M mlir/test/Dialect/SPIRV/availability.mlir
M mlir/test/Dialect/SPIRV/control-flow-ops.mlir
M mlir/test/Dialect/SPIRV/ops.mlir
M mlir/test/Dialect/SPIRV/structure-ops.mlir
M mlir/test/Dialect/SPIRV/target-env.mlir
M mlir/test/mlir-vulkan-runner/addf.mlir
M mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
Log Message:
-----------
[mlir][spirv] Use spv.vce in spv.module and wire up (de)serialization
This commits changes the definition of spv.module to use the #spv.vce
attribute for specifying (version, capabilities, extensions) triple
so that we can have better API and custom assembly form. Since now
we have proper modelling of the triple, (de)serialization is wired up
to use them.
With the new UpdateVCEPass, we don't need to manually specify the
required extensions and capabilities anymore when creating a spv.module.
One just need to call UpdateVCEPass before serialization to get the
needed version/extensions/capabilities.
Differential Revision: https://reviews.llvm.org/D75872
Commit: 2ae5e472e6427795ce0efc727f3dc616c912856b
https://github.com/llvm/llvm-project/commit/2ae5e472e6427795ce0efc727f3dc616c912856b
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/SPIRVAvailability.td
M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
Log Message:
-----------
[mlir][spirv] Use SmallVector<ArrayRef> for availability queries
Previously extensions and capabilities requirements are returned as
SmallVector<SmallVector>. It's an anti-pattern; this commit improves
a bit by returning as SmallVector<ArrayRef>. This is possible because
the internal sequence is always known statically (from the spec)
so that we can use a static constant array for it and get an ArrayRef.
Differential Revision: https://reviews.llvm.org/D75874
Commit: e5c85a5a4ffaa0ff55f6d1d80a4e47f96ec0b9de
https://github.com/llvm/llvm-project/commit/e5c85a5a4ffaa0ff55f6d1d80a4e47f96ec0b9de
Author: Lei Zhang <antiagainst at google.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
M mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
M mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
M mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
M mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
Log Message:
-----------
[mlir][spirv] Support querying type extension/capability requirements
Previously we only consider the version/capability/extension requirements
on ops themselves. Some types in SPIR-V also require special extensions
or capabilities to be used. For example, non-32-bit integers/floats
will require different capabilities and/or extensions depending on
where they are used because it may mean special hardware abilities.
This commit adds query methods to SPIR-V type class hierarchy to support
querying extensions and capabilities. We don't go through ODS for
auto-generating such information given that we don't have them in
SPIR-V machine readable grammar and there are just a few types.
Differential Revision: https://reviews.llvm.org/D75875
Compare: https://github.com/llvm/llvm-project/compare/69ce2fd2dfd9...e5c85a5a4ffa
More information about the All-commits
mailing list