Skip to content

Prevent incorrect CUDA ScatterElements reductions for unsupported types - #32079

Draft
Tianlei Wu (tianleiwu) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-cuda-scatterelements-reduction
Draft

Prevent incorrect CUDA ScatterElements reductions for unsupported types#32079
Tianlei Wu (tianleiwu) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-cuda-scatterelements-reduction

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

  • Preserve size-based dispatch for byte-wise reduction="none".
  • Dispatch reductions using the tensor’s concrete element type.
  • Return an explicit error for types without matching CUDA reduction implementations.
  • Add regression coverage for affected integer and BFloat16 types.

Motivation and Context

CUDA ScatterElements reductions interpreted several registered types as same-sized floating-point or signed types, silently producing incorrect results. This change rejects unsupported reductions instead of performing type-punned arithmetic.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CUDA ScatterElements reductions dispatch by element type Prevent incorrect CUDA ScatterElements reductions for unsupported types Aug 14, 2026
@Noperi0r

Copy link
Copy Markdown

This overlaps with #29879, which addresses the same CUDA ScatterElements reduction-dispatch issue and already has maintainer approval with passing CUDA-specific CI checks. #29879 supports the affected registered types rather than rejecting them; I’ve linked the overlap in #32061 for coordination.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CUDA ScatterElements reductions dispatch on element size, giving wrong results for several registered types

3 participants