| 33 | |
| 34 | |
| 35 | def pytorch3d_links(): |
| 36 | try: |
| 37 | import torch |
| 38 | except ImportError as e: |
| 39 | print('Pytorch is not installed.') |
| 40 | raise e |
| 41 | cuda_version = torch.version.cuda |
| 42 | if cuda_version is None: |
| 43 | print('Pytorch is cpu only.') |
| 44 | raise NotImplementedError |
| 45 | |
| 46 | pyt_version_str = torch.__version__.split('+')[0].replace('.', '') |
| 47 | cuda_version_str = torch.version.cuda.replace('.', '') |
| 48 | version_str = ''.join([ |
| 49 | f'py3{sys.version_info.minor}_cu', cuda_version_str, |
| 50 | f'_pyt{pyt_version_str}' |
| 51 | ]) |
| 52 | pytorch3d_links = f'https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html' # noqa: E501 |
| 53 | return pytorch3d_links |
| 54 | |
| 55 | |
| 56 | def mmcv_links(): |