Skip to content

Fix the device error when using ray as vllm-acend backend #884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhuo97
Copy link

@zhuo97 zhuo97 commented May 16, 2025

  1. Remove RAY_EXPERIMENTAL_NOSET_ASCEND_RT_VISIBLE_DEVICES
  2. Add lazy init for vllm_ascend_C



def custom_rotary_embedding_enabled(query, neox_style, head_size):
return query.dtype == torch.float16 and neox_style and head_size % 32 == 0 and CUSTOM_OP_ENABLED
try_register_lib("vllm_ascend.vllm_ascend_C")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failed. I guess the problem is here. for rotary_embedding test, this func should be called as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot to modify test_rotary_embedding.py to use try_register_lib("vllm_ascend.vllm_ascend_C") instead of import vllm_ascend.platform.

@wangxiyuan
Copy link
Collaborator

CI failure has been fixed. Please rebase main again. Thanks.

import vllm_ascend.platform # noqa: F401
from vllm_ascend.utils import try_register_lib

try_register_lib("vllm_ascend.vllm_ascend_C")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please pass lib_info as well to keep the same as before:
Failed to register custom ops, all custom ops will be disabled

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, the information is added.

…or vllm_ascend_C

Signed-off-by: zhuo97 <1103045176@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants