Skip to content

Conversation

@isuruf
Copy link
Collaborator

@isuruf isuruf commented Sep 16, 2024

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 16, 2024

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit e8ee252 with merge base d2207c5 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@rghosh08
Copy link

rghosh08 commented Sep 16, 2024

PR Code Suggestions ✨

CategorySuggestion                                                                                                                                    Score
Possible issue
Add a condition to handle the case where the exponent is zero

Ensure that the condition exp.is_Integer is not sufficient for the case where exp is
zero, as it would lead to incorrect results.

torch/fx/experimental/symbolic_shapes.py [147]

-+        if exp.is_Integer and base.is_Add:
++        if exp.is_Integer and (base.is_Add or exp != 0):
 
Suggestion importance[1-10]: 8

Why: The suggestion correctly identifies a potential issue with the existing code and provides a clear and concise solution to address it.

8
Best practice
Add a check to prevent potential attribute access errors

Consider adding a check to ensure that base.is_Add is not None before accessing its
attributes.

torch/fx/experimental/symbolic_shapes.py [147]

-+        if exp.is_Integer and base.is_Add:
++        if exp.is_Integer and base is not None and base.is_Add:
 
Suggestion importance[1-10]: 6

Why: The suggestion is a good practice, but it's not crucial for the correctness of the code. It's still a valuable improvement for maintainability and robustness.

6

@isuruf isuruf requested a review from ezyang September 17, 2024 19:25
@ezyang
Copy link
Contributor

ezyang commented Sep 17, 2024

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 17, 2024
@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

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@isuruf
Copy link
Collaborator Author

isuruf commented Sep 18, 2024

@pytorchbot merge

@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

isuruf added a commit to isuruf/pytorch that referenced this pull request Sep 23, 2024
ghstack-source-id: 1f55685
Pull Request resolved: pytorch#136163
@github-actions github-actions bot deleted the gh/isuruf/93/head branch October 19, 2024 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: fx release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants