interplane.Get Omega
Read in your language

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

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 <stdatomic.h>
4static _Atomic uint64_t host_count, dev_count;
5int __real_omega_gpu_pf_alloc_host(size_t bytes, OmegaGpuMem *out);
6int __real_omega_gpu_pf_alloc_dev(size_t bytes, OmegaGpuMem *out);
7int __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}
10int __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}
13void measurement_alloc_reset(void) { atomic_store(&host_count,0);atomic_store(&dev_count,0); }
14uint64_t measurement_alloc_host_count(void) { return atomic_load(&host_count); }
15uint64_t measurement_alloc_dev_count(void) { return atomic_load(&dev_count); }