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
Summary
atomic_add_funcintensorrt_llm/_torch/cute_dsl_kernels/rubin/moe/utils.pyemits atomic-add PTX only forcutlass.Float32andcutlass.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
Float32andBFloat16cases. 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.pyatomic_add_funcAcceptance criteria
atomic_add_funcretains its existingFloat32behavior.atomic_add_funcretains its existingBFloat16behavior.Backlinks