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
aien-sovereign-core-mv / crates / aien-omega-q38 / om / host.py
| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # External host verification invoked by Cargo tests, never by serving code. |
| 3 | from pathlib import Path |
| 4 | import hashlib,os,subprocess,tempfile |
| 5 | p=Path(__file__).resolve().parent |
| 6 | for line in (p/'identity.sha256').read_text().splitlines(): |
| 7 | digest,name=line.split() |
| 8 | assert name in ['plan.om','plan.c','plan.h'] |
| 9 | assert hashlib.sha256((p/name).read_bytes()).hexdigest()==digest,name |
| 10 | with tempfile.TemporaryDirectory(prefix='q38-prefill-host-') as temp: |
| 11 | so=Path(temp)/'plan.so' |
| 12 | subprocess.run([os.environ.get('CC','cc'),'-std=gnu11','-O2','-shared','-fPIC',str(p/'plan.c'),'-o',str(so)],check=True) |
| 13 | subprocess.run(['python3',str(p/'check.py'),str(so)],check=True) |