Support debug info of the compiled model for gdb/lldb#3422
Merged
chentong319 merged 10 commits intoonnx:mainfrom Apr 15, 2026
Merged
Support debug info of the compiled model for gdb/lldb#3422chentong319 merged 10 commits intoonnx:mainfrom
chentong319 merged 10 commits intoonnx:mainfrom
Conversation
Signed-off-by: chentong319 <chentong@us.ibm.com>
Signed-off-by: Tong Chen <chentong@us.ibm.com>
tungld
approved these changes
Apr 3, 2026
| pm.addPass(mlir::createReconcileUnrealizedCastsPass()); | ||
| pm.addPass(mlir::createCanonicalizerPass()); | ||
| if (enableDebugInfo) | ||
| pm.addPass(mlir::LLVM::createDIScopeForLLVMFuncOpPass()); |
Member
There was a problem hiding this comment.
In wonder if we can set --preserveMLIR = true if enableDebugInfo here, so that there is no need to specify `--preserveMLIR on the command line.
Collaborator
Author
There was a problem hiding this comment.
Yes, We can do that. I am thinking to support preserve at different IR level so that we can debug at onnx, zhigh or krnl level as desired.
Collaborator
|
Jenkins Linux s390x Build #18704 [push] Support debug info of th... started at 12:57 |
Collaborator
|
Jenkins Linux amd64 Build #18674 [push] Support debug info of th... started at 11:57 |
Collaborator
|
Jenkins Linux s390x Build #18704 [push] Support debug info of th... passed after 1 hr 32 min |
Collaborator
|
Jenkins Linux amd64 Build #18674 [push] Support debug info of th... passed after 1 hr 39 min |
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.
Because llvm changed, an extra pass is needed.
This PR relies on MLIR parser to create the debug information. Future PR may be needed to refine how the file line Location info is propagated in our transformation.