Repository navigation
feat(libfreetpu): canonical FREETPU_* weight-cache cap, API aliases & telemetry hardening (#40) - #56
Open
saariuslystoned wants to merge 1 commit into
Open
saariuslystoned wants to merge 1 commit into
saariuslystoned wants to merge 1 commit into
Conversation
… API aliases, and telemetry tests (#40)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #40 (
Refs #40— does not close#40; live Pixel 10 solo + DSpark silicon benchmark proof remains human-gated and open on#40).Context
Core
MemAvailable-guarded auto-sizing (1536 MiBceiling,512 MiBexplicit OOM headroom guard) andob_context_{set_weight_cache_cap,get_weight_cache_stats}landed in #45 prior to thelibopenbuenos->libfreetpurename (#54 / #55). This PR completes the canonicallibfreetpuweight-cache cap surface and hardens cross-alias / low-FD edge cases.Summary
FREETPU_*env vars with backwards-compatibleOPENBUENOS_*fallback (libfreetpu/src/ob_gemm.cpp,llama-cpp-edgetpu/ggml-edgetpu.cpp):FREETPU_WEIGHT_CACHE_MB,FREETPU_CACHE_CAP(> 1048576explicit byte cap>= 1.5 GiB;1..1048576ggml graph-entry count), andFREETPU_WEIGHT_CACHE_ENTRIES.FREETPU_CACHE_CAPbefore interpreting units so a valid canonical graph-entry cap (<= 1048576) never falls through to a legacyOPENBUENOS_CACHE_CAPbyte cap (and vice versa inggml-edgetpu.cpp).RLIMIT_NOFILEdevice ceiling (256entries whenRLIMIT_NOFILE <= 2048) even when*_WEIGHT_CACHE_ENTRIESis overridden.libfreetpu/include/freetpu.h):FREETPU_HAS_WEIGHT_CACHE_STATS,freetpu_weight_cache_stats_t,freetpu_context_set_weight_cache_cap, andfreetpu_context_get_weight_cache_statswhile keepingob_config_t(48 B LP64) andob_profile_stats_t(216 B LP64) byte-identical.libfreetpu/Makefile,libfreetpu/tests/*,docs/libfreetpu/README.md,proof/libfreetpu-weight-cache-cap/PROOF.md):openbuenos_adversarial_testintomake -C libfreetpu test.2688 MiBworking-set (w_peak = 916 MiB) with0cold and0steady-state evictions under both auto-size (1344 MiB) and explicitFREETPU_CACHE_CAP=1610612736(1536 MiB), plus896 MiBthrash control, OOM headroom clamp, cross-unit alias precedence, low-FD entry ceiling, and env isolation inob_quant_unpack_test.Verification (Head
44fd6fca099690926694945a2ef85b69176ca184)make -C libfreetpu verify-header-host host test(-Wall -Wextra -Wpedantic -Werror): PASS (28/28host suites +openbuenos_adversarial_test+ob_quant_unpack_test+openbuenos_pool_guards_test)clang -x c -std=c11 -fsyntax-only -Wall -Wextra -Werror -Ilibfreetpu/include llama-cpp-edgetpu/openbuenos_shim.c: PASS-fsanitize=address,undefined -fno-sanitize-recover=all) onopenbuenos_adversarial_test: PASS (0errors)-fsanitize=thread -fno-sanitize-recover=all) onopenbuenos_adversarial_test: PASS (0warnings)codex exec -m gpt-6.2-astra, 2 rounds): Round 1 caught cross-unitCACHE_CAPfallthrough, low-FDWEIGHT_CACHE_ENTRIESbypass, quant-test env isolation, and2688 MiBPixel working-set coverage; Round 2 returned CLEAN for P0/P1.proof/libfreetpu-weight-cache-cap/PROOF.mdRemaining Human-Gated Hardware Follow-Up
Tensor G5) re-benchmark ofPocketCoder-13B-A3B-Q4_0.gguf(solo + DSpark speculative decode) comparing the896 MiBbaseline against the zero-thrashlibfreetpucap was not run in this PR and remains open on#40.