Skip to content

Inconsistency in the latency breakdown measurement #20

Description

@roo-nju

According to Fig. 12(b), the PQ computation time includes top-k token index time, without the communication latency of top-k tokens' kv from host CPU. However, in the pq_search.py file, the pq_start and pq_end functions profile the entire process including the communication latency (cache_managers[self.rank].fetch_and_concat_kv_w_cache), which contradicts what the paper said. Could you please explain on this?

Activity

  1. BirdChristopher commented on Feb 14, 2026

    @BirdChristopher
    Collaborator

    The data transfer between CPU and GPU can be executed in parallel.

    In our code we put pq computation and kv transfer in different cuda stream such that the computation and KV transfer are overlapped. Since the pq_start and pq_end cuda event is recorded in "computation stream", theoretically the measurement result doesn't include the communication latency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions