[Radix Cache] Add Rust TreeCore backend with shared parity tests (#32710)
Co-authored-by: alphabetc1 <2508695655@qq.com> Co-authored-by: ispobock <ispobaoke@gmail.com>
This commit is contained in:
co-authored by
alphabetc1
ispobock
parent
52e1c24744
commit
9cf157c252
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Copy the built PyO3 extension modules into rust-ext-staging/rust_extensions/ for
|
||||
# upload-artifact. Shared by both jobs of _pr-test-rust-ext-build.yml, so the
|
||||
# archive layout and the module-count check cannot drift between them.
|
||||
# Copy the built PyO3 extension modules into their package-relative paths under
|
||||
# rust-ext-staging/. Shared by both jobs of _pr-test-rust-ext-build.yml, so the
|
||||
# archive layout and module-count checks cannot drift between them.
|
||||
#
|
||||
# MAX_GLIBC (optional): also reject a module requiring a newer GLIBC symbol
|
||||
# version than the test runners have. Only set where the modules were just
|
||||
@@ -32,6 +32,23 @@ for module in server grpc multimodal; do
|
||||
cp "${found[@]}" rust-ext-staging/rust_extensions/
|
||||
built+=("${found[@]}")
|
||||
done
|
||||
|
||||
mkdir -p rust-ext-staging/mem_cache/rust_tree_core
|
||||
for module in mem_cache mem_cache_inspection; do
|
||||
tree_core=(python/sglang/srt/mem_cache/rust_tree_core/"${module}".*.so)
|
||||
if [ ${#tree_core[@]} -eq 0 ]; then
|
||||
echo "::error::no Rust TreeCore ${module} extension module found"
|
||||
exit 1
|
||||
fi
|
||||
tree_core_suffixes=$(printf '%s\n' "${tree_core[@]##*/${module}}" | sort)
|
||||
if [ "${tree_core_suffixes}" != "${expected_suffixes}" ]; then
|
||||
echo "::error::Rust TreeCore ${module} extension does not match the interpreter set"
|
||||
printf 'have:\n%s\nwant:\n%s\n' "${tree_core_suffixes}" "${expected_suffixes}"
|
||||
exit 1
|
||||
fi
|
||||
cp "${tree_core[@]}" rust-ext-staging/mem_cache/rust_tree_core/
|
||||
built+=("${tree_core[@]}")
|
||||
done
|
||||
max_allowed="${MAX_GLIBC:-}"
|
||||
[ -n "${max_allowed}" ] || exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user