Skip to content

Fail explicitly for unsupported dtypes in Rubin MoE atomic_add_func #18337

Closed

Description

@coderabbitai

Summary

atomic_add_func in tensorrt_llm/_torch/cute_dsl_kernels/rubin/moe/utils.py emits atomic-add PTX only for cutlass.Float32 and cutlass.BFloat16.

For another dtype, including cutlass.Float16, the function currently emits no instruction. This can silently omit an accumulation.

Required change

Add an explicit unsupported-dtype branch after the Float32 and BFloat16 cases. Use the established error mechanism for this CuTe DSL path.

Rationale

The function must fail immediately when it receives a dtype that has no matching atomic-add implementation. It must not silently skip the accumulation.

Affected area

  • tensorrt_llm/_torch/cute_dsl_kernels/rubin/moe/utils.py
  • atomic_add_func

Acceptance criteria

  • atomic_add_func retains its existing Float32 behavior.
  • atomic_add_func retains its existing BFloat16 behavior.
  • An unsupported dtype causes an explicit failure.
  • The selected failure mechanism is compatible with CuTe DSL compilation.

Backlinks

Activity

  1. added
    Customized kernels
    on Aug 28, 2026
  2. added 2 commits that reference this issue on Sep 16, 2026
  3. added a commit that references this issue on Sep 16, 2026
  4. added a commit that references this issue on Sep 17, 2026
  5. farazkh80 commented on Sep 17, 2026

    @farazkh80
    Collaborator

    Fixed on main by #19199 (commit 9418f54, "Reject unsupported Rubin MoE atomic add dtypes"): atomic_add_func now raises TypeError for anything other than Float32/BFloat16 instead of silently emitting no instruction. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Customized kernels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions