Skip to content

Conversation

justinchuby
Copy link
Collaborator

ORT matmul produces nan on inputs with zero elements nondeterministically.

Fixes #538

@justinchuby
Copy link
Collaborator Author

@BowenBao Inputs are actually printed here
image

I just didn't realize it was special

@justinchuby justinchuby added the merge at lgtm Reviewers can merge when they approve label Apr 3, 2023
@@ -821,6 +821,11 @@ def _where_input_wrangler(
matcher=lambda sample: not (sample.args[0][0].dtype == torch.bool),
reason="this Aten overload only support tensor(bool) as args",
),
skip(
"matmul",
matcher=lambda sample: torch.numel(sample.input) == 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

what is relationship of sample.input and sample.args btw?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

input is the first input. args[...] starts from the second

@github-advanced-security
Copy link
Contributor

You have successfully added a new lintrunner configuration lintrunner. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #586 (2027431) into main (b8a146a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #586   +/-   ##
=======================================
  Coverage   74.13%   74.13%           
=======================================
  Files         109      109           
  Lines       11157    11157           
  Branches     1147     1147           
=======================================
  Hits         8271     8271           
  Misses       2575     2575           
  Partials      311      311           
Impacted Files Coverage Δ
...s/function_libs/torch_aten/ops_correctness_test.py 90.42% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@justinchuby justinchuby merged commit 4e48132 into main Apr 3, 2023
@justinchuby justinchuby deleted the justinchu/flaky-matmul branch April 3, 2023 23:25
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Jan 26, 2024
Fixes #117718
Fixes #117725

It's actually a known issue in microsoft/onnxscript#586, and we do exclude the empty input test cases in aten_matmul. This PR follows the skip, and add aten_mm as well.

Pull Request resolved: #118413
Approved by: https://github.com/thiagocrepaldi
jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Feb 8, 2024
Fixes pytorch#117718
Fixes pytorch#117725

It's actually a known issue in microsoft/onnxscript#586, and we do exclude the empty input test cases in aten_matmul. This PR follows the skip, and add aten_mm as well.

Pull Request resolved: pytorch#118413
Approved by: https://github.com/thiagocrepaldi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge at lgtm Reviewers can merge when they approve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI break: ATenlib matmul is flaky
2 participants