-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Add Intel GPU info collection to the collect env script #137846
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137846
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Cancelled Jobs, 1 Unrelated FailureAs of commit dc8231a with merge base a777dea (): NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
0f6eaa9
to
f1cf6ec
Compare
torch/utils/collect_env.py
Outdated
ret = run_and_read_all( | ||
run_lambda, | ||
'powershell.exe "gwmi -Class Win32_OperatingSystem | Select-Object -Property Caption,\ | ||
OSArchitecture,Version | ConvertTo-Json"', | ||
) | ||
try: | ||
obj = json.loads(ret) | ||
ret = f'{obj["Caption"]} ({obj["Version"]} {obj["OSArchitecture"]})' | ||
except ValueError as e: |
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.
Can you please land this one as separate PR
@@ -146,7 +151,7 @@ def get_nvidia_driver_version(run_lambda): | |||
return run_and_parse_first_match(run_lambda, smi, r'Driver Version: (.*?) ') | |||
|
|||
|
|||
def get_gpu_info(run_lambda): | |||
def get_nvidia_gpu_info(run_lambda): |
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.
Please don't delete any existing functions, as this might be considered a public API change
torch/utils/collect_env.py
Outdated
if mgr_name == "": | ||
rc, _, _ = run("which dpkg") | ||
if rc == 0: | ||
mgr_name = "dpkg" | ||
if mgr_name == "": | ||
rc, _, _ = run("which dnf") | ||
if rc == 0: | ||
mgr_name = "dnf" | ||
if mgr_name == "": | ||
rc, _, _ = run("which yum") | ||
if rc == 0: | ||
mgr_name = "yum" | ||
if mgr_name == "": | ||
rc, _, _ = run("which zypper") | ||
if rc == 0: | ||
mgr_name = "zypper" |
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.
Please Avoid code duplication, use loops
if mgr_name == "": | |
rc, _, _ = run("which dpkg") | |
if rc == 0: | |
mgr_name = "dpkg" | |
if mgr_name == "": | |
rc, _, _ = run("which dnf") | |
if rc == 0: | |
mgr_name = "dnf" | |
if mgr_name == "": | |
rc, _, _ = run("which yum") | |
if rc == 0: | |
mgr_name = "yum" | |
if mgr_name == "": | |
rc, _, _ = run("which zypper") | |
if rc == 0: | |
mgr_name = "zypper" | |
for mgr_name in ["dpkg", "dnf", "yum", "zypper", ""]: | |
if mgr_name == "": | |
continue | |
rc, _, _ = run(f"which {mgr_name}") | |
if rc == 0: | |
break |
77fb09d
to
dc8231a
Compare
wmic
is deprecated on Windows, this PR updates the usage ofwmic
to its counterpart inpowershell
. WMI command line (WMIC) utility deprecation: Next stepscc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang