NVIDIA / NVIDIA/TensorRT-LLM

Validate preferred and fallback cluster shapes for Rubin BF16 preferred-cluster GEMM

Open
#18,333 1 comment 0 reactions 1 assignee View on GitHub

@peaceh-nv is already working on this.

Since Sep 17, 2026.

Customized kernels
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

Summary

PersistentDenseGemmKernelPreferredCluster validates feasibility through the inherited can_implement path. That path evaluates cluster_shape_mn, which is set to fallback_cluster_shape_mn.

The preferred-cluster execution path also launches with preferred_cluster_shape_mn. The preferred shape currently has no equivalent feasibility validation before launch.

Required changes

In tensorrt_llm/_torch/cute_dsl_kernels/rubin/dense_bf16_gemm_persistent.py:

  • Add or override feasibility validation for PersistentDenseGemmKernelPreferredCluster.
  • Validate both fallback_cluster_shape_mn and preferred_cluster_shape_mn.
  • Ensure __call__ rejects configurations that are invalid for either cluster shape before it launches a preferred or fallback grid.

Rationale

If the fallback cluster shape passes but the preferred cluster shape has more M CTAs than the problem supports, the preferred path can launch phantom CTAs. On SM107, this can cause out-of-bounds TMA accesses or a hang.

Acceptance criteria

  • The preferred-cluster feasibility check evaluates both cluster shapes.
  • The launch path uses the combined result.
  • Tests cover a configuration where the fallback shape is feasible and the preferred shape is not.

Backlinks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.