-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fix collect_env.py with older version of PyTorch #48076
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 collect_env.py with older version of PyTorch #48076
Conversation
💊 CI failures summary and remediationsAs of commit fc1ab5b (more details on the Dr. CI page):
codecov.io: 1 failed
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 5 times. |
Codecov Report
@@ Coverage Diff @@
## master #48076 +/- ##
==========================================
- Coverage 81.31% 81.16% -0.16%
==========================================
Files 1839 1839
Lines 198670 198670
==========================================
- Hits 161544 161245 -299
- Misses 37126 37425 +299 |
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.
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
lgtm 👍 could you add a test plan to this PR though? I see a bunch of discussion in the linked issue, but it would be nice if you could summarize here the exact steps one would need to take to reproduce the past and current behavior.
|
@samstep Hi. I updated the PR description about how to reproduce the crash. It's dead simple. I assume torch<=1.2.0 would all suffer from this. With this fix, it will not crash any more. However I don't know what exactly a "test plan" is. Is it something I should add in the PR description, or is it something more like a unit test? |
|
@skyline75489 Awesome, thanks :) and no you don't need to add a unit test or anything, that's all I was looking for. Now I just need another FB employee to approve the diff that I imported so I can land your change 👍 |
Summary: Inspired by pytorch#47993, this fixes the import error in `collect_env.py` with older version of PyTorch when `torch.version` does not have `hip` property. Pull Request resolved: pytorch#48076 Reviewed By: seemethere, xuzhao9 Differential Revision: D25024352 Pulled By: samestep fbshipit-source-id: 7dff9d2ab80b0bd25f9ca035d8660f38419cdeca
Inspired by #47993, this fixes the import error in
collect_env.pywith older version of PyTorch whentorch.versiondoes not havehipproperty.The way to reproduce the crash is simple:
collect_env.py