Skip to content

Commit bb246a0

Browse files
committed
test: Size the HSTU KV cache for a CI slice of a node
FlexKV's client waits 30s for its server, which is ready only once the host cache is prepared. The stock 19GB sizing overruns that on the CPUs a CI job gets, so serve from a 6GB copy of the config. The export applies the same sizing, and the GPU page count the exported package depends on is untouched.
1 parent cf2036e commit bb246a0

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

qa/L0_torch_aoti_hstu/test.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,18 @@ BACKENDS=${BACKENDS:="pytorch"}
6161
export BACKENDS
6262

6363
export FLEXKV_LOG_LEVEL=${FLEXKV_LOG_LEVEL:="WARNING"}
64-
export KVCACHE_MANAGER_CONFIG_FILE=${KVCACHE_MANAGER_CONFIG_FILE:=${AOTI_DIR}/kvcache_cpp_runtime.yaml}
64+
65+
# The KV-cache client waits 30s for its server, and the server is ready only
66+
# once it has prepared the host cache, which the stock 19GB sizing does not
67+
# manage in time on a CI slice of a node. The export applies the same sizing,
68+
# and the GPU-side page count the exported package depends on is untouched.
69+
HOST_CAPACITY_PER_LAYER=${HSTU_HOST_CAPACITY_PER_LAYER:=2147483648}
70+
CPU_CACHE_GB=${HSTU_CPU_CACHE_GB:=6}
71+
KVCACHE_CONFIG="${TESTDIR}/kvcache_cpp_runtime.yaml"
72+
sed -e "s/^host_capacity_per_layer: .*/host_capacity_per_layer: ${HOST_CAPACITY_PER_LAYER}/" \
73+
-e "s/^cpu_cache_gb: .*/cpu_cache_gb: ${CPU_CACHE_GB}/" \
74+
${AOTI_DIR}/kvcache_cpp_runtime.yaml > ${KVCACHE_CONFIG}
75+
export KVCACHE_MANAGER_CONFIG_FILE=${KVCACHE_MANAGER_CONFIG_FILE:=${KVCACHE_CONFIG}}
6576

6677
KVCACHE_PID=0
6778

0 commit comments

Comments
 (0)