diff --git a/vllm_ascend/device_allocator/camem.py b/vllm_ascend/device_allocator/camem.py index d34c319..7592a04 100644 --- a/vllm_ascend/device_allocator/camem.py +++ b/vllm_ascend/device_allocator/camem.py @@ -60,7 +60,8 @@ try: lib_name = find_loaded_library("vllm_ascend_C") camem_available = True except ImportError as e: - logger.error("Failed to import vllm_ascend_C:%s", e) + logger.warning( + "Failed to import vllm_ascend_C:%s. Sleep mode will be disabled. ", e) init_module = None python_create_and_map = None python_unmap_and_release = None diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 28cda89..a7b7079 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -31,13 +31,11 @@ CUSTOM_OP_ENABLED = False try: # register custom ops into torch_library here import vllm_ascend.vllm_ascend_C # type: ignore # noqa: F401 - -except ImportError: - logging.warning( - "Warning: Failed to register custom ops, all custom ops will be disabled" - ) -else: CUSTOM_OP_ENABLED = True +except ImportError as e: + logging.warning( + "Failed to import 'vllm_ascend.vllm_ascend_C': %s. All custom ops will be disabled. ", + e) if TYPE_CHECKING: from vllm.config import ModelConfig, VllmConfig