← All questions
Retrieval & EmbeddingsHard· Prefetching· Latency· Pipeline optimization

You wire up prefetching, but the profiler still shows the transfer sitting on the critical path and latency didn’t drop. What broke?

When prefetching fails to reduce latency, it is often because the two operations are not actually running in parallel. If the prefetch logic waits for the final query-rewrite to complete, it is merely performing two sequential steps under the guise of a pipeline. To fix this, you must decouple the operations so that the CPU-side estimation and the GPU transfer start as soon as a usable draft embedding is generated.

Code playground (Python)