Skip to content

Preserve convergence on native device extern declarations - #1563

Draft
tpn wants to merge 1 commit into
NVIDIA:mainfrom
tpn:codex/coop-interop-convergent
Draft

tpn wants to merge 1 commit into
NVIDIA:mainfrom
tpn:codex/coop-interop-convergent

Conversation

@tpn

@tpn tpn commented Oct 20, 2026

Copy link
Copy Markdown

#[convergent] previously disappeared during macro expansion, and device extern declarations reached native optimization without the attribute. Preserve the marker across private dependency metadata and emit convergence on each marked declaration, including externs reached through a downstream generic helper.

Also deduplicate extern declarations during lowering. Reachable declarations of the same symbol must agree on their signature and convergence requirements; conflicting declarations produce an error.

Validated with 1,629 host/backend tests, native libNVVM checks in both LLVM dialects, cross-crate and LLVM optimization probes, and five existing GPU checks. The duplicate-declaration regression fails without the fix. This preserves optimization constraints; callers still own collective participation and synchronization.

Carry the convergence marker through private dependency metadata and
emit it on each marked LLVM declaration before native optimization.
Deduplicate repeated extern symbols while rejecting incompatible
signatures and convergence requirements.

Signed-off-by: Trent Nelson <trent@trent.me>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

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.

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.

1 participant