-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Allow cublas an cudnn to be in different nvidia folders #92122
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
Allow cublas an cudnn to be in different nvidia folders #92122
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/92122
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4ef41de: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
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 sign CLA (and keep Linux assert in place), otherwise looks good to me
torch/__init__.py
Outdated
# Should only be called on Linux if default path resolution have failed | ||
assert platform.system() == 'Linux', 'Should only be called on Linux' |
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 keep this check, as .so
checks make sense only on Linux
candidate_cublas_path = os.path.join(nvidia_path, 'cublas', 'lib', 'libcublas.so.11') | ||
if os.path.exists(candidate_cublas_path) and not cublas_path: | ||
cublas_path = candidate_cublas_path |
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.
candidate_cublas_path = os.path.join(nvidia_path, 'cublas', 'lib', 'libcublas.so.11') | |
if os.path.exists(candidate_cublas_path) and not cublas_path: | |
cublas_path = candidate_cublas_path | |
candidate_cublas_path = os.path.join(nvidia_path, 'cublas', 'lib', 'libcublas.so.11') | |
if os.path.exists(candidate_cublas_path) and not cublas_path: | |
if cublas_path is not None: | |
import warnings | |
warnings.warn(f"Replacing previosly found cublas {cublas_path} with new candidate {candidate_cublas_path}") | |
cublas_path = candidate_cublas_path |
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.
I'm confused by your suggestion. As written the warning will never happen. Did you mean the following?
if os.path.exists(candidate_cublas_path):
if cublas path is not None:
import warnings
warnings.warn(f"Replacing previosly found cublas {cublas_path
8000
} with new candidate {candidate_cublas_path}")
cublas_path = candidate_cublas_path
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.
But also I thought the general pattern is to take libraries from earlier in the path if possible, so shouldn't we never do the replacement?
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.
@malfet I've pushed just the assert. LMK if you definitely want these warnings and modified logic.
cublas_path = candidate_cublas_path | ||
candidate_cudnn_path = os.path.join(nvidia_path, 'cudnn', 'lib', 'libcudnn.so.8') | ||
if os.path.exists(candidate_cudnn_path) and not cudnn_path: | ||
cudnn_path = candidate_cudnn_path |
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.
Similar to the above, please add a warning there
I've signed the CLA document. I'm not sure why the check is failing. |
/easycla |
d3345ea
to
97176fc
Compare
/easycla |
97176fc
to
4ef41de
Compare
CLA fixed |
@malfet I think this is good to merge, though it looks like I can't merge it myself. |
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: This PR is too stale; the last push date was more than 3 days ago. Please rebase and try again. You can rebase by leaving the following comment on this PR: Details for Dev Infra teamRaised by workflow job |
@pytorchbot rebase |
You don't have permissions to rebase this PR since you are a first time contributor. If you think this is a mistake, please contact PyTorch Dev Infra. |
@pytorchbot merge -f "Lint is green and this code is not really tested by CI" |
Merge startedYour 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 |
Fixes #92096