interplane.Get Omega
Read in your language

aienos.com

Source of www.aienos.com, served from my own hardware

Brought by drakestapleton

branch main Branches Tags History

aienos.com / om / lab-page / lab.om

159 lines · 13873 bytes Raw Blame History
1note /lab/ page structure authored in seeded Omega. Run with the pinned hive-page omc; check.sh feeds the
2note captured sources on fds 3, 6 and 7 and every captured byte is escaped by emit before it reaches the page.
3text t0 "<article class=\"lab\" id=\"lab\">\n<header class=\"lab-hero\">\n<div class=\"lab-sky\" aria-hidden=\"true\"><span></span><span></span><span></span></div>\n<p class=\"lab-kicker\">OMEGA LAB · NOTHING TO INSTALL</p>\n<h1>Write a kernel.<br><span>Run it in one click.</span></h1>\n<p class=\"lab-lead\">This is a data-parallel kernel in Omega, the language I build for programs written with AI. Press Run and it executes in this tab as WebAssembly, with its result checked element by element. Edit it and press Compile: my compiler builds it on my DGX Spark and sends the WebAssembly back.</p>\n<div class=\"lab-cta\"><a class=\"lab-go\" href=\"#lab-play\">Run it now</a><a class=\"lab-alt\" href=\"#lab-home\">Take it home</a></div>\n<div class=\"lab-overview\">\n<div class=\"lab-side lab-omega\"><p class=\"lab-side-h\">Omega, on this page</p><ul><li>Any modern browser</li><li>The compiler and wasm back end: <span data-bytes=\"omega_tool_bytes\">see record.tsv</span>, in the site repo</li><li>omc build of this kernel: <span data-us=\"omc_program_us\">see record.tsv</span></li></ul></div>\n</div>\n<p class=\"lab-fact\">Measured on my DGX Spark at 2026-10-27T00:42:59Z, load1 8.15, on 2 of 20 CPU cores. omc built the Omega kernel and host loop in 1.881 ms, the median of 7 builds. The measurements and commands are in"
4text t1 " <a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/captures/record.tsv\">record.tsv</a> · <a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/record.sh\">record.sh</a></p>\n</header>\n<section class=\"lab-section\" id=\"lab-play\">\n<p class=\"lab-kicker\">01 / RUN IT</p>\n<h2>The Omega kernel.</h2>\n<div class=\"lab-pair\">\n<div class=\"lab-pane\"><div class=\"lab-pane-h\"><strong>Omega</strong><span>axpy.om · editable</span><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/axpy.om\">Forge</a></div><textarea id=\"lab-src\" spellcheck=\"false\" autocomplete=\"off\" autocapitalize=\"off\" rows=\"20\" aria-label=\"Omega kernel source\">"
5text t2 "</textarea></div>\n"
6text t3 "</div>\n<div class=\"lab-controls\">\n<label>a <input id=\"lab-a\" type=\"number\" min=\"1\" max=\"1000\" value=\"3\" inputmode=\"numeric\"></label>\n<label>elements <select id=\"lab-n\"><option value=\"1024\">1,024</option><option value=\"65536\">65,536</option><option value=\"1048576\" selected>1,048,576</option><option value=\"4194304\">4,194,304</option></select></label>\n<button id=\"lab-run\" class=\"lab-primary\" type=\"button\">Run in my browser</button>\n<button id=\"lab-compile\" type=\"button\">Compile my edit</button>\n<button id=\"lab-break\" type=\"button\">Break it on purpose</button>\n<button id=\"lab-reset\" type=\"button\">Reset</button>\n</div>\n<p id=\"lab-status\" class=\"lab-status\" role=\"status\" aria-live=\"polite\">Loading the prebuilt kernel.</p>\n<p id=\"lab-verdict\" class=\"lab-verdict\" aria-live=\"polite\"></p>\n<dl class=\"lab-results\">\n<div><dt>Omega kernel, WebAssembly, this tab</dt><dd id=\"lab-r-wasm\">not run yet</dd></div>\n<div><dt>Kernel checksum</dt><dd id=\"lab-r-sum\">not run yet</dd></div>\n<div><dt>Kernel throughput</dt><dd id=\"lab-r-rate\">not run yet</dd></div>\n<div><dt>Compile on my Spark</dt><dd id=\"lab-c-server\">press Compile</dd></div>\n<div><dt>Round trip from this tab</dt><dd id=\"lab-c-trip\">press Compile</dd></div>\n<div><dt>Compiler pins</dt><dd id=\"lab-c-pin\">press Compile</dd></div>\n</dl>\n<p class=\"lab-small\">How the check works: for every element the kernel computes y[i] = a·x[i] + y[i] with x[i] = i and y[i] = 2i + 1, and returns the sum of all results. An independent reference computes the same sum to check the result. The page calls run in blocks of at most 999,999 elements, keeping each call within the loop bound. Times are the median of three runs in a worker on your device. Integers only for now: the pinned WebAssembly path does not take f32 yet. Signed integer overflow traps. Break it on purpose changes add to sub so you can watch the check catch it.</p>\n</section>\n<section class=\"lab-section\" id=\"lab-backends\">\n<p class=\"lab-kicker\">02 / ONE SOURCE, EVERY BACK END</p>\n<h2>What my compiler actually emitted.</h2>\n<p class=\"lab-intro\">Recorded on my DGX Spark by record.sh, except the WebAssembly, which is whatever this tab is running right now.</p>\n<details class=\"lab-be\" open><summary><strong>WebAssembly</strong><span class=\"lab-tag lab-pass\">runs in this tab</span></summary><p id=\"lab-wasm-meta\" class=\"lab-small\">Loading.</p><pre id=\"lab-wasm\" class=\"lab-code\"></pre><p class=\"lab-small\"><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/public/lab/axpy.wasm\">axpy.wasm on the forge</a></p></details>\n<details class=\"lab-be\"><summary><strong>AArch64</strong><span class=\"lab-tag lab-pass\">ran on the Spark CPU</span></summary><pre class=\"lab-code\">"
7text t4 "</pre><p class=\"lab-small\"><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/captures/aarch64.txt\">aarch64.txt on the forge</a></p></details>\n<details class=\"lab-be\"><summary><strong>SPIR-V</strong><span class=\"lab-tag lab-pass\">validated, ran on PoCL (CPU)</span><span class=\"lab-tag lab-not\">GPU: NOT_RUN</span></summary><pre class=\"lab-code\">"
8text t5 "</pre><p class=\"lab-small\"><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/captures/spirv.txt\">spirv.txt on the forge</a></p></details>\n"
9text t6 "</section>\n<section class=\"lab-section\" id=\"lab-race\">\n<p class=\"lab-kicker\">03 / EXECUTION RECEIPTS</p>\n<h2>Where it has run, and where it has not.</h2>\n<div class=\"lab-scroll\"><table class=\"lab-table\">\n<thead><tr><th>Where</th><th>What ran</th><th>Elements</th><th>Time</th><th>Check</th><th>Evidence</th></tr></thead>\n<tbody>\n<tr class=\"lab-you\"><td>Your device, this tab</td><td>this kernel, Omega to WebAssembly</td><td data-live=\"n\">press Run</td><td data-live=\"time\">press Run</td><td data-live=\"check\">press Run</td><td><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/axpy.om\">kernel</a></td></tr>\n<tr><td>DGX Spark, Arm CPU</td><td>this kernel, Omega to AArch64, whole process</td><td>1,048,576</td><td data-us=\"native_run_us\">see record.tsv</td><td>MATCH; sub control fails</td><td><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/captures/aarch64.txt\">aarch64.txt</a></td></tr>\n<tr><td>DGX Spark, Arm CPU</td><td>this kernel, Omega to SPIR-V on PoCL</td><td>1,000</td><td>not timed</td><td>MATCH</td><td><a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/captures/spirv.txt\">spirv.txt</a></td></tr>\n<tr><td>GB10 GPU</td><td>vector add in asm2 (not this kernel)</td><td>1,048,576</td><td>214,257 ns launch to done</td><td>0 wrong</td><td><a href=\"https://interplane.io/drakestapleton/omega-mv/commit/3e3da942ad630035ff773982b1aba89b36ba76d6\">omega-mv SEED-0</a> <code>omega-mv 3e3da942ad630035ff773982b1aba89b36ba76d6</code></td></tr>\n<tr><td>GB10 GPU</td><td>hello_gpu float add, kernel from my own builder (not this kernel)</td><td>1,048,576</td><td>947.5 µs GPU</td><td>0 wrong</td><td><a href=\"https://interplane.io/drakestapleton/CUDApp/blob/2b4b2b14f1c67473b80878d2eff73b32b3522d54/evidence/l424/hello-chip.log\">CUDApp log</a> <code>CUDApp 2b4b2b14f1c67473b80878d2eff73b32b3522d54</code></td></tr>\n<tr class=\"lab-nr\"><td>GB10 GPU</td><td>this kernel from omc</td><td colspan=\"3\">NOT_RUN: omc has no SASS lowering for it yet</td><td><a href=\"https://interplane.io/drakestapleton/omega-mv\">omega-mv</a></td></tr>\n</tbody></table></div>\n<p class=\"lab-small\">These are dated receipts for the named kernels, sizes and machine load. The GB10 runs use driver-loaded signed firmware on DGX OS. The asm2 run shared the machine at load1 61; the hello_gpu run had a quiet window.</p>\n</section>\n<section class=\"lab-section lab-model\" id=\"lab-model\">\n<p class=\"lab-kicker\">04 / ASK FOR A KERNEL</p>\n<h2>Let Aien write the next one.</h2>\n<p>Aien is my assistant. It runs on my GB10 and writes Omega in the chat, with the same compile and run buttons you just used.</p>\n<p><a class=\"lab-go\" href=\"/aien/\">Talk to Aien</a> <a class=\"lab-alt\" href=\"https://interplane.io/drakestapleton/aienos.com/tree/main/om/allen-page\">source</a></p>\n</section>\n<section class=\"lab-section\" id=\"lab-home\">\n<p class=\"lab-kicker\">05 / TAKE IT HOME</p>\n<h2>Take it home: not open yet.</h2>\n<p class=\"lab-small\">The take-home is three lines from a clone of this site's repository, which is moving to Interplane, my own forge. Downloads are not open yet, so there is no command here today. On Linux on 64-bit Arm it checks the compiler pins, builds the kernel, runs it, checks against an independent reference, runs the broken control and writes the same axpy.wasm this page runs. Other machines get a plain NOT_RUN and a pointer back here. <a href=\"https://interplane.io/drakestapleton/aienos.com/blob/main/om/lab-page/run.sh\">Read run.sh first.</a></p>\n"
10text t7 "<h3>Start your own kernel repository.</h3>\n<p class=\"lab-small\">One command makes a public repository from my template. Edit kernel.om and the independent reference beside it, push, and GitHub's ubuntu-24.04-arm runner builds your kernel for AArch64 and SPIR-V, runs both (SPIR-V on PoCL, a CPU), and checks every result against the reference. No GPU runs there.</p>\n<div class=\"lab-install\"><pre>gh repo create my-kernel --template aien-dev/omega-kernel-template --public --clone</pre></div>\n<p class=\"lab-small\">omega-kernel-template · passing check (<code>omega-kernel-template CI run 40426781699</code>) · failing control: an overflowing kernel must fail (<code>omega-kernel-template CI run 40426783628</code>)</p>\n<h3>Do not trust my compiler? Rebuild it.</h3>\n<p class=\"lab-small\">The seed challenge rebuilds the Omega seed chain from 408 bytes and must land on the same fixed output. It passes on GitHub's own ubuntu-24.04-arm runner, and its tampered-rung, wrong-value and forged-log controls fail as required. From a fresh full clone of omega-mv main (52eba88) on my Spark it printed CHALLENGE PASS in 1.06 s wall. It is a fixed-output reproducibility match, not general self-hosting and not diverse double compiling. It needs the full history of omega-mv, which is moving to Interplane with the rest of my code; downloads are not open yet. From a full copy of omega-mv:</p>\n<div class=\"lab-install\"><pre>cd omega-mv\nsh seed/challenge/run.sh</pre></div>\n<p class=\"lab-small\"><a href=\"https://interplane.io/drakestapleton/omega-mv/blob/main/seed/challenge/CHALLENGE.md\">CHALLENGE.md</a> · <code>omega-seed-challenge CI run 40426178383</code> · post your result (<code>omega-seed-challenge issues</code>)</p>\n<h3>The GPU bench kit: kernels withdrawn.</h3>\n<p class=\"lab-small\">On 2026-10-27 I withdrew the bench kit's GPU binaries and encoder pending a clean-room rewrite. The kit ships no kernel and ./run prints NOT_RUN on every GPU. Its board retains three earlier rows, not timed. The kit's own run on real hardware: NOT_RUN.</p>\n<p class=\"lab-small\">omega-gpu-bench: the board and receipts.json live in the aien-dev/omega-gpu-bench repository, which has no public page yet.</p>\n</section>\n<p class=\"lab-foot\">Page structure and script generated by seeded Omega: <a href=\"https://interplane.io/drakestapleton/aienos.com/tree/main/om/lab-page\">om/lab-page</a>.</p>\n</article>\n"
11text amp "&amp;"
12text less "&lt;"
13text more "&gt;"
14fn emit s view uchar 65536 n ulong to int
15pos = ulong 0
16start = ulong 0
17while lt pos n bound 65536
18b = get s pos
19if or eq b 38 or eq b 60 eq b 62
20if gt pos start
21k = write 1 s start sub pos start
22if ne k long sub pos start
23ret 1
24end
25end
26if eq b 38
27k = write 1 amp 0 len amp
28if ne k long len amp
29ret 1
30end
31else
32if eq b 60
33k = write 1 less 0 len less
34if ne k long len less
35ret 1
36end
37else
38k = write 1 more 0 len more
39if ne k long len more
40ret 1
41end
42end
43end
44start = add pos 1
45end
46pos = add pos 1
47end
48if gt n start
49k = write 1 s start sub n start
50if ne k long sub n start
51ret 1
52end
53end
54ret 0
55end
56fn include fd int to int
57buf = new uchar 65536 0
58total = ulong 0
59while true bound 65536
60n = read fd buf 0 len buf
61if lt n 0
62ret 2
63end
64if eq n 0
65if eq total 0
66ret 3
67end
68ret 0
69end
70total = add total ulong n
71if gt total 1048576
72ret 4
73end
74r = emit buf ulong n
75if ne r 0
76ret r
77end
78end
79ret 5
80end
81fn main to int
82pos = ulong 0
83while lt pos len t0 bound 65536
84n = write 1 t0 pos sub len t0 pos
85if le n 0
86ret 1
87end
88pos = add pos ulong n
89end
90pos = ulong 0
91while lt pos len t1 bound 65536
92n = write 1 t1 pos sub len t1 pos
93if le n 0
94ret 1
95end
96pos = add pos ulong n
97end
98r = include 3
99if ne r 0
100ret r
101end
102pos = ulong 0
103while lt pos len t2 bound 65536
104n = write 1 t2 pos sub len t2 pos
105if le n 0
106ret 1
107end
108pos = add pos ulong n
109end
110pos = ulong 0
111while lt pos len t3 bound 65536
112n = write 1 t3 pos sub len t3 pos
113if le n 0
114ret 1
115end
116pos = add pos ulong n
117end
118r = include 6
119if ne r 0
120ret r
121end
122pos = ulong 0
123while lt pos len t4 bound 65536
124n = write 1 t4 pos sub len t4 pos
125if le n 0
126ret 1
127end
128pos = add pos ulong n
129end
130r = include 7
131if ne r 0
132ret r
133end
134pos = ulong 0
135while lt pos len t5 bound 65536
136n = write 1 t5 pos sub len t5 pos
137if le n 0
138ret 1
139end
140pos = add pos ulong n
141end
142pos = ulong 0
143while lt pos len t6 bound 65536
144n = write 1 t6 pos sub len t6 pos
145if le n 0
146ret 1
147end
148pos = add pos ulong n
149end
150pos = ulong 0
151while lt pos len t7 bound 65536
152n = write 1 t7 pos sub len t7 pos
153if le n 0
154ret 1
155end
156pos = add pos ulong n
157end
158ret 0
159end