Files
cutlass/examples
Johnsonms f74fea9ce3 [Hopper CuTeDSL] Add FP8 GEMM with 2xAcc (#3149)
Add dense_gemm_fp8_2xacc.py — a CuTeDSL port of CUTLASS Example 54
(54_hopper_fp8_warp_specialized_gemm.cu) for NVIDIA Hopper (SM90).

Implements D = scale_a * scale_b * (A @ B) where A/B are FP8 E4M3FN using
the 2xAcc (double accumulation) technique: a temporary accumulator is
periodically promoted into the main accumulator every mma_promotion_interval
MMA instructions to prevent FP8 precision loss.

Features:
- FP8 E4M3FN inputs with Float32 accumulation
- 2xAcc for improved numerical accuracy
- TMA with multicast for A/B/D transfers
- WGMMA warp-specialized persistent tile scheduling
- Configurable output dtype: Float16, Float32, Float8E4M3FN
- Scalar scale_a / scale_b epilogue factors
- Cluster shapes up to 2x2

Add pytest test suite covering:
- L0 compile tests: all tile shapes, cluster shapes, output dtypes,
  mma_promotion_interval values
- L1 correctness tests: numerical validation vs torch.einsum reference
  for all configs, non-trivial scale factors, and batched GEMM (L>1)
- Benchmark tests (pytest -m bench -s): representative problem sizes
  with warmup, cold-L2, and TFLOPS reporting

Also fix conftest.py to import cutlass before adding examples/python/CuTeDSL
to sys.path, preventing the jax/ examples subdirectory from being detected
as a namespace package and breaking cutlass's JAX availability check.
2026-04-25 16:10:33 -04:00
..
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-24 11:46:17 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-24 11:46:17 -05:00
2026-01-08 15:02:56 -05:00
2026-01-08 15:02:56 -05:00
2026-01-24 11:46:17 -05:00
2026-01-24 11:46:17 -05:00
2026-01-24 11:46:17 -05:00
2026-01-08 15:02:56 -05:00
2026-02-27 16:25:35 +08:00
2026-04-07 12:16:05 -04:00
2026-01-08 15:02:56 -05:00

CUTLASS - Programming Examples

Important

⚠️ Not for Benchmarking! ⚠️

These examples are designed solely for demonstrating CUTLASS functionality and may NOT optimized for performance benchmarking.

For accurate performance measurements, please use the CUTLASS Profiler instead (recommended) or manually auto-tune the example, if unavailable via the profiler.

CuTe - Programming Examples

Examples that do not rely on CUTLASS and directly showcase the features of CuTe are located in cutlass/examples/cute.

Additionally, CuTe's core layout and layout algebra have their own test cases within cutlass/test/unit/cute/core/ that users might find useful as examples of CuTe.

Python Interface Examples

Examples leveraging CUTLASS's Python interface are located in cutlass/examples/python.

Copyright

Copyright (c) 2017 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.