From 720c9d4f396d2ab24c312b7196b66441967507f9 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Wed, 11 Dec 2024 13:21:16 -0500 Subject: [PATCH 1/8] Add test for extracting a big expression with vecs This PR adds a test so that we can benchmark extracting an expression with vecs in it. This was recently discovered as a performance bottleneck. Hopefully adding the benchmark should let us resolve the extraction issue. --- tests/extract-vec-bench.egg | 180 ++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 tests/extract-vec-bench.egg diff --git a/tests/extract-vec-bench.egg b/tests/extract-vec-bench.egg new file mode 100644 index 00000000..fb35ca34 --- /dev/null +++ b/tests/extract-vec-bench.egg @@ -0,0 +1,180 @@ +; benchmark for extracting an expression with vecs +; Added to resolve performance issue from +; https://egraphs.zulipchat.com/#narrow/channel/375765-egg.2Fegglog/topic/bottleneck.20in.20run_program.20function/near/488126763 +(sort IntTuple) +(constructor IntTuple___add__ (IntTuple IntTuple) IntTuple) +(sort Int) +(constructor IntTuple___init__ (Int) IntTuple) +(constructor Int___init__ (i64) Int) +(let %__expr_7592761031329981043 (IntTuple___add__ (IntTuple___init__ (Int___init__ 4096)) (IntTuple___init__ (Int___init__ 4096)))) +(sort StringTensor) +(constructor StringTensor___init__ (String) StringTensor) +(let %__expr_43250753374430182 (StringTensor___init__ "f32")) +(let %__expr_-1060255801218150525 (IntTuple___init__ (Int___init__ 64))) +(sort FloatTuple) +(sort Float) +(constructor FloatTuple___init__ (Float) FloatTuple) +(constructor Float_var (String) Float) +(let %__expr_6876991871512843363 (FloatTuple___init__ (Float_var "tensor"))) +(let %__expr_6314892714057070213 (IntTuple___add__ (IntTuple___init__ (Int___init__ 4096)) (IntTuple___init__ (Int___init__ 1024)))) +(let %__expr_3084822801102392870 (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) (IntTuple___add__ (IntTuple___init__ (Int___init__ 4)) (IntTuple___add__ (IntTuple___init__ (Int___init__ 32)) (IntTuple___init__ (Int___init__ 128)))))) +(let %__expr_3450190312220285211 (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) %__expr_-1060255801218150525)) +(sort Tensor) +(sort UnaryOp) +(constructor UnaryOp___call__ (UnaryOp Tensor) Tensor) +(constructor cosine_xla (IntTuple StringTensor StringTensor) UnaryOp) +(sort BinaryOp) +(constructor BinaryOp___call__ (BinaryOp Tensor Tensor) Tensor) +(constructor dot_xla (IntTuple StringTensor StringTensor) BinaryOp) +(constructor reshape (IntTuple StringTensor StringTensor) UnaryOp) +(constructor convert_xla (IntTuple StringTensor StringTensor) UnaryOp) +(constructor Tensor___init__ (StringTensor IntTuple StringTensor FloatTuple) Tensor) +(sort Constant) +(constructor Constant_tensor (Constant) Tensor) +(constructor Constant___init__ (Tensor) Constant) +(constructor FloatTuple___add__ (FloatTuple FloatTuple) FloatTuple) +(constructor Float___init__ (f64) Float) +(let %__expr_-5393032001490244878 (UnaryOp___call__ (cosine_xla %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "cosine.37")) (BinaryOp___call__ (dot_xla %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "dot.35")) (UnaryOp___call__ (reshape (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) (IntTuple___init__ (Int___init__ 1))) %__expr_43250753374430182 (StringTensor___init__ "reshape.32")) (UnaryOp___call__ (convert_xla (IntTuple___init__ (Int___init__ 1)) %__expr_43250753374430182 (StringTensor___init__ "convert.31")) (Tensor___init__ (StringTensor___init__ "p1.2") (IntTuple___init__ (Int___init__ 1)) (StringTensor___init__ "s32") %__expr_6876991871512843363))) (UnaryOp___call__ (reshape %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "reshape.34")) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.33") %__expr_-1060255801218150525 %__expr_43250753374430182 (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 1.0)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.814617217)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.663601279)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.540581)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.440366626)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.358730227)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.292227834)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.238053814)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.193922758)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.157972813)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.128687382)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.10483095)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0853971)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0695659518)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0566696189)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0461640507)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0376060307)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0306345206)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0249554086)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0203291047)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0165604409)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0134904198)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0109895291)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00895225909)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00729266508)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00594073068)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00483942125)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00394227589)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00321144611)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00216657063)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00137189368)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00085675146)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000524846)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00031269365)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000178507791)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000955621217)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000778465546)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000634151438)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000516590699)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000420823671)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000342810235)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000279259093)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000022748929)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000185316694)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000150962178)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000122976389)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000100178686)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000081607277)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000664786967)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000541546933)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000441153452)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000359371188)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000292749974)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000238479174)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000194269251)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000158255079)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000128917316)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000105018262)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000000855496921)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000000696902532)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000056770881)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000046246538)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000037673226)) (FloatTuple___init__ (Float___init__ 0.000000306892588)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +(let %__expr_-8670240704503480357 (IntTuple___add__ (IntTuple___init__ (Int___init__ 4)) (IntTuple___init__ (Int___init__ 1024)))) +(let %__expr_-7431140694611891752 (IntTuple___add__ (IntTuple___init__ (Int___init__ 4)) (IntTuple___init__ (Int___init__ 4096)))) +(let %__expr_3287298976543486160 (IntTuple___init__ (Int___init__ 128))) +(let %__expr_121285346798222255 (IntTuple___init__ (Int___init__ 8))) +(let %__expr_887281436623096487 (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) (IntTuple___add__ (IntTuple___init__ (Int___init__ 4)) (IntTuple___add__ %__expr_121285346798222255 %__expr_3287298976543486160)))) +(let %__expr_-4757619983568283752 (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) (IntTuple___init__ (Int___init__ 1)))) +(let %__expr_780613561810849412 (IntTuple___init__ (Int___init__ 4))) +(let %__expr_954616962426675872 (IntTuple___init__ (Int___init__ 4096))) +(let %__expr_970988463324955075 (IntTuple___add__ %__expr_954616962426675872 (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) %__expr_780613561810849412))) +(constructor custom_call (IntTuple StringTensor StringTensor) UnaryOp) +(let %__expr_-1015891627560160117 (UnaryOp___call__ (reshape (IntTuple___add__ %__expr_954616962426675872 %__expr_780613561810849412) %__expr_43250753374430182 (StringTensor___init__ "reshape.64")) (UnaryOp___call__ (custom_call %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "custom-call.63")) (Tensor___init__ (StringTensor___init__ "p0.1") %__expr_970988463324955075 %__expr_43250753374430182 %__expr_6876991871512843363)))) +(let %__expr_-4332189904498382722 (StringTensor___init__ "s32")) +(let %__expr_-9145136852942948248 (IntTuple___init__ (Int___init__ 1))) +(let %__expr_-7238469713715515801 (Tensor___init__ (StringTensor___init__ "p1.2") (IntTuple___init__ (Int___init__ 1)) (StringTensor___init__ "s32") %__expr_6876991871512843363)) +(let %__expr_3334001411147306849 (IntTuple___add__ %__expr_-9145136852942948248 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_121285346798222255 %__expr_-1060255801218150525)))) +(let %__expr_4125339309995993167 (BinaryOp___call__ (dot_xla %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "dot.35")) (UnaryOp___call__ (reshape (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) (IntTuple___init__ (Int___init__ 1))) %__expr_43250753374430182 (StringTensor___init__ "reshape.32")) (UnaryOp___call__ (convert_xla (IntTuple___init__ (Int___init__ 1)) %__expr_43250753374430182 (StringTensor___init__ "convert.31")) (Tensor___init__ (StringTensor___init__ "p1.2") (IntTuple___init__ (Int___init__ 1)) (StringTensor___init__ "s32") %__expr_6876991871512843363))) (UnaryOp___call__ (reshape %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "reshape.34")) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.33") %__expr_-1060255801218150525 %__expr_43250753374430182 (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 1.0)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.814617217)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.663601279)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.540581)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.440366626)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.358730227)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.292227834)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.238053814)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.193922758)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.157972813)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.128687382)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.10483095)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0853971)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0695659518)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0566696189)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0461640507)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0376060307)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0306345206)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0249554086)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0203291047)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0165604409)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0134904198)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0109895291)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00895225909)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00729266508)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00594073068)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00483942125)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00394227589)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00321144611)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00216657063)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00137189368)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00085675146)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000524846)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00031269365)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000178507791)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000955621217)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000778465546)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000634151438)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000516590699)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000420823671)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000342810235)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000279259093)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000022748929)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000185316694)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000150962178)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000122976389)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000100178686)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.0000081607277)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000664786967)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000541546933)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000441153452)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000359371188)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000292749974)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000238479174)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000194269251)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000158255079)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000128917316)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000105018262)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000000855496921)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.000000696902532)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000056770881)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000046246538)) (FloatTuple___add__ (FloatTuple___init__ (Float___init__ 0.00000037673226)) (FloatTuple___init__ (Float___init__ 0.000000306892588))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +(constructor slice_xla (IntTuple StringTensor StringTensor) UnaryOp) +(let %__expr_396210295990978615 (UnaryOp___call__ (slice_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "slice.89")) (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.69")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.66")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.55")) (Tensor___init__ (StringTensor___init__ "p10.11") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_2245507861544664623 (UnaryOp___call__ (slice_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "slice.88")) (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.69")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.66")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.55")) (Tensor___init__ (StringTensor___init__ "p10.11") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(constructor broadcast (IntTuple StringTensor StringTensor IntTuple) UnaryOp) +(constructor sine_xla (IntTuple StringTensor StringTensor) UnaryOp) +(let %__expr_-2560546514565477853 (UnaryOp___call__ (broadcast %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "broadcast.85") (IntTuple___init__ (Int___init__ 3))) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.84")) (UnaryOp___call__ (sine_xla %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "sine.36")) %__expr_4125339309995993167)))) +(let %__expr_2098444771798610723 (IntTuple___init__ (Int___init__ 0))) +(let %__expr_-2563210909664800482 (UnaryOp___call__ (broadcast (IntTuple___add__ %__expr_-9145136852942948248 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ (IntTuple___init__ (Int___init__ 32)) %__expr_-1060255801218150525))) %__expr_43250753374430182 (StringTensor___init__ "broadcast.74") (IntTuple___init__ (Int___init__ 3))) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.73")) %__expr_-5393032001490244878))) +(let %__expr_-8885688171770723304 (IntTuple___add__ %__expr_-9145136852942948248 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ (IntTuple___init__ (Int___init__ 32)) %__expr_-1060255801218150525)))) +(let %__expr_2414785639879353357 (IntTuple___init__ (Int___init__ 3))) +(let %__expr_4736034328705582859 (Tensor___init__ (StringTensor___init__ "p2.3") %__expr_780613561810849412 %__expr_-4332189904498382722 %__expr_6876991871512843363)) +(let %__expr_1830038476767106560 (IntTuple___add__ %__expr_780613561810849412 %__expr_3287298976543486160)) +(let %__expr_-6507916738617989136 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.75")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_8569760370475983843 (IntTuple___add__ %__expr_-9145136852942948248 %__expr_3287298976543486160)) +(let %__expr_-3429354383214732803 (UnaryOp___call__ (broadcast %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "broadcast.87") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.86")) %__expr_-5393032001490244878))) +(let %__expr_5405636814860079750 (StringTensor___init__ "pred")) +(constructor Int_var (String) Int) +(let %__expr_7676728378111026563 (IntTuple___init__ (Int_var "None"))) +(let %__expr_5953815806266559867 (UnaryOp___call__ (broadcast %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "broadcast.72") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.71")) (UnaryOp___call__ (sine_xla %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "sine.36")) %__expr_4125339309995993167)))) +(let %__expr_-7512897737066945430 (FloatTuple___init__ (Float___init__ -inf))) +(sort Vec_Tensor (Vec Tensor)) +(let %__expr_463014422623832906 (vec-of)) +(let %__expr_-7582832374925924324 (IntTuple___add__ %__expr_780613561810849412 %__expr_8569760370475983843)) +(let %__expr_-4815729050271210467 (IntTuple___init__ (Int___init__ 2))) +(let %__expr_-7821901818554487580 (Tensor___init__ (StringTensor___init__ "p0.1") %__expr_970988463324955075 %__expr_43250753374430182 %__expr_6876991871512843363)) +(let %__expr_-8971047228665288026 (IntTuple___add__ (IntTuple___init__ (Int___init__ 4)) (IntTuple___add__ %__expr_121285346798222255 %__expr_3287298976543486160))) +(let %__expr_7504702770541550180 (IntTuple___add__ %__expr_954616962426675872 %__expr_780613561810849412)) +(let %__expr_6344554491433604436 (IntTuple___init__ (Int___init__ 32))) +(let %__expr_-3016580086357272757 (Int___init__ 2)) +(let %__expr_8339352466036831669 (IntTuple___add__ %__expr_780613561810849412 %__expr_-9145136852942948248)) +(let %__expr_7306392975451507081 (IntTuple___add__ %__expr_3287298976543486160 %__expr_-8971047228665288026)) +(let %__expr_-7541190586253792133 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_6344554491433604436 %__expr_8569760370475983843))) +(let %__expr_-6147558561541869459 (IntTuple___add__ %__expr_-9145136852942948248 (IntTuple___add__ %__expr_-4815729050271210467 %__expr_780613561810849412))) +(sort Iota) +(constructor Iota_tensor (Iota) Tensor) +(constructor Iota___init__ (Tensor) Iota) +(let %__expr_-230735414473030379 (Iota_tensor (Iota___init__ (Tensor___init__ (StringTensor___init__ "iota.38") %__expr_3287298976543486160 %__expr_-4332189904498382722 %__expr_6876991871512843363)))) +(let %__expr_-4524654540891236778 (Int___init__ 3)) +(let %__expr_-4098736235425715155 (IntTuple___add__ (IntTuple___init__ (Int___init__ 4)) (IntTuple___add__ (IntTuple___init__ (Int___init__ 32)) (IntTuple___init__ (Int___init__ 128))))) +(sort NaryOp) +(sort TensorArr) +(constructor NaryOp___call__ (NaryOp TensorArr) Tensor) +(constructor select (Int IntTuple StringTensor StringTensor) NaryOp) +(constructor TensorArr___init__ (Vec_Tensor) TensorArr) +(constructor and_xla (IntTuple StringTensor StringTensor) BinaryOp) +(constructor compare (IntTuple StringTensor StringTensor) BinaryOp) +(constructor divide (IntTuple StringTensor StringTensor) BinaryOp) +(constructor concatenate (Int IntTuple StringTensor StringTensor) NaryOp) +(constructor subtract_xla (IntTuple StringTensor StringTensor) BinaryOp) +(constructor multiply (IntTuple StringTensor StringTensor) BinaryOp) +(constructor add_xla (IntTuple StringTensor StringTensor) BinaryOp) +(let %__expr_4132418248823832170 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "select.108")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.107") (IntTuple___add__ %__expr_2098444771798610723 %__expr_2414785639879353357)) (UnaryOp___call__ (reshape %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "reshape.106")) (BinaryOp___call__ (and_xla %__expr_-7582832374925924324 %__expr_5405636814860079750 (StringTensor___init__ "and.47")) (UnaryOp___call__ (broadcast %__expr_-7582832374925924324 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.45") (IntTuple___add__ %__expr_-9145136852942948248 %__expr_-4815729050271210467)) (BinaryOp___call__ (compare %__expr_8569760370475983843 %__expr_5405636814860079750 (StringTensor___init__ "compare.41")) (UnaryOp___call__ (broadcast %__expr_8569760370475983843 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.39") %__expr_-9145136852942948248) %__expr_-230735414473030379) (UnaryOp___call__ (broadcast %__expr_8569760370475983843 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.40") %__expr_2098444771798610723) %__expr_-7238469713715515801))) (UnaryOp___call__ (broadcast %__expr_-7582832374925924324 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.46") (IntTuple___add__ %__expr_2098444771798610723 %__expr_-4815729050271210467)) (BinaryOp___call__ (compare %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "compare.44")) (UnaryOp___call__ (broadcast %__expr_1830038476767106560 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.42") %__expr_-9145136852942948248) %__expr_-230735414473030379) (UnaryOp___call__ (broadcast %__expr_1830038476767106560 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.43") %__expr_2098444771798610723) %__expr_4736034328705582859))))))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.103")) (BinaryOp___call__ (divide %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "divide.99")) (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "concatenate.83")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "subtract.79")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.77")) %__expr_-2563210909664800482 %__expr_-6507916738617989136) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.78")) %__expr_5953815806266559867 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))))) (BinaryOp___call__ (add_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "add.82")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.80")) %__expr_-2563210909664800482 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.81")) %__expr_5953815806266559867 %__expr_-6507916738617989136))))) (UnaryOp___call__ (broadcast %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "broadcast.98") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.97") %__expr_7676728378111026563 %__expr_43250753374430182 (FloatTuple___init__ (Float___init__ 11.3137083))))))) (UnaryOp___call__ (reshape (IntTuple___add__ %__expr_3287298976543486160 %__expr_-4098736235425715155) %__expr_43250753374430182 (StringTensor___init__ "reshape.102")) (UnaryOp___call__ (broadcast (IntTuple___add__ %__expr_3287298976543486160 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_121285346798222255 %__expr_1830038476767106560))) %__expr_43250753374430182 (StringTensor___init__ "broadcast.101") (IntTuple___add__ %__expr_2098444771798610723 %__expr_-6147558561541869459)) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.100")) (UnaryOp___call__ (custom_call %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "custom-call.51")) (Tensor___init__ (StringTensor___init__ "p4.5") %__expr_7306392975451507081 %__expr_43250753374430182 %__expr_6876991871512843363))))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.105") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.104") %__expr_7676728378111026563 %__expr_43250753374430182 (FloatTuple___init__ (Float___init__ -30000.0)))))))))) +(let %__expr_894743134888337629 (IntTuple___init__ (Int___init__ 1024))) +(let %__expr_-2060545458516095324 (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.69")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.66")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.55")) (Tensor___init__ (StringTensor___init__ "p10.11") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363))))) +(let %__expr_6121053725670406621 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_-5809114903965367101 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_6344554491433604436 %__expr_-4757619983568283752))) +(let %__expr_4486907948839773011 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "select.117")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-5809114903965367101 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.116") %__expr_2098444771798610723) (UnaryOp___call__ (reshape %__expr_780613561810849412 %__expr_5405636814860079750 (StringTensor___init__ "reshape.115")) (BinaryOp___call__ (compare %__expr_8339352466036831669 %__expr_5405636814860079750 (StringTensor___init__ "compare.50")) (UnaryOp___call__ (broadcast %__expr_8339352466036831669 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.49") %__expr_-9145136852942948248) %__expr_-7238469713715515801) (UnaryOp___call__ (broadcast %__expr_8339352466036831669 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.48") %__expr_2098444771798610723) %__expr_4736034328705582859))))) (BinaryOp___call__ (dot_xla %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "dot.112")) (BinaryOp___call__ (divide %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "divide.99")) (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "concatenate.83")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "subtract.79")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.77")) %__expr_-2563210909664800482 %__expr_-6507916738617989136) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.78")) %__expr_5953815806266559867 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))))) (BinaryOp___call__ (add_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "add.82")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.80")) %__expr_-2563210909664800482 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.81")) %__expr_5953815806266559867 %__expr_-6507916738617989136))))) (UnaryOp___call__ (broadcast %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "broadcast.98") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.97") %__expr_7676728378111026563 %__expr_43250753374430182 (FloatTuple___init__ (Float___init__ 11.3137083))))))) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.111")) (UnaryOp___call__ (broadcast (IntTuple___add__ %__expr_-9145136852942948248 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_121285346798222255 %__expr_1830038476767106560))) %__expr_43250753374430182 (StringTensor___init__ "broadcast.110") %__expr_-6147558561541869459) (UnaryOp___call__ (reshape %__expr_-8971047228665288026 %__expr_43250753374430182 (StringTensor___init__ "reshape.109")) (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "concatenate.96")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "subtract.92")) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.90")) %__expr_-3429354383214732803 %__expr_2245507861544664623) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.91")) %__expr_-2560546514565477853 %__expr_396210295990978615))) (BinaryOp___call__ (add_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "add.95")) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.93")) %__expr_-3429354383214732803 %__expr_396210295990978615) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.94")) %__expr_-2560546514565477853 %__expr_2245507861544664623)))))))))) (UnaryOp___call__ (broadcast %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "broadcast.114") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.113") %__expr_7676728378111026563 %__expr_43250753374430182 (FloatTuple___init__ (Float___init__ -30000.0)))))))))) +(let %__expr_1715866568967156001 (IntTuple___add__ %__expr_-9145136852942948248 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_121285346798222255 %__expr_1830038476767106560)))) +(let %__expr_-4402497450837339487 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_121285346798222255 %__expr_1830038476767106560))) +(let %__expr_-493790858086465406 (IntTuple___add__ %__expr_2098444771798610723 %__expr_-6147558561541869459)) +(sort OpType) +(constructor AddOp () OpType) +(let %__expr_-1742406957868104574 (AddOp)) +(let %__expr_7295362097999084912 (IntTuple___add__ %__expr_3287298976543486160 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_121285346798222255 %__expr_1830038476767106560)))) +(let %__expr_2371693186799238654 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___add__ %__expr_6344554491433604436 %__expr_-9145136852942948248))) +(let %__expr_-5369558017121983332 (FloatTuple___init__ (Float___init__ 0.0))) +(let %__expr_-6965944473054330737 (IntTuple___add__ %__expr_3287298976543486160 %__expr_-4098736235425715155)) +(let %__expr_-3215649446283623168 (IntTuple___add__ %__expr_780613561810849412 %__expr_6344554491433604436)) +(let %__expr_1062650903983753593 (IntTuple___add__ %__expr_2098444771798610723 %__expr_-9145136852942948248)) +(let %__expr_8625213997479593078 (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363))))) +(let %__expr_-7880384998050047123 (FloatTuple___init__ (Float___init__ -30000.0))) +(let %__expr_-6297599033619396741 (BinaryOp___call__ (divide %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "divide.99")) (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "concatenate.83")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "subtract.79")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.77")) %__expr_-2563210909664800482 %__expr_-6507916738617989136) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.78")) %__expr_5953815806266559867 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))))) (BinaryOp___call__ (add_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "add.82")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.80")) %__expr_-2563210909664800482 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.76")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.68")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.65")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.54")) (Tensor___init__ (StringTensor___init__ "p9.10") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.81")) %__expr_5953815806266559867 %__expr_-6507916738617989136))))) (UnaryOp___call__ (broadcast %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "broadcast.98") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.97") %__expr_7676728378111026563 %__expr_43250753374430182 (FloatTuple___init__ (Float___init__ 11.3137083)))))))) +(constructor exp_xla (IntTuple StringTensor StringTensor) UnaryOp) +(constructor maximum_xla (IntTuple StringTensor StringTensor) BinaryOp) +(constructor reduce (OpType Int IntTuple StringTensor StringTensor) NaryOp) +(let %__expr_-1311435203323686298 (UnaryOp___call__ (exp_xla %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "exponential.147")) (BinaryOp___call__ (subtract_xla %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "subtract.146")) %__expr_4486907948839773011 (UnaryOp___call__ (broadcast %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "broadcast.145") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.144")) (BinaryOp___call__ (maximum_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "maximum.132")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.119")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_4132418248823832170) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.118") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.126")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_4486907948839773011) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.125") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))))))))) +(let %__expr_-7788334188785680851 (UnaryOp___call__ (sine_xla %__expr_3450190312220285211 %__expr_43250753374430182 (StringTensor___init__ "sine.36")) %__expr_4125339309995993167)) +(let %__expr_-7177210201341724311 (UnaryOp___call__ (exp_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "exponential.136")) (BinaryOp___call__ (subtract_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "subtract.135")) %__expr_4132418248823832170 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.134") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.133")) (BinaryOp___call__ (maximum_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "maximum.132")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.119")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_4132418248823832170) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.118") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.126")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_4486907948839773011) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.125") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))))))))) +(let %__expr_3257672333319215589 (IntTuple___add__ %__expr_954616962426675872 (IntTuple___init__ (Int___init__ 14336)))) +(let %__expr_6226685966605622071 (IntTuple___add__ %__expr_780613561810849412 (IntTuple___init__ (Int___init__ 14336)))) +(let %__expr_-7391271948922448236 (BinaryOp___call__ (maximum_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "maximum.132")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.119")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_4132418248823832170) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.118") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.126")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_4486907948839773011) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.125") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))))) +(constructor transpose (IntTuple StringTensor StringTensor IntTuple) UnaryOp) +(let %__expr_-1512881425436073085 (BinaryOp___call__ (add_xla %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "add.184")) (UnaryOp___call__ (reshape %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "reshape.183")) (UnaryOp___call__ (transpose %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "transpose.182") (IntTuple___add__ %__expr_-9145136852942948248 %__expr_2098444771798610723)) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.181")) (UnaryOp___call__ (reshape %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "reshape.180")) (UnaryOp___call__ (transpose %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "transpose.169") (IntTuple___add__ %__expr_-4815729050271210467 (IntTuple___add__ %__expr_2098444771798610723 (IntTuple___add__ %__expr_-9145136852942948248 %__expr_2414785639879353357)))) (BinaryOp___call__ (divide %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "divide.168")) (BinaryOp___call__ (add_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "add.165")) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.163")) %__expr_-7177210201341724311 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.159")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.158") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.157")) (UnaryOp___call__ (custom_call %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "custom-call.52")) (Tensor___init__ (StringTensor___init__ "p5.6") %__expr_7306392975451507081 %__expr_43250753374430182 %__expr_6876991871512843363)))))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.164")) %__expr_-1311435203323686298 (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.162")) (UnaryOp___call__ (broadcast %__expr_1715866568967156001 %__expr_43250753374430182 (StringTensor___init__ "broadcast.161") %__expr_-6147558561541869459) (UnaryOp___call__ (reshape %__expr_-8971047228665288026 %__expr_43250753374430182 (StringTensor___init__ "reshape.160")) (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.70")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.67")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.56")) (Tensor___init__ (StringTensor___init__ "p11.12") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363))))))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.167") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.166")) (UnaryOp___call__ (convert_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "convert.156")) (BinaryOp___call__ (add_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "add.155")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.138")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_-7177210201341724311) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.137") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-5369558017121983332)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.149")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_-1311435203323686298) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.148") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-5369558017121983332))))))))))))) (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.57")) (Tensor___init__ (StringTensor___init__ "p12.13") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363))))) %__expr_-7821901818554487580)) +(let %__expr_452557796185398649 (UnaryOp___call__ (reshape %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "reshape.187")) (UnaryOp___call__ (custom_call %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "custom-call.186")) %__expr_-1512881425436073085))) +(let %__expr_-2938317280478826799 (BinaryOp___call__ (dot_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "dot.188")) %__expr_452557796185398649 (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.59")) (Tensor___init__ (StringTensor___init__ "p14.15") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363)))) +(let %__expr_-1398757307985845473 (IntTuple___add__ %__expr_-9145136852942948248 %__expr_2098444771798610723)) +(constructor log_xla (IntTuple StringTensor StringTensor) UnaryOp) +(let %__expr_-5539788990080679230 (UnaryOp___call__ (reshape %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "reshape.210")) (UnaryOp___call__ (custom_call %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "custom-call.209")) (BinaryOp___call__ (add_xla %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "add.196")) (UnaryOp___call__ (reshape %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "reshape.195")) (UnaryOp___call__ (transpose %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "transpose.194") %__expr_-1398757307985845473) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.193")) (BinaryOp___call__ (multiply %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "multiply.192")) (BinaryOp___call__ (multiply %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "multiply.190")) %__expr_-2938317280478826799 (UnaryOp___call__ (log_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "logistic.189")) %__expr_-2938317280478826799)) (BinaryOp___call__ (dot_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "dot.191")) %__expr_452557796185398649 (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.60")) (Tensor___init__ (StringTensor___init__ "p15.16") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363)))) (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.61")) (Tensor___init__ (StringTensor___init__ "p16.17") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363))))) %__expr_-1512881425436073085)))) +(let %__expr_-1629021705689551749 (UnaryOp___call__ (broadcast %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "broadcast.220") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.219")) %__expr_-5393032001490244878))) +(let %__expr_-3958807383885890740 (IntTuple___init__ (Int___init__ 14336))) +(let %__expr_5532528940903355404 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.221")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.214")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.211")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.200")) (Tensor___init__ (StringTensor___init__ "p18.19") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_2072161566362410803 (UnaryOp___call__ (broadcast %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "broadcast.218") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.217")) %__expr_-7788334188785680851))) +(let %__expr_8673116907044179242 (UnaryOp___call__ (slice_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "slice.222")) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.214")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.211")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.200")) (Tensor___init__ (StringTensor___init__ "p18.19") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_-4148379609151315050 (FloatTuple___init__ (Float___init__ 11.3137083))) +(let %__expr_1491917502286445791 (UnaryOp___call__ (custom_call %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "custom-call.197")) (Tensor___init__ (StringTensor___init__ "p6.7") %__expr_7306392975451507081 %__expr_43250753374430182 %__expr_6876991871512843363))) +(let %__expr_-3682154909098446806 (UnaryOp___call__ (broadcast %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "broadcast.231") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.230")) %__expr_-7788334188785680851))) +(let %__expr_5904002275098573844 (UnaryOp___call__ (slice_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "slice.235")) (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.215")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.212")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.201")) (Tensor___init__ (StringTensor___init__ "p19.20") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_5971376207566796789 (UnaryOp___call__ (slice_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "slice.234")) (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.215")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.212")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.201")) (Tensor___init__ (StringTensor___init__ "p19.20") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363)))))) +(let %__expr_-8243289078095398304 (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.215")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.212")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.201")) (Tensor___init__ (StringTensor___init__ "p19.20") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363))))) +(let %__expr_7708990606695058033 (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "concatenate.242")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "subtract.238")) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.236")) (UnaryOp___call__ (broadcast %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "broadcast.233") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.232")) %__expr_-5393032001490244878)) %__expr_5971376207566796789) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.237")) %__expr_-3682154909098446806 %__expr_5904002275098573844))) (BinaryOp___call__ (add_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "add.241")) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.239")) (UnaryOp___call__ (broadcast %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "broadcast.233") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.232")) %__expr_-5393032001490244878)) %__expr_5904002275098573844) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.240")) %__expr_-3682154909098446806 %__expr_5971376207566796789)))))) +(let %__expr_3323368700089587174 (BinaryOp___call__ (compare %__expr_8339352466036831669 %__expr_5405636814860079750 (StringTensor___init__ "compare.50")) (UnaryOp___call__ (broadcast %__expr_8339352466036831669 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.49") %__expr_-9145136852942948248) %__expr_-7238469713715515801) (UnaryOp___call__ (broadcast %__expr_8339352466036831669 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.48") %__expr_2098444771798610723) %__expr_4736034328705582859))) +(let %__expr_-8318127460193195056 (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "concatenate.96")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "subtract.92")) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.90")) %__expr_-3429354383214732803 %__expr_2245507861544664623) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.91")) %__expr_-2560546514565477853 %__expr_396210295990978615))) (BinaryOp___call__ (add_xla %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "add.95")) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.93")) %__expr_-3429354383214732803 %__expr_396210295990978615) (BinaryOp___call__ (multiply %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "multiply.94")) %__expr_-2560546514565477853 %__expr_2245507861544664623)))))) +(let %__expr_-8187757278872548646 (UnaryOp___call__ (custom_call %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "custom-call.51")) (Tensor___init__ (StringTensor___init__ "p4.5") %__expr_7306392975451507081 %__expr_43250753374430182 %__expr_6876991871512843363))) +(let %__expr_-1893280258041797610 (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.214")) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.211")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.200")) (Tensor___init__ (StringTensor___init__ "p18.19") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363))))) +(let %__expr_-9091482200889601374 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "select.263")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-5809114903965367101 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.262") %__expr_2098444771798610723) (UnaryOp___call__ (reshape %__expr_780613561810849412 %__expr_5405636814860079750 (StringTensor___init__ "reshape.261")) %__expr_3323368700089587174))) (BinaryOp___call__ (dot_xla %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "dot.258")) (BinaryOp___call__ (divide %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "divide.245")) (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "concatenate.229")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "subtract.225")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.223")) %__expr_-1629021705689551749 %__expr_5532528940903355404) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.224")) %__expr_2072161566362410803 %__expr_8673116907044179242))) (BinaryOp___call__ (add_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "add.228")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.226")) %__expr_-1629021705689551749 %__expr_8673116907044179242) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.227")) %__expr_2072161566362410803 %__expr_5532528940903355404))))) (UnaryOp___call__ (broadcast %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "broadcast.244") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.243") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-4148379609151315050))))) (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.257")) (UnaryOp___call__ (broadcast %__expr_1715866568967156001 %__expr_43250753374430182 (StringTensor___init__ "broadcast.256") %__expr_-6147558561541869459) (UnaryOp___call__ (reshape %__expr_-8971047228665288026 %__expr_43250753374430182 (StringTensor___init__ "reshape.255")) %__expr_7708990606695058033))))) (UnaryOp___call__ (broadcast %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "broadcast.260") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.259") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7880384998050047123)))))))) +(let %__expr_-83332345647080926 (BinaryOp___call__ (and_xla %__expr_-7582832374925924324 %__expr_5405636814860079750 (StringTensor___init__ "and.47")) (UnaryOp___call__ (broadcast %__expr_-7582832374925924324 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.45") (IntTuple___add__ %__expr_-9145136852942948248 %__expr_-4815729050271210467)) (BinaryOp___call__ (compare %__expr_8569760370475983843 %__expr_5405636814860079750 (StringTensor___init__ "compare.41")) (UnaryOp___call__ (broadcast %__expr_8569760370475983843 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.39") %__expr_-9145136852942948248) %__expr_-230735414473030379) (UnaryOp___call__ (broadcast %__expr_8569760370475983843 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.40") %__expr_2098444771798610723) %__expr_-7238469713715515801))) (UnaryOp___call__ (broadcast %__expr_-7582832374925924324 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.46") (IntTuple___add__ %__expr_2098444771798610723 %__expr_-4815729050271210467)) (BinaryOp___call__ (compare %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "compare.44")) (UnaryOp___call__ (broadcast %__expr_1830038476767106560 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.42") %__expr_-9145136852942948248) %__expr_-230735414473030379) (UnaryOp___call__ (broadcast %__expr_1830038476767106560 %__expr_-4332189904498382722 (StringTensor___init__ "broadcast.43") %__expr_2098444771798610723) %__expr_4736034328705582859))))) +(let %__expr_7701481709172785838 (IntTuple___add__ %__expr_2098444771798610723 %__expr_2414785639879353357)) +(let %__expr_-5043758399430709069 (BinaryOp___call__ (divide %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "divide.245")) (NaryOp___call__ (concatenate %__expr_-3016580086357272757 %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "concatenate.229")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (BinaryOp___call__ (subtract_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "subtract.225")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.223")) %__expr_-1629021705689551749 %__expr_5532528940903355404) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.224")) %__expr_2072161566362410803 %__expr_8673116907044179242))) (BinaryOp___call__ (add_xla %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "add.228")) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.226")) %__expr_-1629021705689551749 %__expr_8673116907044179242) (BinaryOp___call__ (multiply %__expr_-8885688171770723304 %__expr_43250753374430182 (StringTensor___init__ "multiply.227")) %__expr_2072161566362410803 %__expr_5532528940903355404))))) (UnaryOp___call__ (broadcast %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "broadcast.244") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.243") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-4148379609151315050)))))) +(let %__expr_7181609879948930480 (UnaryOp___call__ (exp_xla %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "exponential.293")) (BinaryOp___call__ (subtract_xla %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "subtract.292")) %__expr_-9091482200889601374 (UnaryOp___call__ (broadcast %__expr_-5809114903965367101 %__expr_43250753374430182 (StringTensor___init__ "broadcast.291") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.290")) (BinaryOp___call__ (maximum_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "maximum.278")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.265")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "select.254")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.253") %__expr_7701481709172785838) (UnaryOp___call__ (reshape %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "reshape.252")) %__expr_-83332345647080926))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.249")) %__expr_-5043758399430709069 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.248")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.247") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.246")) %__expr_1491917502286445791))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.251") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.250") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7880384998050047123)))))))) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.264") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.272")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_-9091482200889601374) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.271") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))))))))) +(let %__expr_1080405137063700041 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "select.254")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.253") %__expr_7701481709172785838) (UnaryOp___call__ (reshape %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "reshape.252")) %__expr_-83332345647080926))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.249")) %__expr_-5043758399430709069 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.248")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.247") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.246")) %__expr_1491917502286445791))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.251") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.250") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7880384998050047123)))))))) +(let %__expr_5515350417066368181 (UnaryOp___call__ (exp_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "exponential.282")) (BinaryOp___call__ (subtract_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "subtract.281")) %__expr_1080405137063700041 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.280") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.279")) (BinaryOp___call__ (maximum_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "maximum.278")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.265")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "select.254")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.253") %__expr_7701481709172785838) (UnaryOp___call__ (reshape %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "reshape.252")) %__expr_-83332345647080926))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.249")) %__expr_-5043758399430709069 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.248")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.247") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.246")) %__expr_1491917502286445791))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.251") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.250") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7880384998050047123)))))))) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.264") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.272")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_-9091482200889601374) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.271") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))))))))) +(let %__expr_-1542072431027395000 (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.216")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.213")) %__expr_-5539788990080679230 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.202")) (Tensor___init__ (StringTensor___init__ "p20.21") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363))))) +(let %__expr_-7570848187282235487 (UnaryOp___call__ (custom_call %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "custom-call.198")) (Tensor___init__ (StringTensor___init__ "p7.8") %__expr_7306392975451507081 %__expr_43250753374430182 %__expr_6876991871512843363))) +(let %__expr_3412490026866573093 (UnaryOp___call__ (reshape %__expr_887281436623096487 %__expr_43250753374430182 (StringTensor___init__ "reshape.70")) (BinaryOp___call__ (dot_xla %__expr_-8670240704503480357 %__expr_43250753374430182 (StringTensor___init__ "dot.67")) %__expr_-1015891627560160117 (UnaryOp___call__ (custom_call %__expr_6314892714057070213 %__expr_43250753374430182 (StringTensor___init__ "custom-call.56")) (Tensor___init__ (StringTensor___init__ "p11.12") %__expr_6314892714057070213 %__expr_43250753374430182 %__expr_6876991871512843363))))) +(let %__expr_4513888971859015446 (BinaryOp___call__ (maximum_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "maximum.278")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.265")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 (NaryOp___call__ (select %__expr_-4524654540891236778 %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "select.254")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_5405636814860079750 (StringTensor___init__ "broadcast.253") %__expr_7701481709172785838) (UnaryOp___call__ (reshape %__expr_1830038476767106560 %__expr_5405636814860079750 (StringTensor___init__ "reshape.252")) %__expr_-83332345647080926))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.249")) %__expr_-5043758399430709069 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.248")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.247") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.246")) %__expr_1491917502286445791))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.251") %__expr_7676728378111026563) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.250") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7880384998050047123)))))))) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.264") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.272")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_-9091482200889601374) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.271") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-7512897737066945430)))))))) +(let %__expr_180593350369795557 (UnaryOp___call__ (custom_call %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "custom-call.52")) (Tensor___init__ (StringTensor___init__ "p5.6") %__expr_7306392975451507081 %__expr_43250753374430182 %__expr_6876991871512843363))) +(let %__expr_-7270651874258463548 (IntTuple___add__ %__expr_-4815729050271210467 (IntTuple___add__ %__expr_2098444771798610723 (IntTuple___add__ %__expr_-9145136852942948248 %__expr_2414785639879353357)))) +(let %__expr_-8904536519025451719 (UnaryOp___call__ (broadcast %__expr_3334001411147306849 %__expr_43250753374430182 (StringTensor___init__ "broadcast.233") %__expr_2414785639879353357) (UnaryOp___call__ (reshape %__expr_-1060255801218150525 %__expr_43250753374430182 (StringTensor___init__ "reshape.232")) %__expr_-5393032001490244878))) +(let %__expr_-8019728855191511740 (BinaryOp___call__ (add_xla %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "add.196")) (UnaryOp___call__ (reshape %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "reshape.195")) (UnaryOp___call__ (transpose %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "transpose.194") %__expr_-1398757307985845473) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.193")) (BinaryOp___call__ (multiply %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "multiply.192")) (BinaryOp___call__ (multiply %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "multiply.190")) %__expr_-2938317280478826799 (UnaryOp___call__ (log_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "logistic.189")) %__expr_-2938317280478826799)) (BinaryOp___call__ (dot_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "dot.191")) %__expr_452557796185398649 (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.60")) (Tensor___init__ (StringTensor___init__ "p15.16") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363)))) (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.61")) (Tensor___init__ (StringTensor___init__ "p16.17") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363))))) %__expr_-1512881425436073085)) +(let %__expr_1151686521003743806 (UnaryOp___call__ (reshape %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "reshape.333")) (UnaryOp___call__ (custom_call %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "custom-call.332")) (BinaryOp___call__ (add_xla %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "add.330")) (UnaryOp___call__ (reshape %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "reshape.329")) (UnaryOp___call__ (transpose %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "transpose.328") %__expr_-1398757307985845473) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.327")) (UnaryOp___call__ (reshape %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "reshape.326")) (UnaryOp___call__ (transpose %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "transpose.315") %__expr_-7270651874258463548) (BinaryOp___call__ (divide %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "divide.314")) (BinaryOp___call__ (add_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "add.311")) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.309")) %__expr_5515350417066368181 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.305")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.304") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.303")) %__expr_-7570848187282235487)))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.310")) %__expr_7181609879948930480 (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.308")) (UnaryOp___call__ (broadcast %__expr_1715866568967156001 %__expr_43250753374430182 (StringTensor___init__ "broadcast.307") %__expr_-6147558561541869459) (UnaryOp___call__ (reshape %__expr_-8971047228665288026 %__expr_43250753374430182 (StringTensor___init__ "reshape.306")) %__expr_-1542072431027395000))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.313") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.312")) (UnaryOp___call__ (convert_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "convert.302")) (BinaryOp___call__ (add_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "add.301")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.284")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_5515350417066368181) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.283") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-5369558017121983332)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.295")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_7181609879948930480) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.294") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-5369558017121983332))))))))))))) (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.203")) (Tensor___init__ (StringTensor___init__ "p21.22") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363))))) %__expr_-8019728855191511740)))) +(let %__expr_7727207157741005465 (BinaryOp___call__ (add_xla %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "add.330")) (UnaryOp___call__ (reshape %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "reshape.329")) (UnaryOp___call__ (transpose %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "transpose.328") %__expr_-1398757307985845473) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.327")) (UnaryOp___call__ (reshape %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "reshape.326")) (UnaryOp___call__ (transpose %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "transpose.315") %__expr_-7270651874258463548) (BinaryOp___call__ (divide %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "divide.314")) (BinaryOp___call__ (add_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "add.311")) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.309")) %__expr_5515350417066368181 (UnaryOp___call__ (reshape %__expr_-6965944473054330737 %__expr_43250753374430182 (StringTensor___init__ "reshape.305")) (UnaryOp___call__ (broadcast %__expr_7295362097999084912 %__expr_43250753374430182 (StringTensor___init__ "broadcast.304") %__expr_-493790858086465406) (UnaryOp___call__ (reshape %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "reshape.303")) %__expr_-7570848187282235487)))) (BinaryOp___call__ (dot_xla %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "dot.310")) %__expr_7181609879948930480 (UnaryOp___call__ (reshape %__expr_3084822801102392870 %__expr_43250753374430182 (StringTensor___init__ "reshape.308")) (UnaryOp___call__ (broadcast %__expr_1715866568967156001 %__expr_43250753374430182 (StringTensor___init__ "broadcast.307") %__expr_-6147558561541869459) (UnaryOp___call__ (reshape %__expr_-8971047228665288026 %__expr_43250753374430182 (StringTensor___init__ "reshape.306")) %__expr_-1542072431027395000))))) (UnaryOp___call__ (broadcast %__expr_-7541190586253792133 %__expr_43250753374430182 (StringTensor___init__ "broadcast.313") %__expr_1062650903983753593) (UnaryOp___call__ (reshape %__expr_-3215649446283623168 %__expr_43250753374430182 (StringTensor___init__ "reshape.312")) (UnaryOp___call__ (convert_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "convert.302")) (BinaryOp___call__ (add_xla %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "add.301")) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.284")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_5515350417066368181) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.283") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-5369558017121983332)))))) (NaryOp___call__ (reduce %__expr_-1742406957868104574 %__expr_-3016580086357272757 %__expr_2371693186799238654 %__expr_43250753374430182 (StringTensor___init__ "reduce.295")) (TensorArr___init__ (vec-push (vec-push %__expr_463014422623832906 %__expr_7181609879948930480) (Constant_tensor (Constant___init__ (Tensor___init__ (StringTensor___init__ "constant.294") %__expr_7676728378111026563 %__expr_43250753374430182 %__expr_-5369558017121983332))))))))))))) (UnaryOp___call__ (custom_call %__expr_7592761031329981043 %__expr_43250753374430182 (StringTensor___init__ "custom-call.203")) (Tensor___init__ (StringTensor___init__ "p21.22") %__expr_7592761031329981043 %__expr_43250753374430182 %__expr_6876991871512843363))))) %__expr_-8019728855191511740)) +(let %__expr_-6404519204420161135 (IntTuple___init__ (Int___init__ 128256))) +(let %__expr_-852638415102252222 (IntTuple___add__ %__expr_954616962426675872 %__expr_-6404519204420161135)) +(let %__expr_-6567784714280254548 (IntTuple___add__ (IntTuple___init__ (Int___init__ 1)) %__expr_780613561810849412)) +(constructor scatter_xla (Int IntTuple StringTensor StringTensor) NaryOp) +(let %large_expr (TensorArr___init__ (vec-push (vec-push (vec-push (vec-push (vec-push %__expr_463014422623832906 (UnaryOp___call__ (reshape (IntTuple___add__ %__expr_-6404519204420161135 %__expr_-6567784714280254548) %__expr_43250753374430182 (StringTensor___init__ "reshape.347")) (BinaryOp___call__ (dot_xla (IntTuple___add__ %__expr_-6404519204420161135 %__expr_780613561810849412) %__expr_43250753374430182 (StringTensor___init__ "dot.346")) (UnaryOp___call__ (custom_call %__expr_-852638415102252222 %__expr_43250753374430182 (StringTensor___init__ "custom-call.30")) (Tensor___init__ (StringTensor___init__ "p27.28") %__expr_-852638415102252222 %__expr_43250753374430182 %__expr_6876991871512843363)) (UnaryOp___call__ (reshape %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "reshape.345")) (UnaryOp___call__ (custom_call %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "custom-call.344")) (BinaryOp___call__ (add_xla %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "add.342")) (UnaryOp___call__ (reshape %__expr_970988463324955075 %__expr_43250753374430182 (StringTensor___init__ "reshape.341")) (UnaryOp___call__ (transpose %__expr_7504702770541550180 %__expr_43250753374430182 (StringTensor___init__ "transpose.340") %__expr_-1398757307985845473) (BinaryOp___call__ (dot_xla %__expr_-7431140694611891752 %__expr_43250753374430182 (StringTensor___init__ "dot.339")) (BinaryOp___call__ (multiply %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "multiply.338")) (BinaryOp___call__ (multiply %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "multiply.336")) (BinaryOp___call__ (dot_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "dot.334")) %__expr_1151686521003743806 (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.205")) (Tensor___init__ (StringTensor___init__ "p23.24") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363))) (UnaryOp___call__ (log_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "logistic.335")) (BinaryOp___call__ (dot_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "dot.334")) %__expr_1151686521003743806 (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.205")) (Tensor___init__ (StringTensor___init__ "p23.24") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363))))) (BinaryOp___call__ (dot_xla %__expr_6226685966605622071 %__expr_43250753374430182 (StringTensor___init__ "dot.337")) %__expr_1151686521003743806 (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.206")) (Tensor___init__ (StringTensor___init__ "p24.25") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363)))) (UnaryOp___call__ (custom_call %__expr_3257672333319215589 %__expr_43250753374430182 (StringTensor___init__ "custom-call.207")) (Tensor___init__ (StringTensor___init__ "p25.26") %__expr_3257672333319215589 %__expr_43250753374430182 %__expr_6876991871512843363))))) %__expr_7727207157741005465)))))) (NaryOp___call__ (scatter_xla %__expr_-4524654540891236778 %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "scatter.170")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 %__expr_-8187757278872548646) %__expr_-7238469713715515801) %__expr_-8318127460193195056)))) (NaryOp___call__ (scatter_xla %__expr_-4524654540891236778 %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "scatter.175")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 %__expr_180593350369795557) %__expr_-7238469713715515801) %__expr_3412490026866573093)))) (NaryOp___call__ (scatter_xla %__expr_-4524654540891236778 %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "scatter.316")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 %__expr_1491917502286445791) %__expr_-7238469713715515801) %__expr_7708990606695058033)))) (NaryOp___call__ (scatter_xla %__expr_-4524654540891236778 %__expr_7306392975451507081 %__expr_43250753374430182 (StringTensor___init__ "scatter.321")) (TensorArr___init__ (vec-push (vec-push (vec-push %__expr_463014422623832906 %__expr_-7570848187282235487) %__expr_-7238469713715515801) %__expr_-1542072431027395000)))))) +(extract %large_expr 0) From 5fb127d28922ed42104ab76324ced6000db5a8a3 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Wed, 11 Dec 2024 13:49:49 -0500 Subject: [PATCH 2/8] Add support for profiling --- Cargo.toml | 5 +++++ README.md | 16 ++++++++++++++++ src/main.rs | 8 ++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8fb900ac..f100e5f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,3 +84,8 @@ libtest-mimic = "0.6.1" [profile.release] incremental = true + +# https://github.com/mstange/samply/?tab=readme-ov-file#turn-on-debug-info-for-full-stacks +[profile.profiling] +inherits = "release" +debug = true diff --git a/README.md b/README.md index 7b69116e..8a732ed6 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,22 @@ We use 50ms as our cutoff currently, any benchmarks shorter than that are ignore any benchmarks with have changes > 1% when they haven't been modified. Note that all the ignoring is done manually, so if you add another example that's short, an admin on the codspeed project will need to manually ignore it. +## Profiling + +One way to profile egglog is to use [samply](https://github.com/mstange/samply/). Here's how you can use it: + +```bash +# install samply +cargo install --locked samply +# build a profile build which includes debug symbols +cargo build --profile profiling +# run the egglog file and profile +samply record ./target/profiling/egglog tests/extract-vec-bench.egg +# [optional] run the egglog file without logging or printing messages, which can help reduce the stdout +# when you are profiling extracting a large expression +env RUST_LOG=error samply record ./target/profiling/egglog --dont-print-messages tests/extract-vec-bench.egg +``` + # Documentation To view documentation, run `cargo doc --open`. diff --git a/src/main.rs b/src/main.rs index 9a59f76f..c8cb3ab1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,6 +37,8 @@ struct Args { /// Number of times to inline leaves #[clap(long, default_value = "0")] serialize_n_inline_leaves: usize, + #[clap(long)] + dont_print_messages: bool, } // test if the current command should be evaluated @@ -150,8 +152,10 @@ fn main() { let mut egraph = mk_egraph(); match egraph.parse_and_run_program(Some(input.to_str().unwrap().into()), &program) { Ok(msgs) => { - for msg in msgs { - println!("{msg}"); + if !args.dont_print_messages { + for msg in msgs { + println!("{msg}"); + } } } Err(err) => { From 6349818cff5d0a14455a3a3c89d4f49906baef32 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Fri, 13 Dec 2024 13:11:49 -0500 Subject: [PATCH 3/8] Try skipping messages for this test and not serializing termdags --- benches/example_benchmarks.rs | 13 +++++-- src/actions.rs | 30 +++++++++------- src/lib.rs | 34 ++++++++++++++++--- src/main.rs | 9 ++--- ....egg => extract-vec-bench-no-messages.egg} | 0 tests/files.rs | 7 ++++ 6 files changed, 68 insertions(+), 25 deletions(-) rename tests/{extract-vec-bench.egg => extract-vec-bench-no-messages.egg} (100%) diff --git a/benches/example_benchmarks.rs b/benches/example_benchmarks.rs index e733986a..583975da 100644 --- a/benches/example_benchmarks.rs +++ b/benches/example_benchmarks.rs @@ -1,8 +1,12 @@ use codspeed_criterion_compat::{criterion_group, criterion_main, Criterion}; use egglog::EGraph; -fn run_example(filename: &str, program: &str) { - EGraph::default() +fn run_example(filename: &str, program: &str, no_messages: bool) { + let mut egraph = EGraph::default(); + if no_messages { + egraph.disable_messages(); + } + egraph .parse_and_run_program(Some(filename.to_owned()), program) .unwrap(); } @@ -17,7 +21,10 @@ pub fn criterion_benchmark(c: &mut Criterion) { let name = path.file_stem().unwrap().to_string_lossy().to_string(); let filename = path.to_string_lossy().to_string(); let program = std::fs::read_to_string(&filename).unwrap(); - c.bench_function(&name, |b| b.iter(|| run_example(&filename, &program))); + let no_messages = path_string.contains("no-messages"); + c.bench_function(&name, |b| { + b.iter(|| run_example(&filename, &program, no_messages)) + }); } } diff --git a/src/actions.rs b/src/actions.rs index 49131772..6053884a 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -339,9 +339,11 @@ impl EGraph { let variants = values[1].bits as i64; if variants == 0 { let (cost, term) = self.extract(values[0], &mut termdag, sort); - let extracted = termdag.to_string(&term); - log::info!("extracted with cost {cost}: {extracted}"); - self.print_msg(extracted); + if self.messages_enabled() { + let extracted = termdag.to_string(&term); + log::info!("extracted with cost {cost}: {extracted}"); + self.print_msg(extracted); + } self.extract_report = Some(ExtractReport::Best { termdag, cost, @@ -353,17 +355,19 @@ impl EGraph { } let terms = self.extract_variants(sort, values[0], variants as usize, &mut termdag); - log::info!("extracted variants:"); - let mut msg = String::default(); - msg += "(\n"; - assert!(!terms.is_empty()); - for expr in &terms { - let str = termdag.to_string(expr); - log::info!(" {str}"); - msg += &format!(" {str}\n"); + if self.messages_enabled() { + log::info!("extracted variants:"); + let mut msg = String::default(); + msg += "(\n"; + assert!(!terms.is_empty()); + for expr in &terms { + let str = termdag.to_string(expr); + log::info!(" {str}"); + msg += &format!(" {str}\n"); + } + msg += ")"; + self.print_msg(msg); } - msg += ")"; - self.print_msg(msg); self.extract_report = Some(ExtractReport::Variants { termdag, terms }); } diff --git a/src/lib.rs b/src/lib.rs index df969de6..a94405aa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -443,7 +443,8 @@ pub struct EGraph { recent_run_report: Option, /// The run report unioned over all runs so far. overall_run_report: RunReport, - msgs: Vec, + /// Messages to be printed to the user. If this is `None`, then we are ignoring messages. + msgs: Option>, } impl Default for EGraph { @@ -463,7 +464,7 @@ impl Default for EGraph { extract_report: None, recent_run_report: None, overall_run_report: Default::default(), - msgs: Default::default(), + msgs: Some(vec![]), type_info: Default::default(), }; egraph @@ -495,6 +496,23 @@ impl EGraph { self.egraphs.push(self.clone()); } + /// Disable saving messages to be printed to the user and remove any saved messages. + /// + /// When messages are disabled the vec of messages returned by evaluating commands will always be empty. + pub fn disable_messages(&mut self) { + self.msgs = None; + } + + /// Enable saving messages to be printed to the user. + pub fn enable_messages(&mut self) { + self.msgs = Some(vec![]); + } + + /// Whether messages are enabled. + pub fn messages_enabled(&self) -> bool { + self.msgs.is_some() + } + /// Pop the current egraph off the stack, replacing /// it with the previously pushed egraph. /// It preserves the run report and messages from the popped @@ -1503,12 +1521,18 @@ impl EGraph { } pub(crate) fn print_msg(&mut self, msg: String) { - self.msgs.push(msg); + if let Some(ref mut msgs) = self.msgs { + msgs.push(msg); + } } fn flush_msgs(&mut self) -> Vec { - self.msgs.dedup_by(|a, b| a.is_empty() && b.is_empty()); - std::mem::take(&mut self.msgs) + if let Some(ref mut msgs) = self.msgs { + msgs.dedup_by(|a, b| a.is_empty() && b.is_empty()); + std::mem::take(msgs) + } else { + vec![] + } } } diff --git a/src/main.rs b/src/main.rs index c8cb3ab1..dfb29449 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,6 +105,9 @@ fn main() { egraph.fact_directory.clone_from(&args.fact_directory); egraph.seminaive = !args.naive; egraph.run_mode = args.show; + if args.dont_print_messages { + egraph.disable_messages(); + } egraph }; @@ -152,10 +155,8 @@ fn main() { let mut egraph = mk_egraph(); match egraph.parse_and_run_program(Some(input.to_str().unwrap().into()), &program) { Ok(msgs) => { - if !args.dont_print_messages { - for msg in msgs { - println!("{msg}"); - } + for msg in msgs { + println!("{msg}"); } } Err(err) => { diff --git a/tests/extract-vec-bench.egg b/tests/extract-vec-bench-no-messages.egg similarity index 100% rename from tests/extract-vec-bench.egg rename to tests/extract-vec-bench-no-messages.egg diff --git a/tests/files.rs b/tests/files.rs index 3caf8814..0c1f0426 100644 --- a/tests/files.rs +++ b/tests/files.rs @@ -40,6 +40,9 @@ impl Run { fn test_program(&self, filename: Option, program: &str, message: &str) { let mut egraph = EGraph::default(); + if self.no_messages() { + egraph.disable_messages(); + } egraph.set_reserved_symbol("___".into()); match egraph.parse_and_run_program(filename, program) { Ok(msgs) => { @@ -100,6 +103,10 @@ impl Run { fn should_fail(&self) -> bool { self.path.to_string_lossy().contains("fail-typecheck") } + + fn no_messages(&self) -> bool { + self.path.to_string_lossy().contains("no-messages") + } } fn generate_tests(glob: &str) -> Vec { From 6c3b5b8f6a997724c5c7353c2dffc6f5f001e496 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 16 Dec 2024 10:22:33 -0500 Subject: [PATCH 4/8] Move into folder --- .../extract-vec-bench.egg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{extract-vec-bench-no-messages.egg => no-messages/extract-vec-bench.egg} (100%) diff --git a/tests/extract-vec-bench-no-messages.egg b/tests/no-messages/extract-vec-bench.egg similarity index 100% rename from tests/extract-vec-bench-no-messages.egg rename to tests/no-messages/extract-vec-bench.egg From 8e20fdea5b4cfa34f334027a47c88828a6f53caa Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 16 Dec 2024 10:28:16 -0500 Subject: [PATCH 5/8] Move other python tests to not test with messages --- tests/no-messages/README.md | 2 ++ tests/{ => no-messages}/python_array_optimize.egg | 0 tests/{ => no-messages}/stresstest_large_expr.egg | 0 3 files changed, 2 insertions(+) create mode 100644 tests/no-messages/README.md rename tests/{ => no-messages}/python_array_optimize.egg (100%) rename tests/{ => no-messages}/stresstest_large_expr.egg (100%) diff --git a/tests/no-messages/README.md b/tests/no-messages/README.md new file mode 100644 index 00000000..e92ff831 --- /dev/null +++ b/tests/no-messages/README.md @@ -0,0 +1,2 @@ +These tests are run without saving or printing messages, to more accurately profile the performance when its embedded +in a larger application and we use other ways to get the output, like the extraction report. diff --git a/tests/python_array_optimize.egg b/tests/no-messages/python_array_optimize.egg similarity index 100% rename from tests/python_array_optimize.egg rename to tests/no-messages/python_array_optimize.egg diff --git a/tests/stresstest_large_expr.egg b/tests/no-messages/stresstest_large_expr.egg similarity index 100% rename from tests/stresstest_large_expr.egg rename to tests/no-messages/stresstest_large_expr.egg From bb9cdbc6d163449e627cd3964831ec9c59ed0488 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 16 Dec 2024 10:30:56 -0500 Subject: [PATCH 6/8] Test all files with messages enabled --- tests/files.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/files.rs b/tests/files.rs index 0c1f0426..3caf8814 100644 --- a/tests/files.rs +++ b/tests/files.rs @@ -40,9 +40,6 @@ impl Run { fn test_program(&self, filename: Option, program: &str, message: &str) { let mut egraph = EGraph::default(); - if self.no_messages() { - egraph.disable_messages(); - } egraph.set_reserved_symbol("___".into()); match egraph.parse_and_run_program(filename, program) { Ok(msgs) => { @@ -103,10 +100,6 @@ impl Run { fn should_fail(&self) -> bool { self.path.to_string_lossy().contains("fail-typecheck") } - - fn no_messages(&self) -> bool { - self.path.to_string_lossy().contains("no-messages") - } } fn generate_tests(glob: &str) -> Vec { From 0de97e6f3fa5a8d7f16d726bfdd534ea5524d3c0 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 16 Dec 2024 10:32:27 -0500 Subject: [PATCH 7/8] rename --dont-print-messages to --no-messages --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index dfb29449..cb0d7998 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,7 @@ struct Args { #[clap(long, default_value = "0")] serialize_n_inline_leaves: usize, #[clap(long)] - dont_print_messages: bool, + no_messages: bool, } // test if the current command should be evaluated @@ -105,7 +105,7 @@ fn main() { egraph.fact_directory.clone_from(&args.fact_directory); egraph.seminaive = !args.naive; egraph.run_mode = args.show; - if args.dont_print_messages { + if args.no_messages { egraph.disable_messages(); } egraph From 03c32558a4b43aa627058cd9ed18e3c1792323c7 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 16 Dec 2024 10:38:02 -0500 Subject: [PATCH 8/8] add comments to justify avoiding termdag.to_string --- src/actions.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/actions.rs b/src/actions.rs index dd7fa1e3..43e6bc5c 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -339,6 +339,7 @@ impl EGraph { let variants = values[1].bits as i64; if variants == 0 { let (cost, term) = self.extract(values[0], &mut termdag, sort); + // dont turn termdag into a string if we have messages disabled for performance reasons if self.messages_enabled() { let extracted = termdag.to_string(&term); log::info!("extracted with cost {cost}: {extracted}"); @@ -355,6 +356,7 @@ impl EGraph { } let terms = self.extract_variants(sort, values[0], variants as usize, &mut termdag); + // Same as above, avoid turning termdag into a string if we have messages disabled for performance if self.messages_enabled() { log::info!("extracted variants:"); let mut msg = String::default();