@@ -782,18 +782,16 @@ let%expect_test "Very big tensor" =
782782 in
783783 let % op hey = embed_self_id () in
784784 let % op hoo = embed_self_id () in
785- (* let%op bar = hoo + hey + embed_self_id () in *)
785+ let % op bar = hoo + hey + embed_self_id () in
786786 Train. set_hosted hey.value;
787787 Train. set_hosted hoo.value;
788- (* Train.set_hosted bar.value; *)
789- ignore (Train. forward_once backend hey);
790- ignore (Train. forward_once backend hoo);
791- (* ignore (Train.forward_once backend bar); *)
788+ Train. set_hosted bar.value;
789+ ignore (Train. forward_once backend bar);
792790 Train. printf ~here: [% here] ~with_code: false ~with_grad: false hey;
793791 Train. printf ~here: [% here] ~with_code: false ~with_grad: false hoo;
794- (* Train.printf ~here:[%here] ~with_code:false ~with_grad:false bar; *)
792+ Train. printf ~here: [% here] ~with_code: false ~with_grad: false bar;
795793 [% expect {|
796- HERE : test/ operations/ hello_world_op.ml :792 :23
794+ HERE : test/ operations/ hello_world_op.ml :790 :23
797795 ┌─────────────────────────┐
798796 │[0 ]: ! @ self_id shape 0 :1 │
799797 │┌┬──────┐ │
@@ -802,7 +800,7 @@ let%expect_test "Very big tensor" =
802800 │││ 0.00 │ │
803801 │└┴──────┘ │
804802 └─────────────────────────┘
805- HERE : test / operations/ hello_world_op.ml:793 :23
803+ HERE : test / operations/ hello_world_op.ml:791 :23
806804 ┌─────────────────────────┐
807805 │[1 ]: ! @ self_id shape 0 :1 │
808806 │┌┬──────┐ │
@@ -811,5 +809,24 @@ let%expect_test "Very big tensor" =
811809 │││ 1.00 │ │
812810 │└┴──────┘ │
813811 └─────────────────────────┘
814- |}]
812+ HERE : test / operations/ hello_world_op.ml:792 :23
813+ ┌─────────────────────┐
814+ │[4 ]: + _bar shape 0 :1 │
815+ │┌┬──────┐ │
816+ │││axis 0 │ │
817+ │├┼──────┤ │
818+ │││ 3.00 │ │
819+ │└┴──────┘ │
820+ └─────────────────────┘
821+ |}];
822+ Train. printf_tree ~here: [% here] bar;
823+ [% expect {|
824+ HERE : test/ operations/ hello_world_op.ml :822 :30
825+ #4 + _bar
826+ 3.00
827+ #3 + Virt / 40 │#2 ! @ self_id Virt / 40
828+ < void> │< void>
829+ #1 ! @ self_id│#0 ! @ self_id│
830+ 1.00 │ 0.00 │
831+ |}]
815832
0 commit comments