create_cpu_cache
Applicability
Product |
Supported (√/x) |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
√ |
|
x |
|
x |
|
x |
Note: For
Function Description
Creates a CPU cache.
Prototype
1 | create_cpu_cache(cache_desc: CacheDesc, addrs: List[int]) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
cache_desc |
Cache description. |
|
addrs |
List[int] |
Address of the CPU cache. |
Example
1 2 | from llm_datadist import Cache cpu_cache = Cache.create_cpu_cache(cpu_cache_desc, cpu_addrs) # cpu_addrs is obtained from the created CPU tensors. |
Returns
In normal cases, a CPU cache of the cache type is returned.
If the input data type is incorrect, the TypeError or ValueError exception is reported.
If the input parameter is None, the AttributeError exception is reported.
Restrictions
None
Parent topic: Cache