interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / evidence / ECOSYSTEM6 / frozen / mutant1.om

155 lines · 2739 bytes Raw Blame History
1note SPDX-License-Identifier: AGPL-3.0-only
2note Bounded host FP32 consumer. Uses external pinned L720 add32/mul32 and M20 emcheck.
3note Eight independent tensors X,W,b,T,Y,dX,dW,db in 16-cell slots.
4note Values are IEEE binary32 bits in ulong carriers, not integer fixed-point values.
5note AD/AS are trusted local descriptor and allocator snapshots, not wire records.
6global AD ulong 192
7global AS ulong 64
8global AP ulong 128
9global AQ ulong 128
10global AL ulong 1
11
12fn afcount t ulong to ulong
13if or eq t 2 eq t 7
14ret 2
15end
16if or eq t 3 eq t 4
17ret 4
18end
19ret 6
20end
21
22fn afget t ulong i ulong to ulong
23ret get AP add mul t 16 i
24end
25
26fn afq t ulong i ulong to ulong
27ret get AQ add mul t 16 i
28end
29
30fn afput t ulong i ulong v ulong to void
31put AQ add mul t 16 i v
32end
33
34fn affinite x ulong to bool
35if gt x 4294967295
36ret false
37end
38ret lt and x 2147483647 2139095040
39end
40
41fn afvalidate to int
42for t ulong 8
43for i ulong 24
44put ED i get AD add mul t 24 i
45end
46for i ulong 8
47put ES i get AS add mul t 8 i
48end
49status = emcheck
50if ne status 0
51ret status
52end
53note Contiguous owned local carriers only. This does not claim strided numeric kernels.
54if or ne get ED 1 1 ne get ED 4 0
55ret -20
56end
57if or ne get ED 5 add t 1 ne get ES 5 afcount t
58ret -20
59end
60rank = ulong 2
61rows = ulong 2
62cols = ulong 3
63if or eq t 1 eq t 6
64rows = 3
65cols = 2
66end
67if or eq t 3 eq t 4
68cols = 2
69end
70if or eq t 2 eq t 7
71rank = 1
72cols = 1
73end
74note MUTANT omits the dimension admission checks
75end
76ret 0
77end
78
79fn afstep lr ulong to int
80status = afvalidate
81if ne status 0
82ret status
83end
84if not affinite lr
85ret -22
86end
87if ne and lr 2147483648 0
88ret -22
89end
90for t ulong 4
91for i ulong afcount t
92if not affinite afget t i
93ret -22
94end
95end
96end
97for i ulong 128
98put AQ i 0
99end
100loss = ulong 0
101for row ulong 2
102for col ulong 2
103v = afget 2 col
104for k ulong 3
105x = afget 0 add mul row 3 k
106w = afget 1 add mul k 2 col
107v = add32 v mul32 x w
108end
109pos = add mul row 2 col
110afput 4 pos v
111r = add32 v xor afget 3 pos 2147483648
112loss = add32 loss mul32 r r
113g = mul32 1073741824 r
114afput 7 col add32 afq 7 col g
115for k ulong 3
116xp = add mul row 3 k
117wp = add mul k 2 col
118gx = mul32 g afget 1 wp
119gw = mul32 g afget 0 xp
120afput 5 xp add32 afq 5 xp gx
121afput 6 wp add32 afq 6 wp gw
122end
123end
124end
125note Commit only after all finite-result checks; rejected steps preserve AP and AL.
126for i ulong 6
127delta = mul32 lr afq 6 i
128afput 1 i add32 afget 1 i xor delta 2147483648
129end
130for i ulong 2
131delta = mul32 lr afq 7 i
132afput 2 i add32 afget 2 i xor delta 2147483648
133end
134if not affinite loss
135ret -23
136end
137for t ulong 8
138if and ne t 0 ne t 3
139for i ulong afcount t
140if not affinite afq t i
141ret -23
142end
143end
144end
145end
146for t ulong 8
147if and ne t 0 ne t 3
148for i ulong afcount t
149put AP add mul t 16 i afq t i
150end
151end
152end
153put AL 0 loss
154ret 0
155end