Skip to content

Enable NVRTC PCH reuse for CUTLASS providers - #11048

Draft
tpn wants to merge 1 commit into
codex/cuda-coop-05-ordering-selectionfrom
codex/cuda-coop-06-cutlass-pch
Draft

Enable NVRTC PCH reuse for CUTLASS providers#11048
tpn wants to merge 1 commit into
codex/cuda-coop-05-ordering-selectionfrom
codex/cuda-coop-06-cutlass-pch

Conversation

@tpn

@tpn tpn commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why this is needed

CUTLASS provider compilation repeatedly parses the same heavy CUDA/CUB header
preamble. This layer lets compatible NVRTC compilations in one process share
a process-managed precompiled header while preserving the existing provider
API and a safe non-PCH fallback.

What this PR includes

  • process-private automatic NVRTC PCH creation and reuse
  • exact domain partitioning by compiler, target, options, headers, and preamble
  • off, unsupported, unavailable, warning, and compile-fallback paths
  • serialized same-domain creation, independent-domain concurrency, fork
    isolation, cleanup, and phase telemetry

The final stack layer owns AOT capture and publication.

Stack

6 of 7, based on PR #11047.
The final layer adds relocatable CUTLASS provider AOT packs.

Local validation

  • 72 exact focused PCH/provider tests passed; the complete related compiler
    selection passed 87 tests
  • real automatic mode compiled float32 and float64 Merge Sort providers with
    one PCH creation, one hit, and matching GPU output
  • real off mode compiled both providers without PCH and matched GPU output
  • fallback, domain partitioning, concurrency, fork reset, telemetry, source
    imports, compileall, changed-file pre-commit, and git diff --check passed

Wheel and installed-package qualification, GitHub CI, and automated AI review
are deferred for now.

Create process-private NVRTC precompiled headers automatically and reuse
them across compatible provider compilations. Preserve safe fallback and
fork/concurrency isolation, and expose phase telemetry without changing
the public primitive API.

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

copy-pr-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Aug 27, 2026
# PCH must register its child reset before cache registers its fork handlers.
# isort: off
from . import (
_pch as _provider_pch,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am slightly scared that this might create hard to debug user issues if there is some bad include order somewhere

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants