Use cuda nvrtc so file based on cuda version used by torch#163642
Use cuda nvrtc so file based on cuda version used by torch#163642atalman wants to merge 3 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163642
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit 26e0629 with merge base 1a42656 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
||
|
|
||
| def _get_nvrtc_library() -> ctypes.CDLL: | ||
| major_version = int(torch.version.cuda.split(".")[0]) # type: ignore[union-attr] |
There was a problem hiding this comment.
Just use a torch.utils._typing_utils not_none here instead of a type ignore
There was a problem hiding this comment.
Tried this, Looks like torch.utils._typing_utils not_none creates circular dependency issue.
| return ctypes.CDLL(lib_name) | ||
| except OSError: | ||
| continue | ||
| raise OSError("Could not find any NVRTC library") |
There was a problem hiding this comment.
Why not store the last OSError in an optional and chain from there to preserve the trace?
| for lib_name in nvrtc_libs: | ||
| try: | ||
| return ctypes.CDLL(lib_name) | ||
| except OSError: |
There was a problem hiding this comment.
Probably should at least be a logger.debug with exc_info=True
|
@pytorchmergebot 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 |
|
@pytorchbot cherry-pick --onto release/2.9 --fixes "Critical CI fix" -c critical |
Cherry picking #163642Command Details for Dev Infra teamRaised by workflow job |
…63642) Fixes pytorch#162367 Pull Request resolved: pytorch#163642 Approved by: https://github.com/msaroufim
…163788) Fixes #162367 Pull Request resolved: #163642 Approved by: https://github.com/msaroufim
Fixes #162367 Pull Request resolved: #163642 Approved by: https://github.com/msaroufim
Fixes #162367
cc @msaroufim @tinglvv @nWEIdia