B200 Cluster & Persistent Scheduler
R — Source evidence (Reading, paraphrased)
- [S2/S16] CTAs within a cluster can access each other's SMEM (DSMEM); the B200 portable cluster size is 8, and an explicit opt-in reaches the non-portable 16, but this may reduce the number of active blocks.
- [S13] A 2-CTA cluster can jointly compute a larger MMA tile and share operands through cluster-scope handoff.
- [S10] A persistent kernel keeps a fixed set of CTAs/clusters resident to process multiple tiles; CLC allows "stealing" work at runtime from not-yet-launched cluster coordinates, improving the tail.
Source: distilled from "Modern GPU Programming for MLSys" (https://mlc.ai/modern-gpu-programming-for-mlsys/) and the NVIDIA Blackwell tuning/compatibility guides. Short paraphrases only; no long passages are reproduced.
I — Methodology skeleton (Interpretation)
Cluster and persistent scheduling solve two different problems:
- cluster enlarges the spatial extent and data-sharing scope of a single cooperative tile;
- persistent scheduling reduces the static one-tile-one-CTA binding, letting a limited set of work owners fetch tasks in a loop;
- CLC on Blackwell further turns task fetching from static grid-stride into hardware-assisted dynamic tail scheduling.
Before using them, you must prove the gain comes from higher reuse, larger MMAs, or a better tail — not from "Blackwell has this feature, so use it".
A1 — Applications in the source (Past Application)
Case 1: 2-CTA GEMM
- The two CTAs each hold part of A/B/accumulator.
- DSMEM or multicast gives the pair the operands they both need.
- The barrier's CTA mask changes from single-CTA to cluster remote notification.
Case 2: uneven tile tail
- Static grid-stride may leave some SMs idle early during the final phase.
- CLC allows a finished resident cluster to cancel a not-yet-launched cluster and take over its coordinates to continue working.
A2 — Trigger scenarios (Future Trigger) ★
In what situations will the user need this skill?
- "Is a 2-CTA cluster worth it for this GEMM?"
- "Help me design a persistent tile scheduler and CLC tail stealing."
- "How do I reason about DSMEM access, cluster size, and occupancy together?"
Language signals
- "Is a 2-CTA cluster worth it for this GEMM?"
- "Help me design a persistent tile scheduler and CLC tail stealing."
- "How do I reason about DSMEM access, cluster size, and occupancy together?"
Distinction from adjacent skills
Difference from b200-tcgen05-mma-contract-builder: this skill covers cluster-level cooperation and task scheduling; the MMA builder covers the contract of a single Tensor Core operation. Difference from b200-gemm-optimization-ladder: this skill also applies to non-GEMM persistent/cluster kernels.
E — Executable steps (Execution)
Once the skill is activated, the agent must execute the following process:
- Prove the necessity of the cluster
- Is a single CTA limited by SMEM/TMEM/operand reuse?
- Does a 2-CTA tile raise Tensor Core utilization or reduce HBM/L2 traffic?
- Define the cluster shape and tile mapping
- clusterDim, each CTA's logical coordinates, the M/N/K slices, owners, and shared operands.
- Plan DSMEM/multicast
- Make accesses as coalesced as possible and 32B-aligned; avoid non-unit strides.
- Write out the producers/consumers and fences for local SMEM and remote SMEM.
- Compute residency
- Use
cudaOccupancyMaxActiveClusters or an equivalent tool.
- Compare portable size ≤8 with the B200 opt-in 16; if using 16, set the nonportable attribute and flag the portability.
- Upgrade the barrier scope
- Update the CTA mask, remote arrival, and pair completion; check the even/leader CTA responsibilities.
- Choose the scheduling mode
- Equal-cost, uniform work: static tile formula/grid-stride.
- Uneven cost or a pronounced tail: persistent owner + CLC work stealing.
- Implement the CLC protocol
- async try-cancel → mbarrier completion → query predicate → read the cluster coordinate only on success.
- No numeric sentinel; termination is decided by the predicate.
- Evaluate the tail and fairness
- Test the boundary cases where the tile count is fewer than, equal to, and slightly more than the resident clusters.
- Output the fallback
- Provide the portable single-CTA/static-scheduler path and the conditions for enabling it.
Required outputs
- Conclusion: the current choice/diagnosis; do not use a vague "it could be any of them".
- Evidence or assumptions: which items come from user data, and which are hypotheses awaiting verification.
- Contract/table/timeline: the auditable intermediate artifacts corresponding to this skill.
- Minimal validation: correctness tests, boundary tests, and one falsifiable experiment.
- Risks and fallback: alternative paths when hardware, version, or resource requirements are not met.
B — Boundaries (Boundary) ★
Do not use when
- A single CTA already saturates and tile costs are uniform; a cluster would only add synchronization and resource pressure.
- It must run fully identically on non-B200/non-Blackwell platforms, yet there is no fallback.
Failure modes
- Assuming a larger cluster size is always faster.
- DSMEM accesses that are not coalesced or not correctly fenced.
- Still reading an invalid coordinate when CLC fails.
- A persistent pool that is too large or too small, ignoring resource residency.
Limitations
- CLC and non-portable cluster sizes are architecture-dependent features; production code must have device-capability checks and a fallback.
Related skills
- depends-on:
b200-scope-layout-dispatch, b200-mbarrier-protocol-auditor
- contrasts-with: none
- composes-with:
b200-tcgen05-mma-contract-builder, b200-gemm-optimization-ladder, b200-kernel-roofline-triage
Audit info
- Validation passed: V1 ✓ / V2 ✓ / V3 ✓
- Test definitions: 6 (3 should_trigger / 2 should_not_trigger / 1 edge_case)
- Hardware validation: not performed; must be verified on a target B200
- Distilled: 2026-06-25
1---2name: b200-cluster-persistent-scheduler3description: Use when the user wants to use Thread Block Cluster, DSMEM, 2-CTA cooperative MMA, persistent kernels, a tile scheduler, or Cluster Launch Control on B200 to handle uneven tails. Outputs the cluster tile, occupancy, sharing/multicast, and static or dynamic scheduling plan. Not for kernels where independent small CTAs already saturate the machine and the workload is uniform.4---56<!-- Distilled from "Modern GPU Programming for MLSys" — https://mlc.ai/modern-gpu-programming-for-mlsys/ -->78# B200 Cluster & Persistent Scheduler910## R — Source evidence (Reading, paraphrased)1112- [S2/S16] CTAs within a cluster can access each other's SMEM (DSMEM); the B200 portable cluster size is 8, and an explicit opt-in reaches the non-portable 16, but this may reduce the number of active blocks.13- [S13] A 2-CTA cluster can jointly compute a larger MMA tile and share operands through cluster-scope handoff.14- [S10] A persistent kernel keeps a fixed set of CTAs/clusters resident to process multiple tiles; CLC allows "stealing" work at runtime from not-yet-launched cluster coordinates, improving the tail.1516> Source: distilled from "Modern GPU Programming for MLSys" (https://mlc.ai/modern-gpu-programming-for-mlsys/) and the NVIDIA Blackwell tuning/compatibility guides. Short paraphrases only; no long passages are reproduced.1718---1920## I — Methodology skeleton (Interpretation)2122Cluster and persistent scheduling solve two different problems:2324- **cluster** enlarges the spatial extent and data-sharing scope of a single cooperative tile;25- **persistent scheduling** reduces the static one-tile-one-CTA binding, letting a limited set of work owners fetch tasks in a loop;26- **CLC** on Blackwell further turns task fetching from static grid-stride into hardware-assisted dynamic tail scheduling.2728Before using them, you must prove the gain comes from higher reuse, larger MMAs, or a better tail — not from "Blackwell has this feature, so use it".2930---3132## A1 — Applications in the source (Past Application)3334### Case 1: 2-CTA GEMM35- The two CTAs each hold part of A/B/accumulator.36- DSMEM or multicast gives the pair the operands they both need.37- The barrier's CTA mask changes from single-CTA to cluster remote notification.3839### Case 2: uneven tile tail40- Static grid-stride may leave some SMs idle early during the final phase.41- CLC allows a finished resident cluster to cancel a not-yet-launched cluster and take over its coordinates to continue working.4243---4445## A2 — Trigger scenarios (Future Trigger) ★4647### In what situations will the user need this skill?48491. "Is a 2-CTA cluster worth it for this GEMM?"502. "Help me design a persistent tile scheduler and CLC tail stealing."513. "How do I reason about DSMEM access, cluster size, and occupancy together?"5253### Language signals5455- "Is a 2-CTA cluster worth it for this GEMM?"56- "Help me design a persistent tile scheduler and CLC tail stealing."57- "How do I reason about DSMEM access, cluster size, and occupancy together?"5859### Distinction from adjacent skills6061Difference from `b200-tcgen05-mma-contract-builder`: this skill covers cluster-level cooperation and task scheduling; the MMA builder covers the contract of a single Tensor Core operation. Difference from `b200-gemm-optimization-ladder`: this skill also applies to non-GEMM persistent/cluster kernels.6263---6465## E — Executable steps (Execution)6667Once the skill is activated, the agent must execute the following process:68691. **Prove the necessity of the cluster**70 - Is a single CTA limited by SMEM/TMEM/operand reuse?71 - Does a 2-CTA tile raise Tensor Core utilization or reduce HBM/L2 traffic?722. **Define the cluster shape and tile mapping**73 - clusterDim, each CTA's logical coordinates, the M/N/K slices, owners, and shared operands.743. **Plan DSMEM/multicast**75 - Make accesses as coalesced as possible and 32B-aligned; avoid non-unit strides.76 - Write out the producers/consumers and fences for local SMEM and remote SMEM.774. **Compute residency**78 - Use `cudaOccupancyMaxActiveClusters` or an equivalent tool.79 - Compare portable size ≤8 with the B200 opt-in 16; if using 16, set the nonportable attribute and flag the portability.805. **Upgrade the barrier scope**81 - Update the CTA mask, remote arrival, and pair completion; check the even/leader CTA responsibilities.826. **Choose the scheduling mode**83 - Equal-cost, uniform work: static tile formula/grid-stride.84 - Uneven cost or a pronounced tail: persistent owner + CLC work stealing.857. **Implement the CLC protocol**86 - async try-cancel → mbarrier completion → query predicate → read the cluster coordinate only on success.87 - No numeric sentinel; termination is decided by the predicate.888. **Evaluate the tail and fairness**89 - Test the boundary cases where the tile count is fewer than, equal to, and slightly more than the resident clusters.909. **Output the fallback**91 - Provide the portable single-CTA/static-scheduler path and the conditions for enabling it.9293### Required outputs94951. **Conclusion**: the current choice/diagnosis; do not use a vague "it could be any of them".962. **Evidence or assumptions**: which items come from user data, and which are hypotheses awaiting verification.973. **Contract/table/timeline**: the auditable intermediate artifacts corresponding to this skill.984. **Minimal validation**: correctness tests, boundary tests, and one falsifiable experiment.995. **Risks and fallback**: alternative paths when hardware, version, or resource requirements are not met.100101---102103## B — Boundaries (Boundary) ★104105### Do not use when106- A single CTA already saturates and tile costs are uniform; a cluster would only add synchronization and resource pressure.107- It must run fully identically on non-B200/non-Blackwell platforms, yet there is no fallback.108109### Failure modes110- Assuming a larger cluster size is always faster.111- DSMEM accesses that are not coalesced or not correctly fenced.112- Still reading an invalid coordinate when CLC fails.113- A persistent pool that is too large or too small, ignoring resource residency.114115### Limitations116- CLC and non-portable cluster sizes are architecture-dependent features; production code must have device-capability checks and a fallback.117118---119120## Related skills121122- **depends-on**: `b200-scope-layout-dispatch`, `b200-mbarrier-protocol-auditor`123- **contrasts-with**: none124- **composes-with**: `b200-tcgen05-mma-contract-builder`, `b200-gemm-optimization-ladder`, `b200-kernel-roofline-triage`125126---127128## Audit info129130- **Validation passed**: V1 ✓ / V2 ✓ / V3 ✓131- **Test definitions**: 6 (3 should_trigger / 2 should_not_trigger / 1 edge_case)132- **Hardware validation**: not performed; must be verified on a target B200133- **Distilled**: 2026-06-25