Skip to content

cuda: guard every PDL launch against a missing dependency wait (after #5308) - #5381

Merged
ashhart merged 5 commits into
mainfrom
lead/cuda-pdl-guard
Nov 27, 2026
Merged

ashhart merged 5 commits into
mainfrom
lead/cuda-pdl-guard

Conversation

@ashhart

@ashhart ashhart commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Follow-up to #5353 (#5308). That bug was a kernel launched as a programmatic dependent launch whose body had no dependency-wait prologue, so it could read memory its predecessor was still writing; it showed only on a non-default precision path. This adds a guard so a launch like that cannot land again, and fixes the one other kernel the audit found.

  • DeepSeek's generic x3ld expert kernels now wait (pdl_wait()) at the top of their global entry, before their first read of predecessor output. Their replay binding can launch them with PDL; the emitted DeepSeek routes pass PDL off, so no served default changes and outputs are identical either way.
  • A host guard scans the actual CUDA sources for every kernel's dependency prologue and fails if any launch carries the PDL attribute for a kernel without one: no hand-kept allowlist. It covers Qwen, GLM, Flash Next, DeepSeek and the shared paths, runs in the no-GPU CI, and each of its controls (missing prologue, unknown dependent launch, a nested wait that comes too late) fails as it should.

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