Skip to content

fix(cutile): attribute generated entry setup to the user signature - #1480

Open
elibol wants to merge 2 commits into
NVIDIA:mainfrom
elibol:fix/cutile-entry-source-locations
Open

elibol wants to merge 2 commits into
NVIDIA:mainfrom
elibol:fix/cutile-entry-source-locations

Conversation

@elibol

@elibol elibol commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Generated entry setup currently inherits Span::call_site(), so CUDA-GDB attributes the wrapper and its generated assumptions to the module header. Use the original user function's signature span for the synthesized wrapper, including its call into the user kernel. The original kernel body and nested helper locations remain unchanged.

The regression checks wrapper operations and assumptions, the outer caller in inline chains, and the serialized entry subprogram's declaration line. Constants compiled from synthesized types are explicitly outside this change; their separate span work remains under #1379 / #1385.

Validation:

  • The new regression fails with the original wrapper span and passes with this change.
  • All nine debug_info tests pass, including real tileiras/nvdisasm checks, execution in all debug modes, and the live cuda-gdb cross-file helper test.
  • Live CUDA-GDB confirms the wrapper frame and the entry instruction now point to the user function signature.
  • Scoped formatting and cargo clippy --locked -p cutile-compiler --lib -- -D warnings pass.
  • Ran the required scripts/run_all.sh: CPU/assembler tests, 26 supported examples, and all eight benchmark smoke tests passed. One example was skipped because it requires Tile IR 13.4 and the installed assembler is 13.3. All GPU targets passed except one existing test-order dependency in warmup_suite; the whole 16-test cache suite passes serially on this branch. The script therefore returned nonzero for that unrelated cache test.

The unrelated cache failure is reproducible on unchanged base bafffe45662a5cdc064a1c6674c6c02d466a58e0: retain_predicate_may_reenter_the_cache_without_deadlock leaves the same specialization cached, while composed_builder_compile_terminal_warms_the_dispatched_specialization expects its compile count to increase by one. Running the baseline test binary with RUSTC_BOOTSTRAP=1 <warmup_suite-binary> warmup_composed:: -Z unstable-options --shuffle-seed 3 --test-threads 1 reproduces that assertion. This setting only enables the test harness's shuffle option; it does not rebuild or change the pinned toolchain.

For benchmark validation, the existing runner drops its bare smoke-test argument. For this run, its invocation was temporarily corrected to --features smoke-test so all eight benchmarks used the intended smoke configuration. The runner was restored afterward; that correction is not part of the PR.

Part of #1475. The inline call-line breakpoint resolver is addressed separately by NVIDIA/cuda-gdb#29. The generated assertion trap's backend source attribution remains under #1379.

Signed-off-by: Melih Elibol <elibol@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@elibol
elibol marked this pull request as ready for review October 10, 2026 21:29
@elibol

elibol commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewing this against the entry-wrapper and wrapper-generated-assumption items in #1475. The existing regression checks the wrapper's origin, outer inline caller, assumptions, and serialized subprogram declaration; the documented live kernel-entry stop is also the right end-to-end evidence.

The remaining test gap is optimized line-info mode: please run the provenance regression for both Line and Full and inspect the emitted cubin line mapping for the wrapper setup in both modes. #1475's audit showed that assumption locations can propagate onto existing optimized instructions even when assumptions emit no separate instructions, so an IR-only/full-debug result does not establish that case. No separate breakpoint on every assumption is required.

Retain the exact nested cross-file helper file/line/caller-chain regression and the live entry-address breakpoint check when rebasing. A generated setup instruction should map to the user signature while helper instructions retain their own locations. Generated constants have their separate scope in #1385, so this PR need not eliminate every module-header row by itself.

This covers two portions of #1475; it should not close the whole audit, #1476's debugger resolver issue, or #1379's assertion-trap/coredump attribution. Also, #1480 is still open; the earlier issue comment saying it had landed is premature.

…odes

Integrate current main, resolve the changelog conflict, and verify exact nested helper chains and entry-instruction cubin locations in both modes. Run the assembler regression in CPU CI.

Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com>
@elibol

elibol commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 899e14b

@elibol

elibol commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 899e14b9f9a7686a116992bb0eb0580efe014795: merged current main and completed Line/Full coverage for wrapper operations/assumptions, exact nested cross-file caller chains, and the first assembled instruction's signature location. The assembler regression now runs in CPU CI.

All 11 debug tests pass locally on CUDA 13.3, including GPU execution and live CUDA-GDB. Restoring the unchanged main wrapper generator makes both new wrapper regressions fail. Formatting passes. Updated CUDA 13.2/13.4 Tile CI, build and semver checks pass; Rust CodeQL is still running.

This covers the entry-wrapper/assumption part of #1475. The separate 13.4 inline-frame loss reported on #1385 also reproduces with the pre-existing optional inline-debug test here; the entry-signature test itself passes. Release tracking: #1606.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants