Repository navigation
CUTLASS 4.9.0
#3962
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
CuTe DSL
New features:
@cute.jit,@cute.kernel, andcute.compilewithout an opt-in flag. Programs that do not require extension APIs can select the previous compiler path withCUTE_DSL_USE_EXTENSION_COMPILER=0or, per compilation,cute.compile[cute.DisableCuteExtCompile](...).jax.vmapwith withcutlass_calloptions="--divmod-semantics=python"to select Python floor-division and modulo semantics, oroptions="--divmod-semantics=legacy"to retain the previous behavior. Legacy semantics remain the default, with migration warnings for potentially affected code. We will make Python semantics the default in a future release.examples/python/CuTeDSL/helpers/efc:efc_config.accum_split(num_parts)splits the accumulator into N-interleaved parts, andswiglu(),geglu(),reglu()andgated(name)computeup * activation(gate)from a two-way split. The output isnum_partstimes narrower along N than the accumulator and is stored through TMA.DenseGemmEFCBlockScaled: fp8 A/B with E8M0 scale factors per 32 K elements, Float32 accumulator, tile N of 64, 128, 192 or 256.DenseGemmEFCSm107(fp8 with the K=64 MMA and B collector reuse) andDenseGemmEFCBlockScaledSm107.DenseGemmEFCtakesswizzle_sizeandraster_alongfor the persistent tile scheduler; the EFC examples expose them as--swizzle_sizeand--raster_order.tensor.load()/tensor.store()(TMA, direct global-memory access since 4.6,cp.asyncload since 4.7) and reductions withtensor.reduce(value, op=...)(scalar since 4.6, per-row and per-column since 4.7).New example kernels added:
Bug fixes and improvements:
cute_extgrouped GEMM and pointer-array GEMM kernels by requiring explicit updates for device-dynamic TMA tensors. Affected 4.8 kernels must now calltensor = cute_ext.tma_update(tensor)after construction and after reconstruction with changed pointer, shape, or strides. Execute the update on the warp issuing the consuming TMA operations and use the returned tensor; implicit updates could execute on multiple warps. The affected examples have been updated in 4.9.epilogue_tma_storeno longer drains the TMA-store pipeline on return, allowing stores to overlap across persistent tiles. Callers must calltail()after their final store-producing epilogue invocation.import cutlass.cuteis about 25% faster. Import is most of the time it takes to get a first compiled kernel. NumPy is now lazily imported when a dense elements attribute (F64/I32/I64/IndexElementsAttr) is built from Python values.tensormap_replacenow keeps device-side TMA descriptor updates safe when a descriptor is shrunk below its original extent (e.g. grouped GEMM) and fixes a possible illegal memory access on Blackwell/Rubin. This behavior can be opted out by specifyingkeep_oob_fetch_window=True. See https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-595-91-07/index.html#known-issues for more details on the knowncuTensorMapEncodeTiledbug.gelunow uses the erf form and matchestorch.nn.functional.gelu; it previously used the tanh approximation.siluandgeluevaluate narrow inputs in Float32 and round once, which fixes inaccurate float16 results.Documentation updates:
silent,warn once,warn once per call site,warn every call, and thenremoved, so its warning gets louder as removal approaches. A deprecation that does not warn yet starts its four-release window in the release that turns its warning on.DeprecationWarningonly for code in__main__. Each warning is acutlass.DSLDeprecationWarning, a subclass ofDeprecationWarning, and names the line in your code that uses the deprecated API.Installation changes:
run-iket) is now optional and provided by the separatenvidia-cutlass-dsl-toolspackage.pip install nvidia-cutlass-dslincluded IKET.pip install "nvidia-cutlass-dsl[tools]"installs the DSL and matching IKET tools.pip install "nvidia-cutlass-dsl[cu13,tools]".Existing
run-iketusage is unchanged. Users who do not need IKET can continue installingnvidia-cutlass-dslwithout thetoolsextra.Known issues:
sub.rn.e4m3x4.e4m3x4orsub.rn.e5m2x4.e5m2x4, as incorrect code generation can produce wrong results.add_packed_f16x2_f32x2_f32x2,add_packed_bf16x2_f32x2_f32x2,mul_packed_f16x2_f32x2_f32x2,mul_packed_bf16x2_f32x2_f32x2,sub_packed_f16x2_f32x2_f32x2,sub_packed_bf16x2_f32x2_f32x2'''
x = prims.mul_packed_bf16x2_f32x2_f32x2(a, b)
out[0], out[1] = f32(x[0]), f32(x[1]) # out[0], out[1] are wrong
mul_packed_bf16x2_bf16x2_f16x2,mul_packed_f16x2_f16x2_bf16x2cute.tile_to_shapeand similar layout algebra may have dynamic strides folded to 0 when the shape is 1 within device code and not within host code. Previously this kind of folding behaviour was default in the CuTe extensions compiler, but did not occur in CuTe programs. Users should avoid relying on strides of modes whos extents could fold in this way or opt out of the CuTe extension compiler for effected programs withcompiled = cute.compile[cute.DisableCuteExtCompile](launch_fn, *args)orCUTE_DSL_USE_EXTENSION_COMPILER=0 python your_program.pysee the known issues document for more information.This release has been tested against the following packages:
CUTLASS Operator API
cutlass_profiler is now available for CUTLASS Python.
includes operators from
nvidia-cutlass-operators, as well as customoperators you register for GEMM and grouped GEMM. See the
profiler README <https://github.com/NVIDIA/cutlass/blob/main/operators/cutlass/profiler/README.md>_to get started.
Expanded Blackwell grouped GEMM support.
accumulation.
per-expert global scales for NVFP4.
offsets_value_divisibilityguarantee, which allows finding moreoptimized operators when data offsets are divisible by 128 or 64.
block-scaled MoE grouped GEMM example <https://github.com/NVIDIA/cutlass/blob/main/operators/examples/010_moe_grouped_gemm.ipynb>_demonstrates forward and weight-gradient workloads, scale-factor layouts,
workspace allocation, and per-expert NVFP4 scales.
Universal tile schedulers. Supported Blackwell and Rubin GEMMs offer
combinations of non-persistent, static-persistent, and dynamic-persistent
scheduling; rasterization order and swizzle size; and split-K reduction.
Programmatic Dependent Launch and data-driven synchronization.
same-stream dependencies and cross-stream programmatic events. Rubin also
supports data-driven synchronization, allowing a consumer GEMM to process
completed portions of a producer's output.
PDL example <https://github.com/NVIDIA/cutlass/blob/main/operators/examples/009_programmatic_dependent_launch.ipynb>_demonstrates same-stream and cross-stream dependent launches.
data-driven synchronization example <https://github.com/NVIDIA/cutlass/blob/main/operators/examples/011_data_driven_sync.ipynb>_demonstrates back-to-back Rubin GEMMs, including PDL and sentinel
initialization.
Expanded epilogue support.
swiglu,geglu, orreglugatedactivations into a single GEMM. The existing
fused epilogue example <https://github.com/NVIDIA/cutlass/blob/main/operators/examples/001_gemm_with_fused_epilogue.ipynb>_has been updated to demonstrate the gated activations.
persistent operators. Future support is planned for combinations with
universal tile scheduling, mixed cluster shapes, and other optimizations.
persistent operator.
torch.float32); nooperator is offered for a narrower destination.
gelunow uses the erf form, matchingtorch.nn.functional.gelu, andsiluandgeluevaluate narrow inputs in FP32 and round once, soresults can have rounding differences from 0.3.0.
Compile without a GPU and control occupancy. Operators now defer compile-time GPU
queries, allowing GPU-free compilation with fake tensors. At
launch,
DevicePropertiesis added to supply device information andallow callers to override the maximum active cluster count.
Heuristics. Added support for ranking Blackwell block-scaled GEMMs via
nvMatmulHeuristics. FP6 types are not supported by the heuristic.Runtime performance controls.
PerformanceControls, which allowchanging an operator's performance options at runtime. This includes
split-K buffer size, rasterization order and swizzle size, PDL, and
data-driven synchronization for supported operators.
performance controls example <https://github.com/NVIDIA/cutlass/blob/main/operators/examples/008_performance_controls.ipynb>_demonstrates requesting settings, finding compatible operators, and using
wildcards and exclusions.
Improved Launch Overhead. Optimizations have been made to
RuntimeArgumentsto reduce the critical path before kernellaunch for non-EFC Operators resulting in a ~50% improvement.
Deprecations
Operator._run` now takes a keyword argument forDeviceProperties``. Operator subclasses that do not use thiswill continue to work with the older signature. They will be required to change in an upcoming release.
not stable and should not be used to query or filter operators. Argument-based discovery and metadata filters remain
unchanged.
get_operators()willreturn a lazily evaluated
Sequenceinstead of alist, enablingfaster iteration and lower memory use. This version adds a warning so
callers can prepare.
PersistentDenseGemmEFCOperatoris renamedSm100PersistentDenseGemmEFCOperator. The old name remains importablefrom
cutlass.operators.providers.cutedsl.gemm.sm100_static_persistent_efcas a deprecated alias.
folded C/D partition modes
((ATOM_M, MMA_M), (ATOM_N, MMA_N), ...)keepthe previous unfolded modes and get a
DeprecationWarning.C++
static_asserttest.nv_mma_throughputpragma at the kernel entry function. The pragma enables compiler optimizations tuned for matrix multiply-accumulate operations. See https://docs.nvidia.com/cuda//cuda-programming-guide/05-appendices/cpp-language-extensions.html#mma-throughput-pragma for more details. This pragma will be required with future CUDA releases to maintain peak performance for the CUTLASS kernels.default_mma_core_sm80.h,default_multistage_mma_complex_core_sm80.h) now usedetail::simt_transpose_padding_alignedinstead of the fixedkK/32padding. They also static-assert that elements are at least 32 bits wide.OutputTileOptimalThreadMapnow has astatic_assertthatkAccessWidthdivides the warp size. Configurations such askN=96with 8 elements per access previously had lanes writing the same coordinates and gave silently wrong results.sm100_gemm_cpasync_warpspecialized.hppand the mixed TMA+cpasync kernel adjust the CLC consumer arrive count when the epilogue load is needed.sm100_epilogue_nosmem.hppcomputes predicates next to their copies to shorten accumulator live ranges.GemmUniversal::Arguments: Thebatch_stride_*andld*members are now zero-initialized.TensorEAtomKandTensorEAtomMare nowdecltype(size<...>), andcosizeis no longer wrapped inInt<>.This discussion was created from the release CUTLASS 4.9.0.
All reactions