From Chips to Clusters: A Guide to AI Compute System Co-Design
When building AI infrastructure for large model training and inference, focusing solely on peak chip performance is insufficient. This article explores the principles of system-level co-design, analyzing how compute, memory, interconnects, networking, and cooling must work together to achieve optimal business outcomes. It covers key concepts such as arithmetic intensity, host-accelerator collaboration, memory bottlenecks (including KV cache), parallelization strategies, and practical steps for developers and enterprises to evaluate and optimize AI compute systems for real-world workloads.
I. Understanding Next-Gen Compute Systems: Look Beyond Chip Specs
When discussing AI infrastructure, it is easy to focus on the peak computing power of a chip. However, for large model training and inference, peak compute only describes part of the system’s capability. Whether data can reach compute units in time, whether devices can efficiently exchange intermediate results, and whether power and cooling can maintain stable operations are equally crucial to final business performance.
A typical large model computation process involves host processors, accelerators, device memory, intra-node interconnects, inter-node networks, storage, and software runtimes. A bottleneck in any of these links can leave expensive compute resources idle.
Therefore, the key approach to next-gen compute infrastructure is not simply adding more compute units, but performing system-level co-design: simultaneously designing compute capacity, data pathways, resource organization, and execution mechanisms around target workloads.
This article discusses the general technical principles of such systems. It does not correspond to any specific product, nor does it use unverified hardware specs, release schedules, or performance forecasts as conclusions.
II. What Problems Does System Co-Design Solve?
1. Shifting from “Optimal Components” to “Optimal Business Outcomes”
Higher individual component performance does not necessarily mean a faster overall system.
For example, if accelerator compute capacity increases but memory bandwidth does not improve proportionally, compute units may wait for data more frequently. If network bandwidth increases but communication scheduling is poor, link congestion can still occur. If device count scales but task partitioning causes massive synchronization operations, the returns from added resources will diminish.
System co-design answers the question: Given a specific model, input length, concurrency, and service requirements, how should components coordinate to reduce waiting times on the critical path?
The “critical path” refers to the sequence of operations that determines the task completion time. Optimizing operations outside the critical path may reduce local overhead but will not necessarily shorten the overall execution time.
2. Using Compute and Data Movement to Identify Bottlenecks
To determine if a compute task is limited by data movement, we can use the concept of arithmetic intensity:
Arithmetic intensity = Operation count / Data movement in bytes.
In a simplified model, achievable compute throughput is constrained by two limits:
Achievable compute throughput ≤ min(Peak compute throughput, Effective memory bandwidth × Arithmetic intensity).
When arithmetic intensity is low, even a powerful compute unit may be underutilized due to insufficient data supply. Conversely, tasks with high data reuse and large matrix sizes are more likely to be compute-bound.
Note that this is only the starting point for analysis. Actual execution is also affected by insufficient parallelism, operator launch overhead, cross-device communication, cache hit rates, and data layout. Engineering judgments must combine runtime measurements rather than relying solely on theoretical formulas.
III. Host Processors and Accelerators: Division of Labor and Collaboration
1. The Host Processor is Not a Negligible Supporting Role
Accelerators typically handle large-scale parallel computing, but host processors still manage a significant amount of control and preparation work, including:
- Request admission, queuing, and batch organization;
- Data reading, preprocessing, and format conversion;
- Task submission and execution state management;
- Network protocol processing and exception recovery;
- Computations unsuitable for accelerators.
If the host side cannot complete these tasks promptly, accelerators may experience a situation where compute resources are abundant, but task supply is insufficient.
Therefore, capacity planning should not only count accelerators but also examine host-side processing capacity, memory capacity, data input speed, and task submission efficiency.
2. Data Sharing: Consistency and Access Costs
Different compute units can collaborate through data replication, shared address spaces, or interconnects with coherence support. However, these methods are not equivalent.
Shared address spaces can reduce programming complexity, but they do not imply that all accesses have the same latency and bandwidth. Accessing remote memory or reading data across interconnects usually incurs extra costs. Cache coherence support does not mean that frequent exchanges of small data blocks are free.
Engineering requires considering three questions simultaneously:
- Who produces the data, and who consumes it?
- Where is the data actually stored?
- Is there redundant data movement or repeated cross-device access?
Rather than vaguely pursuing “unified access,” it is more important to keep high-frequency data as close as possible to the compute unit that actually uses it.
IV. Memory Systems: The Boundary Between Running and Running Efficiently
1. Capacity and Bandwidth Solve Different Problems
Memory capacity determines whether model states and runtime data can fit into the device; memory bandwidth determines how fast that data can participate in computation.
If capacity is insufficient, you may need to partition the model, offload data, or add more devices. If capacity is sufficient but bandwidth is lacking, the task can execute but may remain in a waiting state for extended periods.
Thus, “fitting the model” is only the first step of deployment and does not equate to “meeting response requirements.”
2. Training Memory Requires More Than Model Weights
During training, device memory typically needs to hold model parameters, gradients, optimizer states, activations, and temporary workspaces. Some training strategies also maintain parameter copies at different precisions.
The basic composition can be expressed as:
Training memory requirements ≈ Parameters + Gradients + Optimizer states + Activations + Temporary buffers.
The size of each component depends on the model structure, numerical precision, optimization algorithm, sequence length, batch size, and parallelization method. It cannot be generalized by a fixed multiplier for all training tasks.
Reducing memory usage often comes with trade-offs. For example, recomputing activations can reduce the space needed to save them, but it increases compute load. Transferring some states to other memory tiers can free up device memory but may increase data transfer time.
3. Inference Needs Special Attention to Attention KV Cache
For models using autoregressive generation, processed tokens usually retain the keys and values required for attention computation, avoiding the need to recompute all historical information for every generation step.
This cache grows with context length and the number of concurrent requests. Under simplified conditions—same attention structure, same cache precision, without compression or sharing—its capacity is roughly proportional to:
Concurrent sequences × Cached tokens × Layers × KV heads × Dimension per head × Bytes per element.
Because both keys and values are saved simultaneously, two sets of corresponding data must be accounted for. Actual deployment requires further consideration of block allocation, memory fragmentation, shared prefixes, and cache eviction policies.
This explains a common phenomenon: the same model runs fine with short inputs and low concurrency, but experiences memory pressure and increased latency under long context and high concurrency conditions.
V. Interconnects and Networks: Determining Multi-Device Collaboration Efficiency
1. Intra-Node and Inter-Node Communication Require Separate Evaluation
Intra-node communication primarily serves multi-device collaboration within the same server, focusing on low latency, high bandwidth, and data exchange efficiency. Inter-node networks connect different servers and require more attention to topology, link contention, congestion control, and fault impact.
Together, they determine the communication cost after model partitioning. The nominal bandwidth of a single link cannot be used to infer the training efficiency of an entire cluster.
Effective communication capability is also related to message size, the number of communication participants, send/receive patterns, and software implementation. Small messages may be primarily affected by latency, while large messages are more easily constrained by bandwidth.
2. Different Parallel Strategies Produce Different Communication Patterns
Data parallelism allows multiple devices to process different data and then synchronize gradients. Tensor parallelism splits parts of the computation across multiple devices, requiring the exchange of results during computation. Pipeline parallelism assigns different network layers to different devices or device groups, mainly involving activation transmission between stages. Expert parallelism requires distributing data based on routing results, which can generate complex cross-device exchanges.
There is no universally optimal solution among these methods.
When the model is small and fits on a single device, unnecessary partitioning may increase communication overhead. When the model is large, partitioning may be a necessary means to meet capacity requirements. The correct approach is to choose a parallelization scheme based on model structure, device topology, and target scale, rather than simply trying to use more devices.
3. Scaling Efficiency Matters More Than Device Count
Scaling efficiency can be used to measure whether new devices generate expected returns:
Scaling efficiency = (Actual throughput increase factor) / (Device count increase factor).
For example, if the device count doubles but throughput fails to nearly double, it may indicate that communication, synchronization, data input, or load imbalance has become a limiting factor.
A drop in scaling efficiency does not necessarily indicate a hardware anomaly; it may also mean that the current task’s parallelization method is unsuitable for further scaling. You should find the cause through measurement before deciding to adjust task partitioning, communication organization, or cluster size.
VI. Training and Inference: Different Optimization Goals
1. Training Focuses on Total Cost to Achieve Target Outcomes
Training throughput is important, but what enterprises truly care about is: Can the target model performance be achieved within an acceptable cost and timeframe?
Therefore, training evaluation should at least include effective sample processing speed, convergence status, communication ratio, checkpoint saving time, and fault recovery costs.
Reducing numerical precision may decrease data movement and increase compute throughput, but training stability and final outcomes must be verified. Performance optimization cannot be built on unacceptable degradations in model quality.
2. Inference Prefill vs. Token-by-Token Generation Have Different Bottlenecks
Inference typically consists of two stages.
The prefill stage processes the input context, usually offering more parallelizable computation, making it easier to leverage matrix compute capabilities. The token-by-token generation stage continuously produces new tokens, requiring repeated access to weights and historical cache. Under certain model and runtime conditions, it is more susceptible to memory bandwidth and scheduling overhead.
However, this is not an absolute classification. Model structure, batch size, context length, and parallelization methods can all change the actual bottleneck.
Service evaluation should observe simultaneously:
- Time to first token;
- Time interval between adjacent output tokens;
- Request completion time;
- Effective throughput under latency constraints;
- Tail latency and failure rate under high load.
Showing only total output speed can easily mask degrading interactive experiences; showing only low-concurrency latency can mask the system’s capacity ceiling.
3. Batching Benefits Must Be Calculated with Queuing Costs
Merging multiple requests for execution usually helps improve device utilization, but waiting to form batches increases queuing time.
Total request latency can be broken down into:
Total latency = Queuing time + Scheduling overhead + Compute time + Data transfer time.
Online services need to strike a balance between throughput and responsiveness. For interactive businesses, low tail latency is often more important than peak throughput; for offline tasks, more aggressive batching and centralized scheduling can be applied.
VII. Power and Cooling are Also Performance Boundaries
The performance of high-density compute systems is limited not only by chips but also by data center infrastructure.
Power capacity determines whether devices can run continuously at target power levels; cooling capacity determines whether the system can stably dissipate heat. If heat cannot be removed in time, devices may reduce operating frequencies or trigger protective mechanisms, leading to unstable performance during long-running tasks.
When adopting solutions like liquid cooling, you cannot focus solely on the cooling effect. You also need to evaluate plumbing maintenance, leak monitoring, material compatibility, facility modifications, and fault handling requirements.
A more reliable acceptance method is to conduct long-duration tests under conditions close to real workloads, observing throughput, power, temperature, error rates, and performance fluctuations, rather than just measuring short-term peaks.
VIII. How Developers and Enterprises Should Conduct Practical Evaluations
Step 1: Define the Workload, Don’t Choose Devices First
Clarify model size, input/output length distribution, concurrency, precision requirements, and latency targets. Training tasks should also specify data scale, target performance, and allowable training cycles.
Average input length is often insufficient for planning; you also need to consider the proportion of long requests and request distribution during peak hours.
Step 2: Build a Resource Requirement Model
Estimate memory requirements for parameters, cache, activations, and temporary space separately. Map out primary compute and communication paths. Evaluate storage read, checkpoint write, and host preprocessing capabilities.
Theoretical estimates are used to eliminate obviously unfeasible options, but final capacity should be calibrated with real-world tests.
Step 3: Test in Layers and Locate Bottlenecks
Start with single-device compute and memory behavior, then test intra-node communication, cross-node communication, and finally execute end-to-end workloads.
This sequence helps distinguish between local capacity shortages and system configuration issues. If you jump straight to large-scale testing, multiple bottlenecks may overlap, making the results difficult to interpret.
Step 4: Verify Availability Under Anomalous Conditions
Test device failures, network jitter, service restarts, and request spikes. Check task recovery, request retries, checkpoint integrity, and alerting effectiveness.
Fault recovery itself is a cost. A system with very high peak performance but frequent interruptions may be inferior to a system with slightly lower performance but stable availability.
Step 5: Calculate Cost Based on Effective Output
For training, you can calculate the total resource investment required to achieve the target outcome. For inference, you can calculate the cost of successful requests meeting quality and latency constraints.
Cost accounting should cover compute resources, networking, storage, energy, operations, and failed retries, rather than just looking at device procurement price or short-term utilization.
IX. Conclusion: True Compute Power Comes from System Balance
The technological evolution of AI infrastructure is driving evaluation methods from “comparing single chips” to “understanding the complete data path.”
Compute capacity determines the scale of executable operations. Memory systems determine data supply efficiency. Interconnects determine multi-device collaboration costs. Power and cooling determine continuous operational boundaries. Software scheduling determines whether these capabilities can be translated into actual business results.
For developers, the key is to understand the workload and identify the constraints between compute, memory, communication, and queuing. For enterprises, the key is to validate using quality, latency, stability, and total cost as common standards.
A good compute system is not one where every component has the highest specs, but one where every link matches the target task, minimizing wasted resources on waiting, data movement, and redundant work.
