AI inference glossary
ParallelismCP

Context parallelism

Also known as PCP, DCP, sequence parallelism

In plain English

Context parallelism splits one long prompt across several chips so they share the work of reading it and of scanning its stored attention state.

Technical definition

Context parallelism shards query tokens across accelerators, in a prefill form known as PCP and a decode form known as DCP.

Engineering details

PCP gives each rank a chunk of the query while keys and values are passed around a ring, which parallelizes the compute-bound prefill and stops one rank absorbing an entire long prompt. DCP shards the KV cache itself, so every rank scans its own slice and the partial attention results merge flash-decode style. Because decode is memory-bandwidth bound, parallel KV reads raise the achievable token rate.

Why it matters

Tensor parallelism replicates the full KV cache on each rank and data-parallel attention pins a session to whichever rank owns its shard, so neither scales cleanly as contexts reach hundreds of thousands of tokens. Context parallelism attacks that directly, and its gain grows with input length rather than with batch size.

How to read it in InferenceX

InferenceX surfaces DCP and PCP degrees in point tooltips and parallelism labels alongside TP, EP, and DP. Support is uneven across vendors: the technique remains part of the practical CUDA advantage because the AMD attention backends were still listed as unsupported in the vLLM matrix at the time of the AgentX 1.0 results.