Enabling the Single-input Single-output Function
kvCacheCfg=K_CACHE_V_BYPASS, compressType=COMPRESS_TYPE_UNDEFINED
Input
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
key |
[num_tokens, num_head, k_head_size] |
float16/bf16 |
ND |
Key of multiple tokens in the current step. |
keyCache |
[num_blocks, block_size, num_head, k_head_size] |
float16/bf16 |
ND |
All key caches. |
slotMapping |
[num_tokens] |
int32 |
ND |
|
kStrides |
[3] |
int64 |
ND |
Stride of the k tensor. The last element of kStrides is 1. Stride for jumping to each dimension of the next element of the k tensor. The default value is NULL. The number of dimensions is the same as that of the input tensor. |
kOffset |
[1] |
int64 |
ND |
Offset of the k tensor relative to the start address of the memory. The default value is 0. |
Output
Parameter |
Dimension |
Data Type |
Format |
Description |
|---|---|---|---|---|
keyCacheOut |
[num_blocks, block_size, k_num_head, k_head_size] |
float16/bf16 |
ND |
All key caches. The address is the same as that of the input keyCache. |