mirror of https://github.com/open-mmlab/mim.git
[Fix] Delete version verification of CANN on Ascend NPU (#232)
parent
c9a5ea6a88
commit
b40fe72e2f
|
@ -170,10 +170,6 @@ def get_mmcv_full_find_link(mmcv_base_url: str) -> str:
|
||||||
if device == 'cuda' and device_v.isdigit():
|
if device == 'cuda' and device_v.isdigit():
|
||||||
device_link = f'cu{device_v}'
|
device_link = f'cu{device_v}'
|
||||||
elif device == 'ascend':
|
elif device == 'ascend':
|
||||||
if not device_v.isdigit():
|
|
||||||
exit_with_error('Unable to install OpenMMLab projects via mim '
|
|
||||||
'on the current Ascend NPU, '
|
|
||||||
'please compile from source code to install.')
|
|
||||||
device_link = f'ascend{device_v}'
|
device_link = f'ascend{device_v}'
|
||||||
else:
|
else:
|
||||||
device_link = 'cpu'
|
device_link = 'cpu'
|
||||||
|
|
|
@ -353,7 +353,7 @@ def get_npu_version() -> str:
|
||||||
'installing OpenMMLab projects on Ascend NPU.'
|
'installing OpenMMLab projects on Ascend NPU.'
|
||||||
"Please run 'source set_env.sh' in the CANN installation path."
|
"Please run 'source set_env.sh' in the CANN installation path."
|
||||||
))
|
))
|
||||||
npu_version = torch_npu.get_cann_version(ascend_home_path)
|
npu_version = torch_npu.get_cann_version(ascend_home_path).lower()
|
||||||
return npu_version
|
return npu_version
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ def test_get_torch_device_version():
|
||||||
assert torch_v.replace('.', '').isdigit()
|
assert torch_v.replace('.', '').isdigit()
|
||||||
if is_npu_available():
|
if is_npu_available():
|
||||||
assert device == 'ascend'
|
assert device == 'ascend'
|
||||||
assert device_v.replace('.', '').isdigit()
|
|
||||||
|
|
||||||
|
|
||||||
def teardown_module():
|
def teardown_module():
|
||||||
|
|
Loading…
Reference in New Issue