10.1c Texture Processing Clusters (TPCs): grouping SMs for Scheduling

📦 Nvidia GPU Architecture 📖 GPU Microarchitecture

🧭 Context Introduction

In the world of AI infrastructure, a single GPU contains thousands of tiny processing units called CUDA cores. But these cores aren't managed individually — they are organized into larger groups for efficient scheduling and resource sharing. One critical grouping level is the Texture Processing Cluster (TPC). Think of a TPC as a "neighborhood" of Streaming Multiprocessors (SMs) that share certain hardware resources and work together to execute tasks efficiently. For new engineers learning about GPU microarchitecture, understanding TPCs is essential because they directly impact how workloads are scheduled and how memory bandwidth is utilized.


⚙️ What is a Texture Processing Cluster (TPC)?

A Texture Processing Cluster (TPC) is a hardware grouping of one or more Streaming Multiprocessors (SMs) within an NVIDIA GPU. Each TPC contains:

  • Multiple SMs (typically 2 in modern data center GPUs like the A100 or H100)
  • Shared texture units (hardware dedicated to texture filtering and sampling)
  • A common L1 cache / shared memory interface for the SMs within the cluster
  • A dedicated scheduler that distributes work to the SMs inside the TPC

The primary purpose of a TPC is to improve scheduling efficiency by allowing the GPU to manage groups of SMs as a single unit, rather than scheduling each SM individually.


🛠️ How TPCs Group SMs for Scheduling

The GPU's global work scheduler (GigaThread Engine) does not assign threads directly to individual SMs. Instead, it distributes thread blocks to TPCs, and then the TPC's local scheduler decides which SM within the cluster will execute the work.

Here is how the scheduling flow works:

  • Step 1: The GigaThread Engine receives a kernel launch command from the CPU.
  • Step 2: It divides the total thread blocks among available TPCs across the GPU.
  • Step 3: Each TPC's internal scheduler receives its assigned thread blocks.
  • Step 4: The TPC scheduler distributes these thread blocks to the SMs within its cluster.
  • Step 5: Each SM then schedules individual warps (groups of 32 threads) for execution on its CUDA cores.

This hierarchical approach reduces scheduling overhead because the GigaThread Engine only needs to manage a few dozen TPCs, rather than hundreds of individual SMs.


📊 Visual Representation: Texture Processing Cluster (TPC) Data Routing

This diagram illustrates the interface binding between shared texture caches, texture mapping units, and the dual SM blocks inside a TPC.

flowchart LR Cache["Texture Cache (L1.5)"] --> TMU["Texture Mapping Unit (TMU)"] TMU --> SM1["Streaming Multiprocessor (SM 1)"] TMU --> SM2["Streaming Multiprocessor (SM 2)"] classDef cpu fill:#eafaf1,stroke:#76b900,stroke-width:2px,rx:6px,ry:6px; classDef memory fill:#f0f7ff,stroke:#3498db,stroke-width:1.5px,rx:4px,ry:4px; classDef system fill:#f1f5f9,stroke:#64748b,stroke-width:1.5px; class SM1,SM2 cpu; class Cache memory; class TMU system;

📊 TPC vs. SM vs. GPC — A Quick Comparison

Feature Streaming Multiprocessor (SM) Texture Processing Cluster (TPC) Graphics Processing Cluster (GPC)
Contains CUDA cores, warp scheduler, registers Multiple SMs + texture units Multiple TPCs + raster engines
Primary role Executes warps of threads Groups SMs for scheduling Groups TPCs for rendering pipelines
Typical count in A100 108 SMs total 54 TPCs (2 SMs per TPC) 8 GPCs
Scheduling level Warp-level scheduling Thread block distribution Workgroup distribution
Shared resources L1 cache, shared memory Texture units, L1 interface L2 cache partitions

🕵️ Why TPCs Matter for AI Workloads

For AI training and inference, TPCs play a subtle but important role:

  • Memory locality: SMs within the same TPC share a closer memory path, reducing latency when accessing textures or cached data.
  • Resource balancing: The TPC scheduler can balance workloads across its SMs, preventing one SM from being idle while another is overloaded.
  • Texture operations: While less common in pure AI workloads, some neural network layers (e.g., convolutional layers with custom kernels) can leverage texture hardware for faster data fetching.
  • Scalability: As GPUs grow larger (e.g., from 80 SMs to 132 SMs in newer architectures), TPCs allow the scheduler to scale without becoming a bottleneck.

🔍 Real-World Example: A100 GPU TPC Layout

Consider the NVIDIA A100 GPU, which is widely used in AI infrastructure:

  • Total SMs: 108
  • SMs per TPC: 2
  • Total TPCs: 54
  • GPCs: 8

When you launch a CUDA kernel with 10,000 thread blocks, the GigaThread Engine distributes these blocks across the 54 TPCs. Each TPC receives approximately 185 thread blocks. The TPC's internal scheduler then assigns these blocks to its two SMs (roughly 92–93 blocks per SM). Each SM further schedules the threads within those blocks into warps for execution.

This two-level scheduling hierarchy (GigaThread → TPC → SM) is what makes modern NVIDIA GPUs efficient at handling massive parallelism.


✅ Key Takeaways for New Engineers

  • TPCs are intermediate grouping units between the global scheduler and individual SMs.
  • They improve scheduling efficiency by reducing the number of entities the global scheduler must manage.
  • Each TPC contains 2 SMs in most modern data center GPUs (check your specific architecture).
  • TPCs share texture hardware and a common L1 cache interface, which can benefit certain data access patterns.
  • Understanding TPCs helps you optimize kernel launches — for example, launching thread blocks in multiples of the TPC count can improve load balancing.

As you continue learning about AI infrastructure, remember that the GPU is not just a flat collection of cores — it is a carefully designed hierarchy where each level (GPC → TPC → SM → warp) has a specific purpose in managing parallelism and resources.