Skip to content

Commit 0a25489

Browse files
committed
Cleanup of the moons_demo_variant example; this removes the discrepancy between regular OCaml and the flambda compiler variant
Signed-off-by: Lukasz Stafiniak <lukstafi@gmail.com>
1 parent b1c3630 commit 0a25489

File tree

2 files changed

+60
-58
lines changed

2 files changed

+60
-58
lines changed

test/einsum/moons_demo_variant.expected

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ n39 grad_- as n38.grad: Local/1046; single prec 10x1; mem in bytes: <not-in-yet>
4040
n40 relu_margin_loss as relu_margin_loss: Virt/15; single prec 10x1; mem in bytes: <not-in-yet>
4141
n41 grad_relu_margin_loss as relu_margin_loss.grad: Local/1046; single prec 10x1; mem in bytes: <not-in-yet>
4242
n42 10 as _10: Virt/40; single prec 1; mem in bytes: <not-in-yet>
43+
n43 => as n43: Local/1046; single prec 1; mem in bytes: <not-in-yet>
4344
n44 grad_=> as n43.grad: Virt/40; single prec 1; mem in bytes: <not-in-yet>
45+
n45 /._scalar_loss as scalar_loss: Host&stream/412410; single prec 1; mem in bytes: <not-in-yet>
4446
n46 grad_/._scalar_loss as scalar_loss.grad: Virt/40; single prec 1; mem in bytes: <not-in-yet>
4547
n47 1 as _1: Virt/40; single prec 1; mem in bytes: <not-in-yet>
4648
n48 200 as _200: Virt/40; single prec 1; mem in bytes: <not-in-yet>
@@ -51,6 +53,7 @@ n52 *. as n52: Virt/40; single prec 1; mem in bytes: <not-in-yet>
5153
n53 - as n53: Virt/152; single prec 1; mem in bytes: <not-in-yet>
5254
n54 0.1 as n54: Virt/40; single prec 1; mem in bytes: <not-in-yet>
5355
n55 *. as n55: Virt/152; single prec 1; mem in bytes: <not-in-yet>
56+
n56 /._learning_rate as learning_rate: Host&stream/412410; single prec 1; mem in bytes: <not-in-yet>
5457
n57 sgd_delta_b1 as sgd_delta_b1: Virt/15; single prec 16; mem in bytes: <not-in-yet>
5558
n58 sgd_momentum_b1 as sgd_momentum_b1: unknown; single prec <not-in-yet>; mem in bytes: <not-in-yet>
5659
n59 0.0001 as n59: Virt/40; single prec 1; mem in bytes: <not-in-yet>
@@ -63,15 +66,57 @@ n65 sgd_delta_w2 as sgd_delta_w2: Virt/15; single prec 1x16; mem in bytes: <not-
6366
n66 sgd_momentum_w2 as sgd_momentum_w2: unknown; single prec <not-in-yet>; mem in bytes: <not-in-yet>
6467
n67 0.0001 as n67: Virt/40; single prec 1; mem in bytes: <not-in-yet>
6568
n68 *. as n68: Virt/15; single prec 1x16; mem in bytes: <not-in-yet>
66-
n69 point_mlp_result as point_mlp_result: Host&shared/37039; single prec 2; mem in bytes: <not-in-yet>
67-
n70 * as n70: Local/1046; single prec 16; mem in bytes: <not-in-yet>
68-
n71 grad_* as n70.grad: unknown; single prec 16; mem in bytes: <not-in-yet>
69-
n72 + as n72: Virt/15; single prec 16; mem in bytes: <not-in-yet>
70-
n73 grad_+ as n72.grad: unknown; single prec 16; mem in bytes: <not-in-yet>
71-
n74 relu as relu: Virt/15; single prec 16; mem in bytes: <not-in-yet>
72-
n75 grad_relu as relu.grad: unknown; single prec 16; mem in bytes: <not-in-yet>
73-
n76 *_mlp_point_mlp_result as mlp_point_mlp_result: Host&stream/412410; single prec 1; mem in bytes: <not-in-yet>
74-
n77 grad_*_mlp_point_mlp_result as mlp_point_mlp_result.grad: unknown; single prec 1; mem in bytes: <not-in-yet>
7569
Tnode: Finished printing headers.
76-
mlp_result's name: mlp_point_mlp_result
77-
(mlp moons_input) name: mlp_moons_input
70+
#45 /._scalar_loss
71+
3.10
72+
#46 grad_/._scalar_loss Virt/40
73+
<void>
74+
#43 => Local/1046 │#42 10 Virt/40
75+
<void> │<void>
76+
#44 grad_=> Virt/40 │
77+
<void> │
78+
#40 relu_margin_loss Virt/15 │
79+
<void> │
80+
#41 grad_relu_margin_loss Local/1046 │
81+
<void> │
82+
#38 - Local/1046 │
83+
<void> │
84+
#39 grad_- Local/1046 │
85+
<void> │
86+
#37 1 Virt/40│ #35 *. Virt/15 │
87+
<void> │ <void> │
88+
│ #36 grad_*. Local/1046 │
89+
│ <void> │
90+
│ #24 @|_moons_class Virt/15 │ #33 *_mlp_@|_moons_input Local/1046 │
91+
│ <void> │ <void> │
92+
│#1 moons_classes │ #34 grad_*_mlp_@|_moons_input Local/1046 │
93+
│ 1.00 │ 1.00 │ ... │ 1.00 │ 1.00 │ <void> │
94+
│ -1.00 │ -1.00 │ │ -1.00 │ -1.00 │ #19 w2 non-emb │ #31 relu Local/1046 │
95+
│ ... │ ... │ │ ... │ ... │ 2.68e-1 3.73e-1 ... 2.35e-1 1.61e-2 │ <void> │
96+
│ 1.00 │ 1.00 │ │ 1.00 │ 1.00 │ #20 grad_w2 Local/26046 │ #32 grad_relu Local/1046 │
97+
│ -1.00 │ -1.00 │ │ -1.00 │ -1.00 │ <void> │ <void> │
98+
│ │ #18 threefry4x32 Virt/15 │ #29 + Local/1046 │
99+
│ │ <void> │ <void> │
100+
│ │ #17 threefry4x32 Virt/15 │#15 range_over_offsets Virt/15│ #30 grad_+ Local/1046 │
101+
│ │ <void> │<void> │ <void> │
102+
│ │#16 !@self_id Virt/40│[#3 42_random_seed]│ │#7 b1 non-emb │ #27 * Local/1046 │
103+
│ │<void> │ │ │ 8.28e-1 2.29e-1 ... 1.42e-1 6.51e-2 │ <void> │
104+
│ │ │ │ │#8 grad_b1 Local/26046 │ #28 grad_* Local/1046 │
105+
│ │ │ │ │<void> │ <void> │
106+
│ │ │ │ │#6 threefry4x32 Virt/15 │#13 w1 non-emb │#21 @|_moons_input Virt/15 │
107+
│ │ │ │ │<void> │ 7.63e-3 1.69e-1 │<void> │
108+
│ │ │ │ │├─#5 threefry4x32 Virt/15 │ 2.83e-1 3.78e-1 │└─#0 moons_flat │
109+
│ │ │ │ ││ <void> │ ... ... │ 9.44e-1 3.22e-2 │ 9.34e-1 1.33e-1 │ ... │ -9.33e-1 1.64e-2 │ -9.78e-1 -1.39e-1 │
110+
│ │ │ │ ││ ├─#4 !@self_id Virt/40 │ 1.37e-1 4.34e-3 │ -1.66e-1 5.42e-1 │ 6.02e-2 1.67e-1 │ │ 1.96 2.98e-1 │ 1.82 2.55e-1 │
111+
│ │ │ │ ││ │ <void> │ 6.60e-1 6.14e-2 │ ... ... │ ... ... │ │ ... ... │ ... ... │
112+
│ │ │ │ ││ └─#3 42_random_seed Virt/40 │#14 grad_w1 Local/26046 │ 1.07 -1.52e-1 │ 9.09e-1 -8.51e-2 │ │ -1.24 1.02e-1 │ -9.39e-1 6.62e-2 │
113+
│ │ │ │ ││ <void> │<void> │ -2.67e-1 4.14e-1 │ -1.25e-1 6.30e-2 │ │ 1.93 2.44e-1 │ 1.77 4.79e-1 │
114+
│ │ │ │ │└─#2 range_over_offsets Virt/15 │└─#12 threefry4x32 Virt/15 │ │
115+
│ │ │ │ │ <void> │ <void> │ │
116+
│ │ │ │ │ │ ├─#11 threefry4x32 Virt/15 │ │
117+
│ │ │ │ │ │ │ <void> │ │
118+
│ │ │ │ │ │ │ ├─#10 !@self_id Virt/40 │ │
119+
│ │ │ │ │ │ │ │ <void> │ │
120+
│ │ │ │ │ │ │ └─[#3 42_random_seed] │ │
121+
│ │ │ │ │ │ └─#9 range_over_offsets Virt/15 │ │
122+
│ │ │ │ │ │ <void> │ │

0 commit comments

Comments
 (0)