-
Notifications
You must be signed in to change notification settings - Fork 47
[WIP] Fix Issue #588: separate compilation of NVVM IR modules when generating debuginfo #591
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
base: main
Are you sure you want to change the base?
Conversation
One test still fails, because the C ABI wrapper generator generates no debug info, and the separate compilation seems to lead NVVM to not generate a debug section for it. This should probably be addressed by generating debug info for the C ABI wrapper.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
Greptile OverviewGreptile SummaryModified PTX compilation to separate NVVM IR modules when generating debuginfo, reverting to pre-PR#8594 behavior for debug mode while maintaining combined compilation for lineinfo. Key Changes:
Critical Issue Found:
Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant compile/compile_all
participant CUDACodeLibrary
participant nvvm
participant Linker
User->>compile/compile_all: compile with debug=True
compile/compile_all->>CUDACodeLibrary: create library with nvvm_options["g"]
alt compile_all() path
compile/compile_all->>CUDACodeLibrary: get_asm_strs(cc)
CUDACodeLibrary->>CUDACodeLibrary: check if "g" in options
alt debug mode ("g" in options)
loop for each IR module
CUDACodeLibrary->>nvvm: compile_ir(ir, **options)
nvvm-->>CUDACodeLibrary: PTX module
end
else lineinfo/no debug
CUDACodeLibrary->>nvvm: compile_ir(all_irs, **options)
nvvm-->>CUDACodeLibrary: single PTX
end
CUDACodeLibrary-->>compile/compile_all: list of PTX modules
else compile() path
compile/compile_all->>CUDACodeLibrary: get_asm_strs(cc)
CUDACodeLibrary-->>compile/compile_all: list of PTX modules
alt multiple PTX files
compile/compile_all->>User: RuntimeError
else single PTX file
compile/compile_all->>User: return PTX
end
end
compile/compile_all->>Linker: add_ptx() for each PTX
Linker-->>User: linked binary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
- logic: missing `**options` parameter - `arch` and other compilation options won't be passed when compiling with debug info - syntax: missing space in error message Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
One test still fails, because the C ABI wrapper generator generates no debug info, and the separate compilation seems to lead NVVM to not generate a debug section for it. This should probably be addressed by generating debug info for the C ABI wrapper.
Fixes #588.
Fixes NVBugs: 5196888, 5227483, 5639364.