REVIEW 4 major objections 4 minor 3 cited by
A single hierarchical shape-and-stride representation, together with an algebra of layout operations, can exactly encode and compile-time verify the complex tensor layouts modern GPU tensor cores prescribe.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
T0 review · deepseek-v4-flash
2026-08-02 19:23 UTC pith:IECA6RQX
load-bearing objection A serious formalization of CuTe that extends F2-layout work to integer semimodules and hierarchical shapes; the core is worth engaging, but logical divide uses an undefined complement and needs repair before publication. the 4 major comments →
CuTe Layout Representation and Algebra
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The paper defines a layout L = D∘S where S is a hierarchical shape—an HTuple of positive integers—and D is a congruent hierarchical stride; the shape maps any compatible coordinate system onto natural coordinates and the stride maps natural coordinates linearly into a codomain chosen from an integer-semimodule, usually the integers, coordinate tuples, or F₂ bit-space. By nesting shapes and strides, layouts express row-major, column-major, padded, interleaved, blocked, broadcast, swizzled, and coordinate-generating mappings. The paper then defines operators: concatenation and coalescence rewrite the hierarchy without changing the underlying function; composition composes two layouts as functi
What carries the argument
The central object is the hierarchical layout L = (S:D) = D∘S, with S an HTuple of positive integers (the shape) and D a congruent HTuple of stride elements drawn from an integer-semimodule. S acts as a bijection from any compatible coordinate set to natural coordinates via the colexicographic idx2crd/crd2idx maps, and D acts linearly through an inner product to an offset space. The workhorse operations are group composition A∘B with its admissibility conditions—stride divisibility and shape divisibility—and the complement B* that powers logical product and logical divide. These give the algebra its generative force: composition alone covers reshaping, restriding, permutation, partitioning,
Load-bearing premise
The load-bearing premise is that for every hardware-prescribed layout and every desired partition, the relevant strides divide the shape's prefix products and the required pseudo-inverses and complements exist in the chosen integer-semimodule; where those conditions fail, CuTe layouts are not closed under composition and the advertised compile-time derivation cannot proceed.
What would settle it
Compute the composition (4,6) : (2,3) ∘ 6 : 3, which the paper itself shows violates the stride divisibility condition because the prefix product 4 is not divisible by the stride 3, so no CuTe layout can represent every third element of the underlying array. If a real hardware instruction prescribes access patterns that require exactly such a non-divisible sampling step, then the claim that CuTe strictly generalizes hardware-prescribed layouts is falsified. A more direct test is to try to express the function f(k)=3k+1 on a domain of size 10 as a single CuTe layout without out-of-bounds compos
If this is right
- A single generic COPY kernel, with only the precondition that source and destination sizes match, handles 1D and ND arrays, gather, scatter, broadcast, constant, transpose, and tensor-transpose layouts by varying only the layout arguments.
- A single generic GEMM and batched-GEMM kernel covers the N-T variants of BLAS GEMM, generally strided GEMM, tensor contractions folded into GEMM, and convolution via an im2col layout.
- Layout errors such as invalid tilings or non-admissible partitions become detectable at compile time through the divisibility conditions, rather than surfacing only when the kernel runs.
- The compose-and-slice pattern enabled by logical divide separates static tile parameters from dynamic thread or block identifiers, which the paper argues is more compiler-friendly than ranged slicing.
- Right-inverses of layouts allow automatic detection of the maximum vectorizable copy width between two tensors by finding the largest common sublayout.
Where Pith is reading between the lines
- Inference: the paper asserts without a full constructive proof that the required right/left pseudo-inverses and reflexive generalized inverses exist for general integer-semimodule codomains; a compiler built on CuTe would need a fallback representation for the non-divisible cases where the algebra is not closed.
- Inference: because the algebra generalizes F₂ linear layouts beyond power-of-two shapes and strides, CuTe may serve as a common substrate that subsumes several existing layout representations, letting a single static-analysis engine reason about layouts previously handled by separate formalisms.
- Inference: the complement-based logical divide suggests a testable extension: for any tiler satisfying the reflexive-inverse conditions, the tile-and-grid partition it produces should exactly cover the image of the original layout; this could be verified on non-power-of-two shapes with small brute-force enumeration.
- Inference: the paper's completeness construction—every finite-domain function with f(0)=0 is representable as a composition of CuTe layouts—implies the algebra could be used as a rewrite system for loop-nest transformations in compilers, extending affine loop theory to more general stride patterns.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper defines CuTe, a hierarchical tuple-based representation of tensor layouts (shape/stride pairs) together with a collection of operations: concatenation, coalescence, composition, inverse, complement, and logical product/divide. It claims that this representation strictly generalizes flat-shape/flat-stride tensor layouts and that the layout algebra enables generic COPY and GEMM implementations, compile-time verification of architecture-prescribed layouts, and concise expression of tiling and partitioning patterns. The formal core is Definition 2.17 (layout as shape∘stride) and Section 3 (layout algebra); applications are given in Sections 2.6, 3.3.4, 3.4, and 3.5. The paper also claims a completeness result (Section 2.4.3) that every function with finite domain and f(0)=0 is representable as a finite composition of CuTe layouts. The presentation is largely definitional and example-driven, with production deployment cited as evidence of utility.
Significance. If the formal system is made rigorous, the contribution is significant: a single layout algebra that covers row-major, column-major, padded, interleaved, swizzled, and hardware-prescribed layouts, with composable operations that can be checked at compile time. The paper has real strengths: explicit definitions, extensive worked examples, tables of layouts/inverses/complements, connection to F2-linear layout work, and evidence of deployment in CUTLASS, FlashAttention, and related systems. The main weaknesses are formal rather than empirical. The load-bearing tiling primitive, logical divide (Section 3.5.2), is defined through objects (complements and reflexive generalized inverses) whose existence is asserted rather than proved or constructed. The completeness claim (Section 2.4.3) is only a sketch and relies on an extended evaluation domain that the composition admissibility conditions of Section 3.3.2 do not formally cover. These gaps should be closed before the advertised 'powerful compile-time reasoning' claim is fully established.
major comments (4)
- [Section 3.5.2, Eqs. (30)-(31)] Logical divide A⊘B is defined via B⋆=(B,B*_|A|), requiring B⋆ to be surjective onto Z_|A| and to possess a reflexive generalized inverse B+ satisfying Eqs. (30)-(31). The manuscript does not prove existence of B*_|A| or B+ for any tiler B, nor does it provide a construction or an algorithm. The text merely says that the size extension 'often' works and that 'we require' the inverse. This is load-bearing because the tiled-data pattern in Section 3.3.4, the zipped_divide example, and the general claim of tiling/partitioning all depend on this operation. Without a theorem giving such complements/inverses (or precise, decidable preconditions), the advertised algebra cannot be certified for general tilers.
- [Section 3.5.2 example vs. Definition 3.5] The first logical-divide example says that 3:1 is the complement of 8:3 under the size of 24. Definition 3.5, condition (28), requires disjoint images on the extended domain of the complement: for all a in Z_{L*}\{0}, L*(a) is not in the image of L. For L=8:3 and L*=3:1, taking a=3 gives L*(3)=3, and 3=8:3(1), so the disjoint-image condition fails. If logical divide uses a restricted or differently defined complement (B*_|A|), that object must be defined precisely and the complement definition reconciled. As written, the formal definition and the central example are inconsistent.
- [Section 2.4.3, Completeness] The claim that every function f:Z_N→D with f(0)=0 is representable by a finite composition of CuTe layouts is supported only by a displayed sequence and the note that intermediate layouts are evaluated on the extended domain. No proof is given that the displayed sequence is admissible under the composition rules of Section 3.3.2 (Eqs. (20)-(21)), nor is there a formal semantics for out-of-bounds evaluation in compositions. Since this claim is used to justify the representational generality of CuTe, it needs either a proof within the defined algebra or an explicit statement of the weaker theorem that is actually established.
- [Section 3.3.2, Eqs. (19)-(21)] The composition formula is derived by imposing stride and shape divisibility conditions, but the manuscript does not state a theorem: under exactly what conditions does the resulting layout R exist, is it unique, and how are the coalescing and truncation steps in 'Apparent Violations' (Section 3.3.3) formalized? Because composition is the core operation used in the partition examples of Section 3.3.4 and throughout the later algebra, the admissibility conditions need a precise statement and proof, not just an informal derivation.
minor comments (4)
- [Definition 2.14] The notation Z_S is used both for the finite set of coordinates bounded by S and for the infinite set of all coordinates congruent to S. These are different objects and should be denoted differently to avoid ambiguity, especially because the extended-domain distinction is load-bearing in Definition 3.5.
- [Section 2.5.1, code example] In the 'Permute and reshape' snippet, the variable tiled_data is defined, but the slicing line uses thr_tile_data. This appears to be a typo and should be corrected.
- [Table 3] The row labeled 'NTT GEMM' lists A-layout (N,K):(1,ldb) and B-layout (M,K):(1,lda). This looks like a transposition of the intended row; please check the label and entries.
- [Section 3.4] The word 'psuedo' appears in the first paragraph; it should be 'pseudo.' Additionally, zipped_divide is referenced in Eq. (25) before it is formally introduced in Section 3.5.2; a forward reference or definitional note would help.
Circularity Check
No circularity: layout representation and algebra are defined from explicit axioms; deployment claims rest on external systems, not on the derivation chain.
full rationale
The paper's derivation chain is definitional and constructive. Layouts are defined as D∘S (Definition 2.17), and each algebraic operation—concatenation, coalescence, composition, inverse, complement, logical product, logical divide—is either defined by explicit functional properties or demonstrated with worked examples. No fitted parameter is renamed as a prediction, and no result is shown to reduce to its own input. The completeness claim in Section 2.4.3 is an explicit construction that encodes f's values into the strides of a layout; this is a representation theorem, not circularity. The self-citations appear in the related-work and deployment claims (CUTLASS v3/v4, Graphene, Stream-K, FlashAttention) and refer to external, open-source, or independently published systems; they are not used as premises in the mathematical derivation. Two rigor gaps exist but do not constitute circularity: Section 3.5.2 asserts, rather than proves, the existence of the complement B* and reflexive generalized inverse B+ satisfying Eqs. (30)–(31), and the worked example 24:3 ⊘ 8:3 appears to violate the disjoint-images condition (28) on the extended domain. These issues affect completeness and correctness of the algebra, not its circularity, because no result is assumed equivalent to the conclusion it is supposed to establish.
Axiom & Free-Parameter Ledger
axioms (4)
- domain assumption Layouts are functions from coordinate sets to integer-semimodules via shape-stride composition (Def. 2.17, Eq. 7); physical offsets are assumed to obey the integer-semimodule addition.
- domain assumption Shapes induce a colexicographical bijection between integral and natural coordinates (Eqs. 4-5); alternate orderings are allowed but a bijection is required.
- ad hoc to paper Out-of-bounds evaluation of idx2crd is well-defined for all integers and can be used in intermediate compositions (Section 2.4.3).
- ad hoc to paper For logical divide, the completed tiler B* must be surjective onto Z_|A| and must have a reflexive generalized inverse B+ (Eqs. 30-31).
read the original abstract
Modern architectures for high-performance computing and deep learning increasingly incorporate specialized tensor instructions, including tensor cores for matrix multiplication and hardware-optimized copy operations for multi-dimensional data. These instructions prescribe fixed, often complex data layouts that must be correctly propagated through the entire execution pipeline to ensure both correctness and optimal performance. We present CuTe, a novel mathematical specification for representing and manipulating tensors. CuTe introduces two key innovations: (1) a hierarchical layout representation that directly extends traditional flat-shape and flat-stride tensor representations, enabling the representation of complex mappings required by modern hardware instructions, and (2) a rich algebra of layout operations -- including concatenation, coalescence, composition, complementation, division, tiling, and inversion -- that enables sophisticated layout manipulation, derivation, verification, and static analysis. CuTe layouts provide a framework for managing both data layouts and thread arrangements in GPU kernels, while the layout algebra enables powerful compile-time reasoning about layout properties and the expression of generic tensor transformations. In this work, we demonstrate that CuTe's abstractions significantly aid software development compared to traditional approaches, promote compile-time verification of architecturally prescribed layouts, facilitate the implementation of algorithmic primitives that generalize to a wide range of applications, and enable the concise expression of tiling and partitioning patterns required by modern specialized tensor instructions. CuTe has been successfully deployed in production systems, forming the foundation of NVIDIA's CUTLASS library and a number of related efforts including CuTe DSL.
Figures
Forward citations
Cited by 3 Pith papers
-
Generative Quantum-inspired Kolmogorov-Arnold Eigensolver
GQKAE uses quantum-inspired Kolmogorov-Arnold networks to reduce parameters by 66% in generative quantum eigensolvers while achieving chemical accuracy on H4, N2, LiH, and other molecules.
-
EmuGEMM: Fused Tensor Core Kernels for Precision Emulation in Matrix Multiplication
Fused Tensor Core kernels for Ozaki Schemes I and II achieve up to 83% of INT8 peak throughput and outperform cuBLAS TF32 and ZGEMM on large matrices at comparable accuracy.
-
Complementary Matrix-Gated QKAN Fast-Weight Programmers for Quantum Dynamics Forecasting
Complementary Matrix Gating gives QKAN fast-weight programmers coordinate-wise retain/write control and cuts multi-step quantum-dynamics forecast MSE by at least 91.2% versus scalar gates.
Reference graph
Works this paper leans on
-
[1]
V olta Architecture Whitepaper, 2017
NVIDIA. V olta Architecture Whitepaper, 2017. URL:https://images.nvidia.com/content/ volta-architecture/pdf/volta-architecture-whitepaper.pdf
2017
-
[2]
Turing Architecture Whitepaper, 2018
NVIDIA. Turing Architecture Whitepaper, 2018. URL:https://images.nvidia.com/ aem-dam/en-zz/Solutions/design-visualization/technologies/turing-architecture/ NVIDIA-Turing-Architecture-Whitepaper.pdf
2018
-
[3]
Ampere Architecture Whitepaper, 2021
NVIDIA. Ampere Architecture Whitepaper, 2021. URL:https://images.nvidia.com/aem-dam/en-zz/ Solutions/data-center/nvidia-ampere-architecture-whitepaper.pdf
2021
-
[4]
Hopper Architecture Whitepaper, 2023
NVIDIA. Hopper Architecture Whitepaper, 2023. URL:https://resources.nvidia.com/ en-us-hopper-architecture/nvidia-h100-tensor-c
2023
-
[5]
Blackwell Architecture Whitepaper, 2025
NVIDIA. Blackwell Architecture Whitepaper, 2025. URL:https://images.nvidia.com/aem-dam/ Solutions/geforce/blackwell/nvidia-rtx-blackwell-gpu-architecture.pdf
2025
-
[6]
An updated set of basic linear algebra subprograms (blas).ACM Transactions on Mathematical Software, 28(2):135–151, 2002
L Susan Blackford, Antoine Petitet, Roldan Pozo, Karin Remington, R Clint Whaley, James Demmel, Jack Dongarra, Iain Duff, Sven Hammarling, Greg Henry, et al. An updated set of basic linear algebra subprograms (blas).ACM Transactions on Mathematical Software, 28(2):135–151, 2002
2002
-
[7]
Field G. Van Zee and Robert A. van de Geijn. Blis: A framework for rapidly instantiating blas functionality. ACM Trans. Math. Softw., 41(3), June 2015.doi:10.1145/2764454
doi:10.1145/2764454 2015
-
[8]
Yang Shi, U. N. Niranjan, Animashree Anandkumar, and Cris Cecka. Tensor Contractions with Extended BLAS Kernels on CPU and GPU. In2016 IEEE 23rd International Conference on High Performance Computing (HiPC), pages 193–202, 2016.doi:10.1109/HiPC.2016.031
-
[9]
Ehud Aharoni, Allon Adir, Moran Baruch, Nir Drucker, Gilad Ezov, Ariel Farkash, Lev Greenberg, Ramy Masalha, Guy Moshkowich, Dov Murik, Hayim Shaul, and Omri Soceanu. Helayers: A tile tensors framework for large neural networks on encrypted data.Proceedings on Privacy Enhancing Technologies, 2023(1):325â ˘A¸ S342, January 2023.doi:10.56553/popets-2023-0020
-
[10]
Spector, Simran Arora, Aaryan Singhal, Daniel Y
Benjamin F. Spector, Simran Arora, Aaryan Singhal, Daniel Y . Fu, and Christopher RÃl’. Thunderkittens: Simple, fast, and adorable ai kernels, 2024.arXiv:2410.20399
Pith/arXiv arXiv 2024
-
[11]
Linear layouts: Robust code generation of efficient tensor computation usingF 2, 2025
Keren Zhou, Mario Lezcano, Adam Goucher, Akhmed Rakhmati, Jeff Niu, Justin Lebar, Pawel Szczerbuk, Peter Bell, Phil Tillet, Thomas Raoux, and Zahi Moudallal. Linear layouts: Robust code generation of efficient tensor computation usingF 2, 2025. URL:https://arxiv.org/abs/2505.23819,arXiv:2505.23819
arXiv 2025
-
[12]
Philippe Tillet, Hsiang-Tsung Kung, and David D. Cox. Triton: an intermediate language and compiler for tiled neural network computations.Proceedings of the 3rd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages, 2019
2019
-
[13]
A. Edelman, S. Heller, and S. Lennart Johnsson. Index transformation algorithms in a linear algebra framework. IEEE Transactions on Parallel and Distributed Systems, 5(12):1302–1309, 1994.doi:10.1109/71.334903
-
[14]
T.H. Cormen. Fast permuting on disk arrays.Journal of Parallel and Distributed Computing, 17(1):41–57, 1993. doi:10.1006/jpdc.1993.1004
arXiv 1993
-
[15]
Efficient gpu implementation of affine index permutations on ar- rays
Mathis Bouverot-Dupuis and Mary Sheeran. Efficient gpu implementation of affine index permutations on ar- rays. InProceedings of the 11th ACM SIGPLAN International Workshop on Functional High-Performance and Numerical Computing, FHPNC 2023, page 15â ˘A¸ S28, New York, NY , USA, 2023. Association for Computing Machinery.doi:10.1145/3609024.3609411
arXiv 2023
-
[16]
CUTLASS: CUDA Templates for Linear Algebra Subroutines and Solvers, 2023
NVIDIA. CUTLASS: CUDA Templates for Linear Algebra Subroutines and Solvers, 2023. URL:https: //github.com/NVIDIA/cutlass/tree/v3.0.0
2023
-
[17]
Bhaskaracharya, Aravind Acharya, Bastian Hagedorn, and Vinod Grover
Somashekaracharya G. Bhaskaracharya, Aravind Acharya, Bastian Hagedorn, and Vinod Grover. Modeling layout abstractions using integer set relations, 2025.arXiv:2511.10374
arXiv 2025
-
[18]
Lego: Layout expression for generating one-to- one mapping, 2025.arXiv:2505.08091
Amir Mohammad Tavakkoli, Cosmin Oancea, and Mary Hall. Lego: Layout expression for generating one-to- one mapping, 2025.arXiv:2505.08091
arXiv 2025
-
[19]
Categorical foundations for CuTe layouts, 2025
Colfax Research. Categorical foundations for CuTe layouts, 2025. URL:https://research.colfax-intl. com/download/categories-of-layouts/. 34
2025
-
[20]
Graphene: An ir for optimized tensor computations on gpus
Bastian Hagedorn, Bin Fan, Hanfeng Chen, Cris Cecka, Michael Garland, and Vinod Grover. Graphene: An ir for optimized tensor computations on gpus. InProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, ASPLOS 2023, page 302â ˘A¸ S313, New York, NY , USA, 2023. Association ...
doi:10.1145/3582016 2023
-
[21]
Muhammad Osama, Duane Merrill, Cris Cecka, Michael Garland, and John D. Owens. Stream-K: Work- Centric Parallel Decomposition for Dense Matrix-Matrix Multiplication on the GPU. InProceedings of the 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, PPoPP ’23, page 429â ˘A¸ S431, New York, NY , USA, 2023. Association for ...
-
[22]
CUTLASS: Fast Linear Algebra in CUDA C++,
Andrew Kerr, Duane Merrill, Julien Demouth, and John Tran. CUTLASS: Fast Linear Algebra in CUDA C++,
-
[23]
FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh, ed- itors,Advances in Neural Information Processing Systems, volume 35, pages 16344–16359. Curran Associates, Inc., 2022
2022
-
[24]
Tri Dao. FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning, 2023.arXiv: 2307.08691
Pith/arXiv arXiv 2023
-
[25]
Flashattention-3: Fast and accurate attention with asynchrony and low-precision
Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, and Tri Dao. Flashattention-3: Fast and accurate attention with asynchrony and low-precision. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang, editors,Advances in Neural Information Processing Systems, volume 37, pages 68658–68685. Curran Associates...
-
[26]
CuTe DSL: Python APIs for CUTLASS.https://docs.nvidia.com/cutlass/latest/media/ docs/pythonDSL/cute_dsl.html, 2025
NVIDIA. CuTe DSL: Python APIs for CUTLASS.https://docs.nvidia.com/cutlass/latest/media/ docs/pythonDSL/cute_dsl.html, 2025. Accessed: 2026-03-01
2025
-
[27]
cuDNN: Efficient primitives for deep learning, 2014.arXiv:1410.0759
Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cuDNN: Efficient primitives for deep learning, 2014.arXiv:1410.0759
Pith/arXiv arXiv 2014
-
[28]
PTX ISA 9.0 Documentation
NVIDIA Corporation. PTX ISA 9.0 Documentation. Technical report, NVIDIA Corporation, 2025. URL: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html. 35
2025
-
[2017]
URL:https://developer.nvidia.com/blog/cutlass-linear-algebra-cuda
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.