Commit Graph

876 Commits

Author SHA1 Message Date
Observer007
971d1ed8b7 fix for thor (#3224) 2026-05-13 09:06:44 +08:00
Haicheng Wu
ef120d0d09 update to 4.5 (#3228) 2026-05-12 14:44:22 +08:00
Vensen
c775e566bd fix: exclude SM70/72 from CUTLASS_NVCC_ARCHS_SUPPORTED on CUDA >= 13.0 (#3166) 2026-05-11 22:10:16 -04:00
Emre Albayrak
2e56847d72 Add Snake activation functor for EVT (#3184)
Introduces cutlass::epilogue::thread::Snake, a two-operand activation
functor implementing Snake_a(x) = x + (1/a) * sin^2(a*x) from
Ziyin et al. 2020 (arXiv:2006.08195). The per-channel learnable
frequency `a` flows through an EVT child (e.g. Sm90RowBroadcast),
composing into Sm90EVT<Sm90Compute<Snake, ...>, x_node, alpha_node>
for fused GEMM+Snake epilogues used in neural vocoders.

Adds unit tests in test/unit/epilogue/thread/activation.cu covering
f32 and bf16 paths, validated against float64 reference goldens.

Closes #3141
2026-05-11 22:09:53 -04:00
TungtungQia
1d9e1f6d7a [CuTeDSL] Fix loop carried target scope (#3200)
* [CuTeDSL] Bug fix for scf.for's write_args analysis

* [CuTeDSL] Add for loop test
2026-05-11 16:02:26 +08:00
questa-quan-wang
ae6bccf341 [CuTeDSL] Update atomic_max_float32 to atomic_fmax in blockscaled GEMM example (#3206)
The internal DSL package refactored atomic_max_float32 to atomic_fmax,
which properly handles negative floats via sign-bit-aware integer
atomics. Update the example to use the new API so it works with
current DSL wheels.

Co-authored-by: Questa Wang <questaw@computelab-frontend-7.nvidia.com>
2026-05-07 15:03:37 +08:00
Junkai-Wu
cb37157db5 v4.5 tag update (#3202)
* Python DSL examples reorganization.

* v4.5 tag update.
2026-05-05 20:55:27 -04:00
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
Blake Ledden
7a9fe055cb fix: Add missing kElementsPerAccess division in RegularTileIterator store (#3049)
The store(frag, tile_offset) method was computing the pointer offset
without dividing by kElementsPerAccess, while the matching load(frag,
tile_offset) method does include this division. Both load_with_pointer_offset
and store_with_pointer_offset apply the same byte conversion, so the
tile_offset -> pointer_offset calculation must also match.

When kElementsPerAccess > 1, this caused load and store to reference
different memory locations for the same logical tile offset.

Fixes #3017

Signed-off-by: Blake Ledden <bledden@users.noreply.github.com>
2026-04-24 23:27:40 -04:00
Vrushtee
9135a9bb6d Replace std::min with cute::min in sm120 blockwise scaling device functions (#3055) 2026-04-24 11:13:38 -04:00
dePaul Miller
b46b16d003 Small Tile N BlockScaled GEMM + Grouped GEMM (#3176)
Co-authored-by: dePaul Miller <23461061+depaulmillz@users.noreply.github.com>
2026-04-21 12:32:40 -04:00
zfm
aeba0d3723 correct BLayout stride in SM80 m16n8k32 int4 MMA traits (#3140) 2026-04-21 17:17:03 +08:00
Nandor Licker
ea46e277d2 Add absf and floor to cute.math (#3156)
The ops are already exposed by the underlying dialect.
2026-04-17 08:54:24 +08:00
Nandor Licker
3f3db08a0a Add support for empty dataclass arguments (#3152)
A dataclass with no fields exposed a bug in `extract_dataclass_members`:

```
@dataclass
class Dummy:
  pass
```

The type/return path was inconsistent. This PR fixes the function to
support empty dataclasses, which are useful in unions.
2026-04-17 08:47:47 +08:00
Longsheng Du
08185b9c3e Update blackwell tutorial to be compatible with 4.5-dev version (#3130)
* Update blackwell tutorial to be compatible with 4.5-dev version

* update example for reverted changes

* add more example fix
2026-04-09 14:40:33 +08:00
brandonsun
bd01dd3651 Update the release note for 4.5 dev (#3154) 2026-04-08 10:02:46 +08:00
Junkai-Wu
a221da7ccf v4.5 dev update. (#3153) 2026-04-07 12:16:05 -04:00
Katja Sirazitdinova
418d38a5de PR update (#3103) 2026-04-02 18:00:41 +08:00
drazi
4ca61d0662 [CuTeDSL] Add dataclass example: passing pointers via frozen dataclass (#3070)
* Add dataclass example: passing pointers via frozen dataclass

Demonstrates passing pointers from tensor arguments in @cute.jit to
@cute.kernel using @dataclass(frozen=True). Shows the pattern of
extracting pointers with tensor.iterator, bundling into a dataclass,
and reconstructing tensors in the kernel.

Uses fake tensors for compilation and TVM-FFI for runtime dispatch.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add dataclass example: passing tensors via frozen dataclass

Demonstrates passing tensors from @cute.jit to @cute.kernel using
@dataclass(frozen=True). Shows the pattern of bundling tensors into
a dataclass with static configuration.

Uses fake tensors for compilation and TVM-FFI for runtime dispatch.
Includes reference check against PyTorch implementation.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-03-30 15:08:36 +08:00
drazi
baea077e42 Merge pull request #3126 from keithzzzzz/main
[CLI] Fix tutorial issues
2026-03-24 23:56:23 +08:00
Zheng Linfeng
ecb32fe231 [CLI] Fix tutorial issues 2026-03-24 00:12:01 -07:00
Johnsonms
982748aa73 [Hopper CuTeDSL] Add grouped GEMM persistent kernel and tests (#3091)
Implement grouped GEMM (C_g = A_g x B_g for g groups) on Hopper using
CuTe DSL, extending the dense persistent GEMM with per-group TMA
descriptor management.

Kernel design (grouped_gemm.py):
- Warp-specialized pipeline: DMA warp group handles TMA loads and
  per-group tensormap updates; MMA warp group runs WGMMA and stores C
- StaticPersistentGroupTileScheduler for cross-group tile scheduling
- Per-group TMA descriptor updates via GMEM or SMEM mode
- Supports fp16, fp8 (E4M3FN/E5M2), int8 with mixed A/B dtypes
- Configurable tile shapes (128x128, 128x256) and cluster shapes
- Fix base TensorMapManager: hoist uniform_smem_ptrs outside predicated
  block to avoid illegal @P0 R2UR on sm_90a

Tests (test/examples/CuTeDSL/hopper/test_grouped_gemm.py):
- L0 compile and L1 correctness pytest suite covering tile shapes,
  dtypes, major modes, cluster shapes, group counts, and mixed sizes
- Move to test/examples/CuTeDSL/hopper/ following sm_100a convention
- Fix deprecated startdir arg in test_sharding.py pytest hook
2026-03-18 00:40:15 -04:00
Junkai-Wu
1b741cabaa v4.4.2 update. (#3104) 2026-03-17 00:58:19 -04:00
Linfeng Zheng
772fbb264e [CLI] add cutedsl fp16 gemm tutorial from 2 to 6 (#3106)
* [CLI] add fp16 gemm tutorial from 2 to 6

* [CLI] refine comments
2026-03-17 10:11:55 +08:00
Blake Ledden
087c84df83 docs: Fix float16 documentation in elementwise_add notebook (#2949) (#3047)
The notebook uses float16 tensors but the vectorized kernel documentation
incorrectly describes elements as 32-bit and uses 4-element vectorization.
Updated to correctly state 16-bit elements with 8-element vectorization
for proper 128-bit loads/stores.

Signed-off-by: Blake Ledden <bledden@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:29:46 +08:00
dePaul Miller
73c59c055c Support for Group GEMM in CUTLASS Profiler for Geforce and Spark (#3092)
Co-authored-by: dePaul Miller <23461061+depaulmillz@users.noreply.github.com>
2026-03-06 20:36:29 -05:00
Johnsonms
e5fcd125a5 [fix] Boolean.__dsl_and__ emits arith.andi directly for i1 operands (#3087)
Before this fix, combining two Boolean (i1) DSL values with Python `and`
triggered a verbose i1→i32→i1 round-trip in __dsl_and__:
  arith.extui  (×3), arith.select, arith.cmpi ne (×2) — 6 extra MLIR ops.

Add a fast path: when both operands are Boolean, delegate directly to
__and__, emitting a single arith.andi %a, %b : i1 — identical to `&`.

Both operators were already semantically equivalent; this fix makes the
generated MLIR identical as well.

Includes:
- repro_dsl_and_bool.py  — minimal standalone reproducer / bug-report script
- test_dsl_and_fix.py    — pytest tests verifying the fixed behaviour
2026-03-05 17:20:26 +08:00
TLescoatTFX
a93d86ec83 Fix finding cuDNN (#2890)
* Fix finding cuDNN

* Search $CUDNN_PATH first, not last
2026-03-05 09:51:37 +08:00
David W.H. Swenson
49e54f2b23 fix: add_help=False in temporary parser (#2721) 2026-03-02 15:33:42 +08:00
drazi
b9847690c5 Merge pull request #3028 from SzymonOzog/patch-3
Add option to not suffix prints with new line
2026-02-28 10:11:05 +08:00
Junkai-Wu
3bb6e28d3c v4.4.1 update (#3079) 2026-02-27 13:59:21 -05:00
Tianqi Zhang (张天启)
c651d660d2 fix typo (#3012) 2026-02-27 16:25:35 +08:00
Ziang Li
518327d631 Fix error in Blackwell document of referring to Mxf4 format as NVF4 (#2977)
* Update blackwell_functionality.md

Fixed the error of referring to Mxf4 format as NVF4.

* Correct NVF4 output matrix reference in documentation
2026-02-27 16:25:16 +08:00
StevenYangCC
de67bb7a42 Fix example in CuTe tutorials (#2752) 2026-02-27 16:24:34 +08:00
Neil Kichler
edf2f82c00 Fix register index bug in mma.sync.aligned.m16n8k16 (#2740) 2026-02-27 16:24:18 +08:00
mnehete32
79345359a7 Fix debug typo in sgemm_2.cu and sgemm_sm70.cu (#2678) 2026-02-27 16:23:59 +08:00
zkyue
8b9b3d78df fix typo in documentation (#2671) 2026-02-27 16:23:37 +08:00
Gabriel Wu
fc5bbc2dab Fix typo in cute.nvgpu.warpgroup.mma doc (#2548) 2026-02-27 16:22:55 +08:00
Junkai-Wu
057635de5c Remove redundant dsl example. (#3074) 2026-02-26 08:10:59 -05:00
Junkai-Wu
c213bfdfc1 Remove redundant dsl examples. (#3071) 2026-02-25 22:42:01 -05:00
Haicheng Wu
954503d44c Bump version to 4.4.0 2026-02-25 00:04:04 -05:00
Haicheng Wu
6c4200f1bc Bump version from 4.3.5 to 4.4.0 2026-02-25 00:03:23 -05:00
Haicheng Wu
de93e8a4ac Bump version from 4.3.5 to 4.4.0 2026-02-25 00:03:04 -05:00
Haicheng Wu
b92b9f0d37 Bump version from 4.3.5 to 4.4.0 2026-02-25 00:02:41 -05:00
Haicheng Wu
2aedca6f5e Bump CUTLASS version to 4.4.0 2026-02-25 00:01:56 -05:00
Haicheng Wu
6450964b57 Update README 2026-02-24 23:55:55 -05:00
Haicheng Wu
284449fa5b Revise chagnelog 2026-02-24 23:54:56 -05:00
Haicheng Wu
0853d81d70 Revise README 2026-02-24 15:32:17 -05:00
Linfeng Zheng
3476ddb7bd remove mixed_input_fmha_prefill (#3041) 2026-02-18 07:59:01 -05:00
Yihan Chen
291300ffff [CuTeDSL] implment a cta-level norm example (both layernorm and rmsnorm) (#3009)
* kernel impl

* add copyright
2026-02-14 17:54:03 +08:00