Skip to content
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

[Bug] non-async call in async fn #3160

Open
3 tasks done
lz1998 opened this issue Feb 19, 2025 · 1 comment
Open
3 tasks done

[Bug] non-async call in async fn #3160

lz1998 opened this issue Feb 19, 2025 · 1 comment
Assignees

Comments

@lz1998
Copy link
Contributor

lz1998 commented Feb 19, 2025

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

这个 async 是不是假的,里面的 forward 是同步的,CPU 执行到这里,等待 GPU 过程中不会让出执行权。
https://github.com/InternLM/lmdeploy/blob/main/lmdeploy/pytorch/engine/model_agent.py#L260

Reproduction

https://github.com/InternLM/lmdeploy/blob/main/lmdeploy/pytorch/engine/model_agent.py#L260

Environment

https://github.com/InternLM/lmdeploy/blob/main/lmdeploy/pytorch/engine/model_agent.py#L260

Error traceback

@grimoire
Copy link
Collaborator

_forward_impl 起 kernel 之后 asyncio.sleep(0) 会让出的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants