Skip to content

Conversation

@justinchuby
Copy link
Collaborator

No description provided.

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements the signbit operation for the torch library, which tests each element of the input tensor to determine if the sign bit is set (i.e., if the value is negative). The implementation also updates the sign operation to properly handle boolean input tensors.

Key Changes

  • Implements aten_signbit function to check if elements have their sign bit set
  • Updates aten_sign to handle boolean dtype inputs by returning an identity operation
  • Adds test registration for the signbit operation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
onnxscript/function_libs/torch_lib/ops/core.py Implements aten_signbit function and updates aten_sign to handle bool dtype
tests/function_libs/torch_lib/ops_test_data.py Registers signbit operation for testing

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@justinchuby justinchuby enabled auto-merge (squash) January 2, 2026 18:28
@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.10%. Comparing base (a571309) to head (1d55efd).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2754      +/-   ##
==========================================
+ Coverage   70.09%   70.10%   +0.01%     
==========================================
  Files         228      228              
  Lines       27382    27387       +5     
  Branches     2783     2785       +2     
==========================================
+ Hits        19194    19201       +7     
+ Misses       7229     7227       -2     
  Partials      959      959              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinchuby justinchuby merged commit 0ec46e2 into main Jan 2, 2026
33 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in ONNX Script Review Board Jan 2, 2026
@justinchuby justinchuby deleted the justinchu/signbit branch January 2, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: torchlib Related to the torch/aten function lib in development

Projects

Development

Successfully merging this pull request may close these issues.

3 participants