[CI] Wire untethered test files into CI jobs (#49340)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
62d8db7c05
commit
94100b5915
@@ -147,8 +147,11 @@ def test_dense_norm_rope(num_tokens, num_heads, num_kv_heads):
|
||||
eps,
|
||||
).view(num_tokens, kvsz)
|
||||
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=1e-2, atol=1e-2)
|
||||
# The fused kernel keeps an fp32 intermediate across norm->rope, while the
|
||||
# reference materializes bf16 after the norm (the unfused boundary), so
|
||||
# rounding-boundary elements can differ by ~1 bf16 ulp.
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=2e-2, atol=2e-2)
|
||||
# V is untouched.
|
||||
torch.testing.assert_close(v_out, v_in, rtol=0, atol=0)
|
||||
|
||||
@@ -255,8 +258,11 @@ def test_sparse_full(num_tokens, block_size, kv_cache_dtype):
|
||||
ik_orig.view(num_tokens, 1, HEAD_DIM), ik_w, positions, cos_sin, eps
|
||||
).view(num_tokens, HEAD_DIM)
|
||||
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=1e-2, atol=1e-2)
|
||||
# The fused kernel keeps an fp32 intermediate across norm->rope, while the
|
||||
# reference materializes bf16 after the norm (the unfused boundary), so
|
||||
# rounding-boundary elements can differ by ~1 bf16 ulp.
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(index_q, iq_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(index_k, ik_ref, rtol=1e-2, atol=1e-2)
|
||||
|
||||
@@ -376,8 +382,11 @@ def test_sparse_skip_index_branch(num_tokens, block_size, kv_cache_dtype):
|
||||
eps,
|
||||
).view(num_tokens, kvsz)
|
||||
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=1e-2, atol=1e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=1e-2, atol=1e-2)
|
||||
# The fused kernel keeps an fp32 intermediate across norm->rope, while the
|
||||
# reference materializes bf16 after the norm (the unfused boundary), so
|
||||
# rounding-boundary elements can differ by ~1 bf16 ulp.
|
||||
torch.testing.assert_close(q_out, q_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(k_out, k_ref, rtol=2e-2, atol=2e-2)
|
||||
torch.testing.assert_close(v_out, v_in, rtol=0, atol=0)
|
||||
torch.testing.assert_close(index_q_out, index_q_in, rtol=0, atol=0)
|
||||
torch.testing.assert_close(index_k_out, index_k_in, rtol=0, atol=0)
|
||||
|
||||
@@ -3,8 +3,8 @@ set -xe
|
||||
|
||||
# Parse command line arguments
|
||||
KV_BUFFER_DEVICE="cuda" # Default to cuda
|
||||
PREFILL_GPU_ID=4 # Default GPU IDs
|
||||
DECODE_GPU_ID=5
|
||||
PREFILL_GPU_ID="${PREFILL_GPU_ID:-4}" # Default GPU IDs
|
||||
DECODE_GPU_ID="${DECODE_GPU_ID:-5}"
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--kv_buffer_device)
|
||||
@@ -70,6 +70,7 @@ run_tests_for_model() {
|
||||
--port $PREFILL_PORT \
|
||||
--enforce-eager \
|
||||
--gpu-memory-utilization 0.2 \
|
||||
--max-model-len 8192 \
|
||||
--kv-transfer-config '$KV_CONFIG'"
|
||||
|
||||
FULL_CMD="$BASE_CMD"
|
||||
@@ -84,6 +85,7 @@ run_tests_for_model() {
|
||||
--port $DECODE_PORT \
|
||||
--enforce-eager \
|
||||
--gpu-memory-utilization 0.2 \
|
||||
--max-model-len 8192 \
|
||||
--kv-transfer-config '$KV_CONFIG'"
|
||||
|
||||
FULL_CMD="$BASE_CMD"
|
||||
@@ -98,7 +100,7 @@ run_tests_for_model() {
|
||||
|
||||
# Build the command for the proxy server with all the hosts and ports
|
||||
PROXY_PORT=8192
|
||||
PROXY_CMD="python ${GIT_ROOT}/tests/v1/kv_connector/nixl_integration/toy_proxy_server.py --port $PROXY_PORT"
|
||||
PROXY_CMD="python3 ${GIT_ROOT}/tests/v1/kv_connector/nixl_integration/toy_proxy_server.py --port $PROXY_PORT"
|
||||
PROXY_CMD+=" --prefiller-ports ${PREFILL_PORT}"
|
||||
PROXY_CMD+=" --decoder-ports ${DECODE_PORT}"
|
||||
# Start the proxy server
|
||||
@@ -110,7 +112,7 @@ run_tests_for_model() {
|
||||
|
||||
# Run lm eval for this model
|
||||
echo "Running tests for $model_name"
|
||||
PREFILL_PORT=$PREFILL_PORT DECODE_PORT=$DECODE_PORT PROXY_PORT=$PROXY_PORT python -m pytest -s -v "${GIT_ROOT}"/tests/v1/kv_connector/nixl_integration/test_edge_cases.py
|
||||
PREFILL_PORT=$PREFILL_PORT DECODE_PORT=$DECODE_PORT PROXY_PORT=$PROXY_PORT python3 -m pytest -s -v "${GIT_ROOT}"/tests/v1/kv_connector/nixl_integration/test_edge_cases.py
|
||||
|
||||
# Clean up before running next model
|
||||
cleanup_instances
|
||||
|
||||
Reference in New Issue
Block a user