llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.43k stars 11.75k forks source link

[mlir][spirv] Update the spirv dialect scripts to accept the updated spirv json schema #110016

Open kuhar opened 2 weeks ago

kuhar commented 2 weeks ago

The SPIR-V dialect has scripts to define SPIR-V ops/enums/attributes based on the SPIR-V spec in the json format: https://github.com/llvm/llvm-project/tree/main/mlir/utils/spirv .

The json schema was recently updated: https://github.com/KhronosGroup/SPIRV-Headers/pull/447. We should update the scripts to accept the new json format.

kuhar commented 2 weeks ago

cc: @llvm-beanz

llvmbot commented 2 weeks ago

@llvm/issue-subscribers-mlir-spirv

Author: Jakub Kuderski (kuhar)

The SPIR-V dialect has scripts to define SPIR-V ops/enums/attributes based on the SPIR-V spec in the json format: https://github.com/llvm/llvm-project/tree/main/mlir/utils/spirv . The json schema was recently updated: https://github.com/KhronosGroup/SPIRV-Headers/pull/447. We should update the scripts to accept the new json format.
cmarcelo commented 1 day ago

@kuhar posted https://github.com/llvm/llvm-project/pull/111778 to remove code that's not needed anymore since the grammar will have symbols de-duplicated.

As part of testing it out, ended up making also the following small fixes:

kuhar commented 1 day ago

Awesome @cmarcelo, thanks for taking care of this. I left some comments.