Repository navigation
Keep ptxas resource counts scoped to the first kernel report - #12
Merged
jinhongyii merged 1 commit intoSep 30, 2026
Merged
jinhongyii merged 1 commit into
jinhongyii merged 1 commit into
Conversation
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.
When a cubin contains multiple kernels,
parse_ptxascan combine the first kernel's register count with static shared memory or spills from a later kernel. For example, a real CUDA 13.0 SM103a compile reports 10 registers and no static SMEM forplain, then 128 bytes SMEM forshared; parsing the combined log incorrectly assigns 128 bytes toplain.Scope matching to the first entry-function report, as the API already documents. Logs without compile headers use the first function-properties block; abbreviated single-report logs remain supported. Preserve absent fields rather than filling them from another function.
Validation:
pytest -q -n 2 -p no:cacheprovider test_dump_kernel.pyagainst isolated source-package overlays: base 2 failed, 3 passed, patched 5 passed. Both new tests fail without this change.nvcc -cubin -arch=sm_103a -Xptxas=-vandcuobjdump --dump-sasson a B300 environment, CUDA 13.0.88. Compiled the plain/shared pair in both declaration orders: the original parser mixes fields when the first report lacks SMEM; the patched parser equals the isolated first report in both orders.The native reproducer uses these kernels (put
sharedbeforeplainto obtain the plain report first with this toolkit):