interplane.Get Omega
Read in your language

openaccel-lab

aien-dev/openaccel-lab

Brought by drakestapleton

branch main Branches Tags History

openaccel-lab / docs / CONTAINER.md

33 lines · 1886 bytes Raw Blame History Rendered
1# Case container (`OALCASE1`)
2
3One case is one byte stream. `bin/oal-gen` writes it to stdout; every entrant program reads it on
4stdin and writes its outputs to stdout. Because every entrant is a separate process that only sees
5these bytes, a crash in one entrant cannot corrupt another, and identical input is provable: the
6container's sha256 is recorded in every result line and the gate requires it to agree across runners.
7
8All integers are little-endian.
9
10| offset | size | field |
11|---|---|---|
12| 0 | 8 | magic `OALCASE1` |
13| 8 | 8 | u64 `nparam`: declared parameters, then derived parameters, in manifest order |
14| 16 | 8 | u64 `nin`: input tensors |
15| 24 | 8 | u64 `nout`: output tensors |
16| 32 | 8 | u64 `warmup`: untimed launches before timing |
17| 40 | 8 | u64 `repeats`: timed launches |
18| 48 | 8*nparam | i64 parameter values |
19| ... | 8*(nin+nout) | u64 byte sizes of each input, then each output |
20| ... | ... | input tensors in manifest order, each padded with zero bytes to a multiple of 8 |
21
22Outputs: the entrant writes each output tensor in manifest order, each padded to a multiple of 8,
23and nothing else on stdout. Output buffers start filled with `0xFF` bytes in every runner, so an
24element the kernel never writes is a NaN (floats) or -1 (integers) and fails the check instead of
25passing by luck on zeroed memory.
26
27Timing: for each timed launch the entrant writes `oal-time-ns N` on stderr, where `N` is the
28wall-clock nanoseconds of that launch including the wait for completion and excluding host-device
29copies. It may write `oal-version TEXT` lines naming its runtime. Anything else on stderr is a
30diagnostic and is kept in the result's `log` field only on failure.
31
32Exit codes of entrant programs: 0 success, 2 malformed case, 3 runtime error (device, launch or
33API failure), 100+N an Omega `trap N` (9 bad header, 10 output size mismatch, 11 trailing bytes).