Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/blob/main/om/ribbon/q38-workspace-allocation-counter.c.txt # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / om / ribbon / q38-workspace-allocation-counter.c.txt` 15 lines ยท 875 bytes Raw Blame History 1 /* External measurement instrument. No production implementation. */ 2 #include "omega_gpu_prefill.h" 3 #include 4 static _Atomic uint64_t host_count, dev_count; 5 int __real_omega_gpu_pf_alloc_host(size_t bytes, OmegaGpuMem *out); 6 int __real_omega_gpu_pf_alloc_dev(size_t bytes, OmegaGpuMem *out); 7 int __wrap_omega_gpu_pf_alloc_host(size_t bytes, OmegaGpuMem *out) { 8 atomic_fetch_add(&host_count, 1); return __real_omega_gpu_pf_alloc_host(bytes,out); 9 } 10 int __wrap_omega_gpu_pf_alloc_dev(size_t bytes, OmegaGpuMem *out) { 11 atomic_fetch_add(&dev_count, 1); return __real_omega_gpu_pf_alloc_dev(bytes,out); 12 } 13 void measurement_alloc_reset(void) { atomic_store(&host_count,0);atomic_store(&dev_count,0); } 14 uint64_t measurement_alloc_host_count(void) { return atomic_load(&host_count); } 15 uint64_t measurement_alloc_dev_count(void) { return atomic_load(&dev_count); }