MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / mmcv_links

Function mmcv_links

install.py:56–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55
56def mmcv_links():
57 try:
58 import torch
59 except ImportError as e:
60 print('Pytorch is not installed.')
61 raise e
62 cuda_version = torch.version.cuda
63 if cuda_version is None:
64 print('Pytorch is cpu only.')
65 raise NotImplementedError
66
67 cuda_version_str = torch.version.cuda.replace('.', '')
68 pyt_version = torch.__version__.split('+')[0].split('.')
69 pyt_version_mmcv = pyt_version[0] + '.' + pyt_version[1]
70 mmcv_links = f'https://download.openmmlab.com/mmcv/dist/cu{cuda_version_str}/torch{pyt_version_mmcv}/index.html' # noqa: E501
71 return mmcv_links
72
73
74def install_package(line):

Callers 1

install_packageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected