Skip to content

Commit

Permalink
[Fix] Delete version verification of CANN on Ascend NPU (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
6Vvv authored Nov 1, 2023
1 parent c9a5ea6 commit b40fe72
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions mim/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion mim/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 0 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit b40fe72

Please sign in to comment.