diff --git a/vllm_ascend/platform.py b/vllm_ascend/platform.py index 0d295548..1c2a3391 100644 --- a/vllm_ascend/platform.py +++ b/vllm_ascend/platform.py @@ -370,6 +370,17 @@ class NPUPlatform(Platform): "needs to be equal if use cp or dcp > 1 in P/D disaggregate scenario." ) + @classmethod + def import_kernels(cls) -> None: + # Directly importing vllm_ascend_C prevents ASCEND_RT_VISIBLE_DEVICES + # from being applied during runtime initialization, which causes bugs + # in the RL module. Therefore, we currently use lazy initialization + # to avoid this issue. See https://github.com/vllm-project/vllm-ascend/pull/884. + # TODO: when the above issue is fixed, we can uncomment the following lines. + # from vllm_ascend.utils import enable_custom_op + # enable_custom_op() + pass + @classmethod def get_attn_backend_cls( cls,