Skip to content

Fail explicitly for unsupported dtypes in Rubin MoE atomic_add_func #18337

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

Metadata

Metadata

Assignees

Labels

Customized kernels<NV>Specialized/modified CUDA kernels in TRTLLM for LLM ops, beyond standard TRT. Dev & perf.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions