-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SPIR-V NonSemantic.Shader.DebugInfo.200 #186
base: main
Are you sure you want to change the base?
Conversation
@baldurk hi, may I ask you to take a look? The patch adds new debug instructions, mostly for Fortran and also extends number of debug operations to match DWARF (though some of them require analog of .debug_address and hence are currently just placeholders). Initially we called the extension as NonSemantic.Kernel.DebugInfo.100 to outline it as debug information for compute and to put less pressure for other vendors to implement it. If you want - this can be restored, but TBH having a single extension looks better. |
I don't think it's a good idea to make significant revisions to this extinst set after it has been released. Generally speaking that's avoided in vulkan and SPIR-V extensions to my knowledge and I think the ecosystem impact would be hard to predict. I'd also point you to the original |
We've discussed this internally already and our current thinking is that a) it'd be better to use a non-semantic extended instruction set going forward vs. the original We're open to suggestions how best to do this. Perhaps we should do a |
In that case yes I think the best thing to do is make a new extended instruction set heavily based on this one, as this one was based on the OpenCL one. Either NonSemantic.Shader.DebugInfo.101 or NonSemantic.Shader.DebugInfo.200, whatever you think is best. Bear in mind though I don't expect the existing users of this set will update to it, so there's still going to be multiple sets in that sense (this version, any new version, and OpenCL.DebugInfo.100). |
It's based on NonSemantic.Shader.DebugInfo.100 New functionality compared to NonSemantic.Shader.DebugInfo.100 New instructions: DebugModule, DebugTypeSubrange, DebugTypeArrayDynamic and DebugTypeString. New Debug Operations. DebugTypeArray no longer has an `Component Count <id>` operand. It was replaced by a new operand `<id>, <id>, ... Subranges` to fully represent all characteristics of the elements of DebugTypeArray. Added an optional 'Target function' operand to DebugFunction. Added a 'SrcLang' table to be used by DebugCompilationUnit instruction. Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
237e35e
to
4fab24d
Compare
Thanks! Based on the feedback restored the original name of the instruction set. |
This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100. It also introduces support for the new debug instruction DISubrange. Spec: KhronosGroup/SPIRV-Registry#186
This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100. It also introduces support for the new debug instruction DISubrange. Spec: KhronosGroup/SPIRV-Registry#186
This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100. It also introduces support for the new debug instruction DISubrange. Spec: KhronosGroup/SPIRV-Registry#186
It's being added in KhronosGroup/SPIRV-Registry#186 In DWARF it's used in 'trampoline' functions generated for external function calls. Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
…it (#1854) This extended source language table is used by DebugCompilationUnit instruction when the extension is enabled. It enables support for more languages than exists in a core specification. Spec: KhronosGroup/SPIRV-Registry#186 Enabling of Fortran language also allowed to fix FortranArray test that was originally XFAIL-ed in 9e234d9.
…1853) It's being added in KhronosGroup/SPIRV-Registry#186 In DWARF it's used in 'trampoline' functions generated for Fortran external function calls.
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
This instruction describes a dynamic array, mostly for Fortran 90. Unlike DebugTypeArray it has Data Location, Associated, Allocated and Rank parameters. If the appropriate metadata parameters appear in LLVM IR in DW_TAG_array_type metadata, then such debug type becomes treated as dynamic array by the translator (of course if the appopriate extended instruction set is enabled). Spec: KhronosGroup/SPIRV-Registry#186 Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
This instruction describes a dynamic array, mostly for Fortran 90. Unlike DebugTypeArray it has Data Location, Associated, Allocated and Rank parameters. If the appropriate metadata parameters appear in LLVM IR in DW_TAG_array_type metadata, then such debug type becomes treated as dynamic array by the translator (of course if the appropriate extended instruction set is enabled). Spec: KhronosGroup/SPIRV-Registry#186 Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
This type instruction describes a string, mostly for Fortran 90. Spec: KhronosGroup/SPIRV-Registry#186
This type instruction describes a string, mostly for Fortran 90. Spec: KhronosGroup/SPIRV-Registry#186
… DebugFunction (KhronosGroup#1853) It's being added in KhronosGroup/SPIRV-Registry#186 In DWARF it's used in 'trampoline' functions generated for Fortran external function calls.
…bugCompilationUnit (KhronosGroup#1854) This extended source language table is used by DebugCompilationUnit instruction when the extension is enabled. It enables support for more languages than exists in a core specification. Spec: KhronosGroup/SPIRV-Registry#186 Enabling of Fortran language also allowed to fix FortranArray test that was originally XFAIL-ed in 9e234d9.
…ronosGroup#1871) This instruction describes a dynamic array, mostly for Fortran 90. Unlike DebugTypeArray it has Data Location, Associated, Allocated and Rank parameters. If the appropriate metadata parameters appear in LLVM IR in DW_TAG_array_type metadata, then such debug type becomes treated as dynamic array by the translator (of course if the appropriate extended instruction set is enabled). Spec: KhronosGroup/SPIRV-Registry#186 Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
…nosGroup#1877) This type instruction describes a string, mostly for Fortran 90. Spec: KhronosGroup/SPIRV-Registry#186
…roup#1878) This entity represents a module in the programming language, for example a Fortran module. Spec: KhronosGroup/SPIRV-Registry#186 The implementation is the same as for SPV_INTEL_debug_module extension. Spec for extension: https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_debug_module.asciidoc
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
…ronosGroup#1846) This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100. It also introduces support for the new debug instruction DISubrange. Spec: KhronosGroup/SPIRV-Registry#186
… DebugFunction (KhronosGroup#1853) It's being added in KhronosGroup/SPIRV-Registry#186 In DWARF it's used in 'trampoline' functions generated for Fortran external function calls.
…bugCompilationUnit (KhronosGroup#1854) This extended source language table is used by DebugCompilationUnit instruction when the extension is enabled. It enables support for more languages than exists in a core specification. Spec: KhronosGroup/SPIRV-Registry#186 Enabling of Fortran language also allowed to fix FortranArray test that was originally XFAIL-ed in 9e234d9.
…ronosGroup#1871) This instruction describes a dynamic array, mostly for Fortran 90. Unlike DebugTypeArray it has Data Location, Associated, Allocated and Rank parameters. If the appropriate metadata parameters appear in LLVM IR in DW_TAG_array_type metadata, then such debug type becomes treated as dynamic array by the translator (of course if the appropriate extended instruction set is enabled). Spec: KhronosGroup/SPIRV-Registry#186 Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
…nosGroup#1877) This type instruction describes a string, mostly for Fortran 90. Spec: KhronosGroup/SPIRV-Registry#186
…roup#1878) This entity represents a module in the programming language, for example a Fortran module. Spec: KhronosGroup/SPIRV-Registry#186 The implementation is the same as for SPV_INTEL_debug_module extension. Spec for extension: https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_debug_module.asciidoc
) This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100. It also introduces support for the new debug instruction DISubrange. Spec: KhronosGroup/SPIRV-Registry#186
… DebugFunction (#1853) It's being added in KhronosGroup/SPIRV-Registry#186 In DWARF it's used in 'trampoline' functions generated for Fortran external function calls.
…bugCompilationUnit (#1854) This extended source language table is used by DebugCompilationUnit instruction when the extension is enabled. It enables support for more languages than exists in a core specification. Spec: KhronosGroup/SPIRV-Registry#186 Enabling of Fortran language also allowed to fix FortranArray test that was originally XFAIL-ed in 9e234d9.
) This instruction describes a dynamic array, mostly for Fortran 90. Unlike DebugTypeArray it has Data Location, Associated, Allocated and Rank parameters. If the appropriate metadata parameters appear in LLVM IR in DW_TAG_array_type metadata, then such debug type becomes treated as dynamic array by the translator (of course if the appropriate extended instruction set is enabled). Spec: KhronosGroup/SPIRV-Registry#186 Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
This type instruction describes a string, mostly for Fortran 90. Spec: KhronosGroup/SPIRV-Registry#186
This entity represents a module in the programming language, for example a Fortran module. Spec: KhronosGroup/SPIRV-Registry#186 The implementation is the same as for SPV_INTEL_debug_module extension. Spec for extension: https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_debug_module.asciidoc
Signed-off-by: Lu, John <john.lu@intel.com>
This reverts commit 4cdd415. Calculation of memory size is done with (element size)*bit_ceil(# elements). 'Memory Size' field is not needed.
It's based on NonSemantic.Shader.DebugInfo.100
New functionality compared to NonSemantic.Shader.DebugInfo.100
New instructions: DebugModule, DebugTypeSubrange,
DebugTypeArrayDynamic and DebugTypeString.
New Debug Operations.
DebugTypeArray no longer has an
Component Count <id>
operand. It was replaced by a new operand
<id>, <id>, ... Subranges
to fully represent all characteristics of theelements of DebugTypeArray.
Added an optional 'Target function' operand to
DebugFunction.
Added a 'SrcLang' table to be used by DebugCompilationUnit
instruction.
Signed-off-by: Sidorov, Dmitry dmitry.sidorov@intel.com