[Feature] Support AsyncLLM (#4458)
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled

* add async_llm

* apply review

* update engine config

* Adapt to latest engine.py changes

* add more unit tests

* Increase unit test coverage

---------

Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
This commit is contained in:
zhouchong
2025-10-22 15:50:12 +08:00
committed by GitHub
parent b6cd3aec70
commit dce988824d
3 changed files with 2188 additions and 1 deletions
+9 -1
View File
@@ -717,7 +717,15 @@ class EngineService:
and (not is_fetching)
and self.exist_prefill_task_signal.value[0] == 0
):
get_request_pool.submit(_fetch_request)
# Check if the thread pool is still available to avoid submitting tasks to a shutdown thread pool.
try:
get_request_pool.submit(_fetch_request)
except RuntimeError as e:
if "shutdown" in str(e):
llm_logger.info("Thread pool shutdown detected, exiting scheduler loop")
break
else:
raise
# 2. Schedule requests
tasks = self.resource_manager.schedule()
# 3. Send to engine