[HIPSPV] Preserve device debug info for gdb-oneapi#6
Closed
pvelesko wants to merge 1 commit into
Closed
Conversation
HIPSPVToolChain::adjustDebugInfoKind() unconditionally forced NoDebugInfo, so -g/-O0 produced device SPIR-V with no debug metadata at all and gdb-oneapi could not resolve source lines or locals in kernels. The stated reason (SPIRV-LLVM-Translator aborting on DW_OP_LLVM_convert) no longer applies: the translator now lowers it to SPIRVDebug::Convert. Stop clobbering the requested debug level, and when -g is given emit the NonSemantic.Shader.DebugInfo form (--spirv-debug-info-version= nonsemantic-shader-200 plus SPV_KHR_non_semantic_info) that Intel's IGC and gdb-oneapi consume. The default (no -g) SPIR-V output is unchanged. Refs: CHIP-SPV/chipStar#1004
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HIPSPVToolChain::adjustDebugInfoKind()unconditionally forcedNoDebugInfo, so-g -O0produced device SPIR-V with no debug metadata and gdb-oneapi could not resolve source lines or locals in kernels. The stated reason (SPIRV-LLVM-Translator aborting onDW_OP_LLVM_convert) no longer applies — the translator now lowers it toSPIRVDebug::Convert.This honors the requested debug level and, when
-gis given, emits the NonSemantic.Shader.DebugInfo form (--spirv-debug-info-version=nonsemantic-shader-200+SPV_KHR_non_semantic_info) that Intel IGC/gdb-oneapi consume. Non--goutput is unchanged.Needs validation on Aurora (gdb-oneapi + PVC): build
-g -O0, break in-kernel undergdb-oneapiwithZET_ENABLE_PROGRAM_DEBUGGING=1, confirm locals resolve, and confirm the translator does not abort.Refs CHIP-SPV/chipStar#1004