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 / crates / aien-omega-q38 / om / plan.om

38 lines · 1123 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note A piece shorter than the native prefill minimum costs one decode pass per token.
3fn pf_work n ulong chunk ulong min ulong to ulong
4if lt n min
5ret n
6end
7if ne rem n chunk 0
8ret add div n chunk 1
9end
10ret div n chunk
11end
12note Preserve short decode pieces; otherwise choose the latest batched cut without extra passes.
13note Zero means no checkpoint. All-ones means invalid arguments.
14fn native_pfcut from ulong header ulong total ulong chunk ulong min ulong to ulong
15if or eq min 0 gt min 16384
16ret 18446744073709551615
17end
18if or lt chunk mul min 2 gt chunk 32768
19ret 18446744073709551615
20end
21if or gt from header ge header total
22ret 18446744073709551615
23end
24note Preserve the original scalar-decode versus batched-prefill arithmetic for short pieces.
25if lt sub total header min
26ret header
27end
28if and gt sub header from 0 lt sub header from min
29ret header
30end
31whole = pf_work sub total from chunk min
32left = pf_work sub header from chunk min
33right = pf_work sub total header chunk min
34if le add left right whole
35ret header
36end
37ret add from mul div sub header from chunk chunk
38end