Skip to content

[CUDA] Fix Abs signed zero handling - #31477

Merged
Tianlei Wu (tianleiwu) merged 1 commit into
microsoft:mainfrom
MohamedElashri:fix-cuda-abs-signed-zero
Aug 14, 2026
Merged

Tianlei Wu (tianleiwu) merged 1 commit into
microsoft:mainfrom
MohamedElashri:fix-cuda-abs-signed-zero

Conversation

@MohamedElashri

Copy link
Copy Markdown
Contributor

Description

Ensure CUDA Abs returns +0.0 for both +0.0 and -0.0, with a regression test checking the output sign bits.

Motivation and Context

The existing implementation negates +0.0, producing -0.0 instead. This fixes the signed-zero behavior.

Fixes #31162

@azure-pipelines

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

@MohamedElashri

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

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.

ORT Abs CUDA Kernel Returns -0.0 for +0.0 Input

2 participants

⌂ 换网址