[Fix] Delete version verification of CANN on Ascend NPU (#232)

pull/234/head
6V 2023-11-01 15:57:19 +08:00 committed by GitHub
parent c9a5ea6a88
commit b40fe72e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 6 deletions

View File

@ -170,10 +170,6 @@ def get_mmcv_full_find_link(mmcv_base_url: str) -> str:
if device == 'cuda' and device_v.isdigit():
device_link = f'cu{device_v}'
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}'
else:
device_link = 'cpu'

View File

@ -353,7 +353,7 @@ def get_npu_version() -> str:
'installing OpenMMLab projects on Ascend NPU.'
"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

View File

@ -45,7 +45,6 @@ def test_get_torch_device_version():
assert torch_v.replace('.', '').isdigit()
if is_npu_available():
assert device == 'ascend'
assert device_v.replace('.', '').isdigit()
def teardown_module():