arXiv:2610.37466cs.AROct 2026

Manuscript Offprint

arXiv:2610.37466

Kernel Performance Engineering under Physical Non-Idealities

Supun Kuruppu, Pranav Dangi, Wei Li, Zhenyu Bai, Tulika Mitra

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Physical non-idealities in integrated circuit (IC) design and fabrication are concealed by conventional hardware abstractions, yet they can limit kernel performance and obscure optimization opportunities. Using distributed shared memory (DSMEM) on NVIDIA H100 GPUs as a case study, we show how floorsweeping restricts hardware resources available for clustered execution, potentially offsetting the benefits of reduced data movement enabled by DSMEM. Guided by these insights, we develop a wave-aware clustering strategy that accounts for these resource constraints to improve kernel performance. Evaluations using a global-load-and-broadcast microbenchmark, GEMM, and the Hopper version of FlashAttention 4 demonstrate the performance implications of these constraints, with wave-aware clustering improving FlashAttention 4 throughput by up to 5.30% over its baseline. We further show that, under thermal design power (TDP) limits, reduced data movement enables higher Streaming Multiprocessor (SM) frequencies through Dynamic Voltage and Frequency Scaling (DVFS), explaining otherwise unexpected throughput improvements. Extending this analysis beyond GPUs, we show that power constraints also limit throughput scaling on Tenstorrent's Wormhole accelerator, highlighting the broader importance of accounting for physical non-idealities when analyzing and optimizing kernel performance.

1 INTRODUCTION

The fundamental idea of abstraction is pervasive across computer systems. By enabling the philosophy of separation of concerns, abstractions have facilitated the development of software for increasingly complex hardware. Kernel performance engineers have leveraged this principle to simplify their view of the underlying microarchitecture. At the highest level of abstraction, kernels are written in high-level languages, delegating the complexity of the architecture to the compiler. This abstracted view reduces its complexity and improves productivity, but it also restricts the maximum performance achievable by a kernel. As performance demands increase, kernel performance engineers are compelled to break this level of abstraction and work directly with the hardware's Instruction Set Architecture (ISA). Further, in performance-sensitive domains such as AI, maximizing kernel performance requires engineers to go beyond the ISA and develop a deep understanding of the underlying microarchitecture. Even at this level, physical non-idealities in integrated circuit (IC) design, such as floorsweeping and thermal design power (TDP) limits, can cause the microarchitecture to behave differently under certain conditions. These physical effects are concealed by conventional microarchitectural abstractions, limiting kernel performance engineers' ability to anticipate their impact and extract peak performance.

Physical non-idealities in hardware are abstracted away by IC vendors when they disclose their microarchitecture. This abstraction aims to provide consistent performance and programmability across different units of a product. Floor-sweeping masks manufacturing defects by disabling faulty resources, allowing ICs with different numbers of functional resources to be classified into stock-keeping units (SKUs). Each SKU represents a product configuration with a specified set of functional resources. For example, ICs manufactured with the Hopper GH100 design are categorized into the H100 SXM5 and H100 PCIe SKUs based on their fabrication defects. Further, TDP limits specify a power budget for the IC; however, their impact on operating frequency during kernel execution remains opaque. Similar to higher-level abstractions, this abstraction can also conceal potential kernel optimization opportunities and contribute to uninterpretable performance variations. In this paper, we demonstrate how physical non-idealities affect kernel performance and how understanding these effects can inform kernel performance engineering and explain seemingly unpredictable performance variations, using the distributed shared memory (DSMEM) architectural feature of NVIDIA H100 Graphics Processing Units (GPUs) as a case study.

DSMEM is an architectural feature introduced in the Hopper GPU architecture (Andersch et al., 2022). It relies on grouping multiple thread blocks into a unit called a thread block

1^{1}Department of Computer Science, National University of Singapore, Singapore. Correspondence to: Zhenyu Bai zhenyu.bai@nus.edu.sg.

Figure

Figure 1. Throughput and percentage increase in throughput compared to cluster size 1 across sequence lengths for 128 and 256 head dimensions for FlashAttention 4 Hopper version.

cluster (cluster), which ensures that the thread blocks are mapped to Streaming Multiprocessors (SMs) within a single Graphics Processing Cluster (GPC). This enables each thread block to access the shared memory of other thread blocks within its cluster. The number of thread blocks in a cluster is referred to as the cluster size, and the process of grouping thread blocks into clusters is called clustering. Hopper GPUs support cluster sizes of 2, 4, and 8, with 16 being optional. For a cluster size of 2, thread blocks are always mapped to SMs within the same Texture Processing Cluster (TPC). Hence, we refer to clusters of size 2 as TPC-level clusters and clusters of sizes 4 and 8 as GPC-level clusters.

This architectural feature enables a thread block to load data and broadcast it with other thread blocks within the same cluster when they require the same data, a common scenario in tiled kernels. Interestingly, we observe that this feature is not utilized in modern kernels such as FlashAttention (Dao et al., 2022; Shah et al., 2024; Zadouri et al., 2026). We also observe that the expected performance gains do not materialize at GPC-level cluster sizes, as shown in Fig. 1. A kernel performance engineer familiar with the microarchitecture might attribute this performance degradation entirely to synchronization overheads. However, accounting for physical non-idealities reveals that synchronization overhead is only one of the contributing factors.

In this paper, we demonstrate the importance of breaking another layer of abstraction by accounting for physical non-idealities in IC design and fabrication when engineering high-performance kernels. First, we show how floorsweeping limits the number of SMs available for clustered execution. Although the NVIDIA H100 GPU exposes 132 SMs, our experiments show that only 120 SMs can be used concurrently at GPC-level cluster sizes. We refer to this number as the active SM limit. We explain this reduction using the organization of the remaining functional resources into virtual GPCs and the constraints this organization imposes on clustered execution. Consequently, using a GPC-level cluster size can increase the number of execution waves required by a kernel, offsetting the benefits of reduced redundant data loads through DSMEM and ultimately reducing kernel throughput.

With this understanding, we characterize the conditions under which the reduced active SM limit introduces additional execution waves. We define a wave-equalized kernel launch as one whose thread-block count results in the same number of execution waves under both the full and reduced active SM limits. We derive the conditions for such launches and evaluate their performance implications using a global-load-and-broadcast microbenchmark, GEMM, and the Hopper version of FlashAttention 4. With insights from this, we introduce the wave-aware clustering strategy to select between TPC clustering and GPC clustering for a given kernel. We achieve a throughput improvement of up to 5.30% with wave-aware clustering against FlashAttention 4 baseline, which uses cluster size 1.

Furthermore, we explain the discrepancies and seemingly unpredictable variability in kernel performance with DSMEM through a principled analysis of TDP limits and the resulting fluctuations in SM frequency. For kernels operating at the GPU's power limit, reduced data movement lowers the power consumed by data transfers, allowing the GPU to sustain a higher SM frequency through Dynamic Voltage and Frequency Scaling (DVFS). We demonstrate this effect by incorporating global loading and broadcasting of shared key and value tiles into the Hopper version of FlashAttention 4. This demonstrates the benefit of considering physical non-idealities in kernel performance engineering. Moreover, we evaluate the impact of TDP limits on Tensorrent's Wormhole accelerator, demonstrating how power constraints reduce operating frequency and limit throughput scaling as more cores become active. These results demonstrate that the impact of physical non-idealities on kernel performance extends beyond GPUs.

References (27)