copy_blocks
Applicability
Product |
Supported (√/x) |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
√ |
|
x |
|
x |
|
x |
Note: For
Function Description
Copies blocks in the PagedAttention scenario.
Prototype
1 | copy_blocks(cache: Cache, copy_block_info: Dict[int, List[int]]) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
cache |
Target cache. |
|
copy_block_info |
Dict[int, List[int]] |
A dictionary mapping original block indices to lists of target block indices. |
Example
1 | cache_manager.copy_blocks(cache, {1: [2,3]}) |
Returns
In normal cases, no value is returned.
If the input data type is incorrect, the TypeError or ValueError exception is reported.
If the execution time exceeds the value of sync_kv_timeout, an LLMException is thrown.
Restrictions
None