Repository navigation
[Hardware][Gaudi][Feature] Support Contiguous Cache Fetch - #12139
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
2bbc892 to
d622b98
Compare
Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com>
Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com>
Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com>
Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com>
Signed-off-by: zhouyu5 <yu.zhou@intel.com>
Signed-off-by: zhouyu5 <yu.zhou@intel.com>
0952f55 to
81c362d
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
/ready |
|
This pull request has merge conflicts that must be resolved before it can be |
|
All test passed, could you help merge it? @comaniac |
…ct#12139) Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
…ct#12139) Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
…ct#12139) Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
…ct#12139) Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
…ct#12139) Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
…ct#12139) Signed-off-by: yuzhou <yuzhou@habana.ai> Signed-off-by: zhouyu5 <yu.zhou@intel.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
…cannot share it - Triton attention initialized the per-token-head quantized KV cache scales with `fill_(1.0)` over all `num_blocks`, but the extensible KV cache backs only a prefix of them during warmup, so the fill touched unmapped memory (illegal memory access). The attention kernels read scales only below each sequence's length, where they are written with their tokens, so they need no initialization. - The extensible KV cache's views do not keep it alive, and the model runner can outlive shutdown in an in-process engine, so its memory was still mapped afterwards (tests asserting that GPU memory is freed failed). Unmap it explicitly in `shutdown()`. - Skip freeing an extensible tensor's mappings during interpreter finalization: the process releases them on exit, and the HIP runtime may already be torn down, where a driver call aborts the process. - LMCacheMPConnector shares the KV cache through legacy CUDA IPC, which cannot export driver-mapped memory on any platform. Keep the extensible KV cache off with it by default, and reject an explicit request. - On ROCm, UCX does not yet recognize memory mapped with `hipMemMap` (`HSA_EXT_POINTER_TYPE_HSA_VMEM`) and ROCr cannot export it as a dma-buf for RDMA, so the NIXL, Mooncake and MoRIIO connectors fail to register the KV cache. Keep the extensible KV cache off on ROCm when one of them registers device KV cache memory (directly or within MultiConnector), until fixed releases are available (openucx/ucx#12137, #12138, #12139, #12140; ROCm/rocm-systems#13989). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Nick Hill <nickhill123@gmail.com>
Contiguous cache fetching to avoid using costly gather operation on Gaudi3. Requires changes in vllm-hpu-extension (HabanaAI/vllm-hpu-extension#17) to work.
Introduces redundant calculations in decoding phase. Feature improves the performance of all tested workloads over the entire benchmark (5-12%) on Gaudi3. commit further improves the performance of this feature (9-22%). Feature negatively impacts the performance of Gaudi2.
Use VLLM_CONTIGUOUS_PA=true environment variable to enable.