Skip to content

Conversation

@justinchuby
Copy link
Collaborator

@justinchuby justinchuby commented Nov 7, 2025

Fix the error: <class 'AttributeError'>: 'int' object has no attribute 'dtype' by splitting the implementation out for operator.* ops.

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby justinchuby self-assigned this Nov 7, 2025
@justinchuby justinchuby removed their assignment Nov 7, 2025
@justinchuby justinchuby added the module: torchlib Related to the torch/aten function lib in development label Nov 7, 2025
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.11%. Comparing base (70e751a) to head (0919dbd).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
onnxscript/function_libs/torch_lib/ops/core.py 68.75% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2686      +/-   ##
==========================================
- Coverage   70.11%   70.11%   -0.01%     
==========================================
  Files         225      225              
  Lines       27068    27083      +15     
  Branches     2721     2721              
==========================================
+ Hits        18980    18990      +10     
- Misses       7148     7153       +5     
  Partials      940      940              

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

@justinchuby justinchuby enabled auto-merge (squash) November 7, 2025 19:22


@torch_op("_operator::ge", trace_only=True)
def operator_ge(self: TTensor, other: TTensor) -> BOOL:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be TInt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is more lenient, which I think is ok

@justinchuby justinchuby merged commit a1be5c8 into main Nov 7, 2025
32 of 33 checks passed
@justinchuby justinchuby deleted the justinchu/fix-mod branch November 7, 2025 20:44
@github-project-automation github-project-automation bot moved this from Todo to Done in ONNX Script Review Board Nov 7, 2025
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