deallocate_cache
Applicability
Product |
Supported (Yes/No) |
|---|---|
Atlas 350 Accelerator Card |
No |
Yes |
|
Yes |
|
No |
|
No |
|
No |
Note: For the
Function Description
Releases the cache.
If the cache is associated with a cache key during allocation, the actual release is delayed until all cache keys are pulled or remove_cache_key is executed.
Prototype
1 | deallocate_cache(cache: KvCache) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
cache |
KV cache to be deallocated. |
Example
1 | kv_cache_manager.deallocate_cache(kv_cache) |
Returns
In normal cases, no value is returned.
If a parameter is incorrect, a TypeError or ValueError may be thrown.
If the execution time exceeds the value of sync_kv_timeout, an LLMException is thrown.
Constraints
- If KvCache does not exist or has been released, this operation is a no-operation.
- This API does not support concurrent calls.