-
Notifications
You must be signed in to change notification settings - Fork 33
[Maintain][Manifest] flip All/Any/CountNonzero reduction ops to implemented #1431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -636,7 +636,7 @@ ArgminFwdOp: | |
| AllFwdOp: | ||
| ref_api: "torch.all" | ||
| family: reduction | ||
| status: spec-only # dim=None not yet implemented; update when impl lands | ||
| status: implemented | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Marking
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Item-by-item verdict:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verified false positive after empirical check. Ran
Reason: TileLang lowers If you have a counter-example shape that triggers the OOB I'd happily re-run sanitizer on it, but on the configs the kernel actually compiles to for these ops, there's no real-world OOB to fix.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed on the default- On
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These entries still do not conform to the PyTorch API: the shared reduce path rejects scalar tensors ( |
||
|
|
||
| signature: | ||
| inputs: | ||
|
|
@@ -682,7 +682,7 @@ AllFwdOp: | |
| AnyFwdOp: | ||
| ref_api: "torch.any" | ||
| family: reduction | ||
| status: spec-only # dim=None not yet implemented; update when impl lands | ||
| status: implemented | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed — same root cause as
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Marking
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same verdicts as the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed same as the |
||
|
|
||
| signature: | ||
| inputs: | ||
|
|
@@ -728,7 +728,7 @@ AnyFwdOp: | |
| CountNonzeroFwdOp: | ||
| ref_api: "torch.count_nonzero" | ||
| family: reduction | ||
| status: spec-only # dim=None not yet implemented; update when impl lands | ||
| status: implemented | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a few inconsistencies in the manifest for
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Item-by-item verdict:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Marking
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same verdicts as the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed — |
||
|
|
||
| signature: | ||
| inputs: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While flipping the status to
implementedis correct given the implementation provided, there is a discrepancy between the manifest and the Python implementation intileops/ops/reduction/all_op.py. The manifest defines the default fordimasnull(None), which matchestorch.allbehavior (full reduction). However, the implementation inall_op.py(line 65) defaults to-1. This inconsistency should be resolved to ensure the op behaves as specified when used via the manifest-driven API or when instantiated without arguments.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified —
AllFwdOp.__init__(tileops/ops/reduction/all_op.py:65) defaultsdim=-1, manifest saysnull. The code-only prereq PR will flip the default toNone(same change planned for_ReduceOpBase,_WelfordReduceOp,AnyFwdOp,CountNonzeroFwdOp).