Skip to content
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

Fix scalar type resolution for optional tensor #94427

Conversation

thiagocrepaldi
Copy link
Collaborator

When TorchScript Value has an optional tensor, dtype() or scalarType() is not available and raise (by design).

The symbolic _op_with_optional_float_cast must check whether the tensor is otpional or not before calling the scalar type resolution API. This PR fixes that

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 8, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/94427

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Failures

As of commit f0c231c:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: onnx torch.onnx related changes that should show up in the release notes label Feb 8, 2023
@thiagocrepaldi thiagocrepaldi self-assigned this Feb 8, 2023
@thiagocrepaldi thiagocrepaldi added the module: onnx Related to torch.onnx label Feb 8, 2023
@thiagocrepaldi
Copy link
Collaborator Author

@pytorch merge -g

@thiagocrepaldi
Copy link
Collaborator Author

@pytorchbot merge -g

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 8, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 mandatory check(s) failed (Rule ONNX exporter). The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

@thiagocrepaldi thiagocrepaldi force-pushed the thiagofc/fix-_op_with_optional_float_cast branch from 9d4b8fb to e54369a Compare February 8, 2023 19:47
Copy link
Collaborator

@shubhambhokare1 shubhambhokare1 left a comment

Choose a reason for hiding this comment

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

LGTM! Fix lint issues?

@thiagocrepaldi thiagocrepaldi force-pushed the thiagofc/fix-_op_with_optional_float_cast branch from e54369a to f0c231c Compare February 8, 2023 22:36
@thiagocrepaldi

This comment was marked as outdated.

@pytorch-bot

This comment was marked as outdated.

@thiagocrepaldi
Copy link
Collaborator Author

@pytorchbot merge -f "Unrelated lint failure: python3: can't open file '/home/runner/work/pytorch/pytorch/.github/scripts/collect_ciflow_labels.py': [Errno 2] No such file or directory"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@thiagocrepaldi thiagocrepaldi added this to the 2.0.0 milestone Feb 9, 2023
@thiagocrepaldi thiagocrepaldi deleted the thiagofc/fix-_op_with_optional_float_cast branch May 4, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: onnx Related to torch.onnx open source release notes: onnx torch.onnx related changes that should show up in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants