Add SPIR-V NonSemantic.Shader.DebugInfo.200#186
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
) 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
|
Moved to draft for a while to figure out how to express virtuality. |
) 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.
1. added complex type encoding 2. added bitfield flag 3. fixed debug operations 4. added inline namespace Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
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.
|
Now that we have a published It seems the only thing you can't "add" is It is going to MUCH easier to have tools "ignore" unknown things than having to manage 2 complete, 90% the same DebugInfo instruction sets |
Yes, it's on my TODO list to start porting few things to the rolling version of debug info. Though Fortran-specific things (like TypeArray) should probably be ported by somebody else who are interested in offloading of Fortran through SPIR-V :) . I'd keep this PR open for a while, also I don't expect .200 extension to be completely abandon for few reasons, which @vmaksimo might (or might not) comment on. |
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>, ... Subrangesto 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