Annotated call graph of one generate request
CPU · your Macreading-code300 minrequiredGoal · Produce a markdown document that traces one chat completion request through vLLM V1 with file and line references at every hop.
- 1git clone https://github.com/vllm-project/vllm and check out the latest release tag; note the commit hash in your document.
- 2Start at vllm/entrypoints/openai/api_server.py and find the handler for /v1/chat/completions; record the function and the object it calls.
- 3Follow into vllm/v1/engine/async_llm.py and vllm/v1/engine/core.py; record how requests cross the process boundary.
- 4Open vllm/v1/core/sched/scheduler.py; annotate schedule() with the decisions it makes (new requests, running requests, preemption, token budget).
- 5Open vllm/v1/core/kv_cache_manager.py; record allocate_slots and free and how block hashes enable prefix caching.
- 6Open vllm/v1/worker/gpu_model_runner.py; find execute_model, the attention metadata build, and CUDA graph capture/replay.
- 7Open the attention backend directory and locate the backend class for FlashAttention; record which kernel is called.
- 8Draw the full path as a mermaid or ASCII call graph with a one-line note per node and a path:line reference.
- Deliverable
- vllm-request-trace.md containing the call graph, commit hash and at least 12 path:line references.
- Check
- A second person (or you after a week) can open any referenced path:line and find the described function; every hop from HTTP to sampled token is covered with no gaps.