[mlir][spirv] Add SPIR-V NonSemantic.Graph.DebugInfo (#199519)
Add serialization and deserialization support for the SPIR-V
NonSemantic.Graph.DebugInfo.1 extended instruction set used by ARM graph
modules.
When debug info emission is enabled, serialize DebugGraph,
DebugOperation,
and DebugTensor records for graph objects, TOSA operations, graph
tensors,
and tensor constants. Emit the records after the SPIR-V objects they
reference, and make DebugOperation point at the DebugGraph result id.
Deserialize these records back into MLIR locations and diagnose
malformed
or undefined debug-info references.
Enable SPV_KHR_non_semantic_info in the default TOSA-to-SPIR-V target
environment so debug info can be emitted by default.
Specification:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Graph.DebugInfo.asciidoc
Signed-off-by: Mohammadreza Ameri Mahabadian <mohammadreza.amerimahabadian@arm.com>
Signed-off-by: Davide Grohmann <davide.grohmann@arm.com>
Co-authored-by: Mohammadreza Ameri Mahabadian <mohammadreza.amerimahabadian@arm.com>