From ac4ec000b1a3bacfe94d5b9d8ce38ffb52d732ee Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 29 Jan 2024 20:10:40 -0800 Subject: [PATCH 1/6] rewrite esimtest --- .../test/providers/cpu/math/einsum_test.cc | 1675 +++++++++++++---- 1 file changed, 1324 insertions(+), 351 deletions(-) diff --git a/onnxruntime/test/providers/cpu/math/einsum_test.cc b/onnxruntime/test/providers/cpu/math/einsum_test.cc index 05b936a41e3c1..0654dfc7cba82 100644 --- a/onnxruntime/test/providers/cpu/math/einsum_test.cc +++ b/onnxruntime/test/providers/cpu/math/einsum_test.cc @@ -775,368 +775,1341 @@ struct EinsumTestCase { EinsumTestCase(const std::string& eq, const std::vector& sh, const std::vector& exp) : equation(eq), shape(sh), expected(exp) {} }; -TEST(Einsum, EinsumTransposeMatMulTwoInputsTestSuite) { - std::vector test_cases{ - EinsumTestCase("abc,cd->abc", std::vector{2, 2, 2}, std::vector{0.f, 5.f, 2.f, 15.f, 4.f, 25.f, 6.f, 35.f}), - EinsumTestCase("abc,cd->abd", std::vector{2, 2, 2}, std::vector{2.f, 3.f, 6.f, 11.f, 10.f, 19.f, 14.f, 27.f}), - EinsumTestCase("abc,cd->acd", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 8.f, 12.f, 0.f, 10.f, 24.f, 36.f}), - EinsumTestCase("abc,dc->abd", std::vector{2, 2, 2}, std::vector{1.f, 3.f, 3.f, 13.f, 5.f, 23.f, 7.f, 33.f}), - EinsumTestCase("abc,dc->abc", std::vector{2, 2, 2}, std::vector{0.f, 4.f, 4.f, 12.f, 8.f, 20.f, 12.f, 28.f}), - EinsumTestCase("abc,dc->acd", std::vector{2, 2, 2}, std::vector{0.f, 4.f, 4.f, 12.f, 0.f, 20.f, 12.f, 36.f}), - EinsumTestCase("acb,cd->acd", std::vector{2, 2, 2}, std::vector{0.f, 1.f, 10.f, 15.f, 0.f, 9.f, 26.f, 39.f}), - EinsumTestCase("acb,cd->abc", std::vector{2, 2, 2}, std::vector{0.f, 10.f, 1.f, 15.f, 4.f, 30.f, 5.f, 35.f}), - EinsumTestCase("acb,cd->abd", std::vector{2, 2, 2}, std::vector{4.f, 6.f, 6.f, 10.f, 12.f, 22.f, 14.f, 26.f}), - EinsumTestCase("acb,dc->acd", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 5.f, 15.f, 0.f, 18.f, 13.f, 39.f}), - EinsumTestCase("acb,dc->abd", std::vector{2, 2, 2}, std::vector{2.f, 6.f, 3.f, 11.f, 6.f, 26.f, 7.f, 31.f}), - EinsumTestCase("acb,dc->abc", std::vector{2, 2, 2}, std::vector{0.f, 8.f, 2.f, 12.f, 8.f, 24.f, 10.f, 28.f}), - EinsumTestCase("bac,cd->bac", std::vector{2, 2, 2}, std::vector{0.f, 5.f, 2.f, 15.f, 4.f, 25.f, 6.f, 35.f}), - EinsumTestCase("bac,cd->bad", std::vector{2, 2, 2}, std::vector{2.f, 3.f, 6.f, 11.f, 10.f, 19.f, 14.f, 27.f}), - EinsumTestCase("bac,cd->bcd", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 8.f, 12.f, 0.f, 10.f, 24.f, 36.f}), - EinsumTestCase("bac,dc->bad", std::vector{2, 2, 2}, std::vector{1.f, 3.f, 3.f, 13.f, 5.f, 23.f, 7.f, 33.f}), - EinsumTestCase("bac,dc->bac", std::vector{2, 2, 2}, std::vector{0.f, 4.f, 4.f, 12.f, 8.f, 20.f, 12.f, 28.f}), - EinsumTestCase("bac,dc->bcd", std::vector{2, 2, 2}, std::vector{0.f, 4.f, 4.f, 12.f, 0.f, 20.f, 12.f, 36.f}), - EinsumTestCase("bca,cd->bcd", std::vector{2, 2, 2}, std::vector{0.f, 1.f, 10.f, 15.f, 0.f, 9.f, 26.f, 39.f}), - EinsumTestCase("bca,cd->bac", std::vector{2, 2, 2}, std::vector{0.f, 10.f, 1.f, 15.f, 4.f, 30.f, 5.f, 35.f}), - EinsumTestCase("bca,cd->bad", std::vector{2, 2, 2}, std::vector{4.f, 6.f, 6.f, 10.f, 12.f, 22.f, 14.f, 26.f}), - EinsumTestCase("bca,dc->bcd", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 5.f, 15.f, 0.f, 18.f, 13.f, 39.f}), - EinsumTestCase("bca,dc->bad", std::vector{2, 2, 2}, std::vector{2.f, 6.f, 3.f, 11.f, 6.f, 26.f, 7.f, 31.f}), - EinsumTestCase("bca,dc->bac", std::vector{2, 2, 2}, std::vector{0.f, 8.f, 2.f, 12.f, 8.f, 24.f, 10.f, 28.f}), - EinsumTestCase("cab,cd->cad", std::vector{2, 2, 2}, std::vector{0.f, 1.f, 0.f, 5.f, 18.f, 27.f, 26.f, 39.f}), - EinsumTestCase("cab,cd->cbd", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 0.f, 4.f, 20.f, 30.f, 24.f, 36.f}), - EinsumTestCase("cab,dc->cad", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 0.f, 10.f, 9.f, 27.f, 13.f, 39.f}), - EinsumTestCase("cab,dc->cbd", std::vector{2, 2, 2}, std::vector{0.f, 4.f, 0.f, 8.f, 10.f, 30.f, 12.f, 36.f}), - EinsumTestCase("cba,cd->cbd", std::vector{2, 2, 2}, std::vector{0.f, 1.f, 0.f, 5.f, 18.f, 27.f, 26.f, 39.f}), - EinsumTestCase("cba,cd->cad", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 0.f, 4.f, 20.f, 30.f, 24.f, 36.f}), - EinsumTestCase("cba,dc->cbd", std::vector{2, 2, 2}, std::vector{0.f, 2.f, 0.f, 10.f, 9.f, 27.f, 13.f, 39.f}), - EinsumTestCase("cba,dc->cad", std::vector{2, 2, 2}, std::vector{0.f, 4.f, 0.f, 8.f, 10.f, 30.f, 12.f, 36.f})}; +struct EinsumTestCase2 { + std::string_view equation; + gsl::span shape; + gsl::span expected; +}; +static constexpr std::string_view equation0 = "abc,cd->abc"; +static constexpr std::array shape0{2, 2, 2}; +static constexpr std::array expected0{0.f, 5.f, 2.f, 15.f, 4.f, 25.f, 6.f, 35.f}; +static constexpr std::string_view equation1 = "abc,cd->abd"; +static constexpr std::array shape1{2, 2, 2}; +static constexpr std::array expected1{2.f, 3.f, 6.f, 11.f, 10.f, 19.f, 14.f, 27.f}; +static constexpr std::string_view equation2 = "abc,cd->acd"; +static constexpr std::array shape2{2, 2, 2}; +static constexpr std::array expected2{0.f, 2.f, 8.f, 12.f, 0.f, 10.f, 24.f, 36.f}; +static constexpr std::string_view equation3 = "abc,dc->abd"; +static constexpr std::array shape3{2, 2, 2}; +static constexpr std::array expected3{1.f, 3.f, 3.f, 13.f, 5.f, 23.f, 7.f, 33.f}; +static constexpr std::string_view equation4 = "abc,dc->abc"; +static constexpr std::array shape4{2, 2, 2}; +static constexpr std::array expected4{0.f, 4.f, 4.f, 12.f, 8.f, 20.f, 12.f, 28.f}; +static constexpr std::string_view equation5 = "abc,dc->acd"; +static constexpr std::array shape5{2, 2, 2}; +static constexpr std::array expected5{0.f, 4.f, 4.f, 12.f, 0.f, 20.f, 12.f, 36.f}; +static constexpr std::string_view equation6 = "acb,cd->acd"; +static constexpr std::array shape6{2, 2, 2}; +static constexpr std::array expected6{0.f, 1.f, 10.f, 15.f, 0.f, 9.f, 26.f, 39.f}; +static constexpr std::string_view equation7 = "acb,cd->abc"; +static constexpr std::array shape7{2, 2, 2}; +static constexpr std::array expected7{0.f, 10.f, 1.f, 15.f, 4.f, 30.f, 5.f, 35.f}; +static constexpr std::string_view equation8 = "acb,cd->abd"; +static constexpr std::array shape8{2, 2, 2}; +static constexpr std::array expected8{4.f, 6.f, 6.f, 10.f, 12.f, 22.f, 14.f, 26.f}; +static constexpr std::string_view equation9 = "acb,dc->acd"; +static constexpr std::array shape9{2, 2, 2}; +static constexpr std::array expected9{0.f, 2.f, 5.f, 15.f, 0.f, 18.f, 13.f, 39.f}; +static constexpr std::string_view equation10 = "acb,dc->abd"; +static constexpr std::array shape10{2, 2, 2}; +static constexpr std::array expected10{2.f, 6.f, 3.f, 11.f, 6.f, 26.f, 7.f, 31.f}; +static constexpr std::string_view equation11 = "acb,dc->abc"; +static constexpr std::array shape11{2, 2, 2}; +static constexpr std::array expected11{0.f, 8.f, 2.f, 12.f, 8.f, 24.f, 10.f, 28.f}; +static constexpr std::string_view equation12 = "bac,cd->bac"; +static constexpr std::array shape12{2, 2, 2}; +static constexpr std::array expected12{0.f, 5.f, 2.f, 15.f, 4.f, 25.f, 6.f, 35.f}; +static constexpr std::string_view equation13 = "bac,cd->bad"; +static constexpr std::array shape13{2, 2, 2}; +static constexpr std::array expected13{2.f, 3.f, 6.f, 11.f, 10.f, 19.f, 14.f, 27.f}; +static constexpr std::string_view equation14 = "bac,cd->bcd"; +static constexpr std::array shape14{2, 2, 2}; +static constexpr std::array expected14{0.f, 2.f, 8.f, 12.f, 0.f, 10.f, 24.f, 36.f}; +static constexpr std::string_view equation15 = "bac,dc->bad"; +static constexpr std::array shape15{2, 2, 2}; +static constexpr std::array expected15{1.f, 3.f, 3.f, 13.f, 5.f, 23.f, 7.f, 33.f}; +static constexpr std::string_view equation16 = "bac,dc->bac"; +static constexpr std::array shape16{2, 2, 2}; +static constexpr std::array expected16{0.f, 4.f, 4.f, 12.f, 8.f, 20.f, 12.f, 28.f}; +static constexpr std::string_view equation17 = "bac,dc->bcd"; +static constexpr std::array shape17{2, 2, 2}; +static constexpr std::array expected17{0.f, 4.f, 4.f, 12.f, 0.f, 20.f, 12.f, 36.f}; +static constexpr std::string_view equation18 = "bca,cd->bcd"; +static constexpr std::array shape18{2, 2, 2}; +static constexpr std::array expected18{0.f, 1.f, 10.f, 15.f, 0.f, 9.f, 26.f, 39.f}; +static constexpr std::string_view equation19 = "bca,cd->bac"; +static constexpr std::array shape19{2, 2, 2}; +static constexpr std::array expected19{0.f, 10.f, 1.f, 15.f, 4.f, 30.f, 5.f, 35.f}; +static constexpr std::string_view equation20 = "bca,cd->bad"; +static constexpr std::array shape20{2, 2, 2}; +static constexpr std::array expected20{4.f, 6.f, 6.f, 10.f, 12.f, 22.f, 14.f, 26.f}; +static constexpr std::string_view equation21 = "bca,dc->bcd"; +static constexpr std::array shape21{2, 2, 2}; +static constexpr std::array expected21{0.f, 2.f, 5.f, 15.f, 0.f, 18.f, 13.f, 39.f}; +static constexpr std::string_view equation22 = "bca,dc->bad"; +static constexpr std::array shape22{2, 2, 2}; +static constexpr std::array expected22{2.f, 6.f, 3.f, 11.f, 6.f, 26.f, 7.f, 31.f}; +static constexpr std::string_view equation23 = "bca,dc->bac"; +static constexpr std::array shape23{2, 2, 2}; +static constexpr std::array expected23{0.f, 8.f, 2.f, 12.f, 8.f, 24.f, 10.f, 28.f}; +static constexpr std::string_view equation24 = "cab,cd->cad"; +static constexpr std::array shape24{2, 2, 2}; +static constexpr std::array expected24{0.f, 1.f, 0.f, 5.f, 18.f, 27.f, 26.f, 39.f}; +static constexpr std::string_view equation25 = "cab,cd->cbd"; +static constexpr std::array shape25{2, 2, 2}; +static constexpr std::array expected25{0.f, 2.f, 0.f, 4.f, 20.f, 30.f, 24.f, 36.f}; +static constexpr std::string_view equation26 = "cab,dc->cad"; +static constexpr std::array shape26{2, 2, 2}; +static constexpr std::array expected26{0.f, 2.f, 0.f, 10.f, 9.f, 27.f, 13.f, 39.f}; +static constexpr std::string_view equation27 = "cab,dc->cbd"; +static constexpr std::array shape27{2, 2, 2}; +static constexpr std::array expected27{0.f, 4.f, 0.f, 8.f, 10.f, 30.f, 12.f, 36.f}; +static constexpr std::string_view equation28 = "cba,cd->cbd"; +static constexpr std::array shape28{2, 2, 2}; +static constexpr std::array expected28{0.f, 1.f, 0.f, 5.f, 18.f, 27.f, 26.f, 39.f}; +static constexpr std::string_view equation29 = "cba,cd->cad"; +static constexpr std::array shape29{2, 2, 2}; +static constexpr std::array expected29{0.f, 2.f, 0.f, 4.f, 20.f, 30.f, 24.f, 36.f}; +static constexpr std::string_view equation30 = "cba,dc->cbd"; +static constexpr std::array shape30{2, 2, 2}; +static constexpr std::array expected30{0.f, 2.f, 0.f, 10.f, 9.f, 27.f, 13.f, 39.f}; +static constexpr std::string_view equation31 = "cba,dc->cad"; +static constexpr std::array shape31{2, 2, 2}; +static constexpr std::array expected31{0.f, 4.f, 0.f, 8.f, 10.f, 30.f, 12.f, 36.f}; +static constexpr std::array case0 = {{ + {equation0, shape0, expected0}, + {equation1, shape1, expected1}, + {equation2, shape2, expected2}, + {equation3, shape3, expected3}, + {equation4, shape4, expected4}, + {equation5, shape5, expected5}, + {equation6, shape6, expected6}, + {equation7, shape7, expected7}, + {equation8, shape8, expected8}, + {equation9, shape9, expected9}, + {equation10, shape10, expected10}, + {equation11, shape11, expected11}, + {equation12, shape12, expected12}, + {equation13, shape13, expected13}, + {equation14, shape14, expected14}, + {equation15, shape15, expected15}, + {equation16, shape16, expected16}, + {equation17, shape17, expected17}, + {equation18, shape18, expected18}, + {equation19, shape19, expected19}, + {equation20, shape20, expected20}, + {equation21, shape21, expected21}, + {equation22, shape22, expected22}, + {equation23, shape23, expected23}, + {equation24, shape24, expected24}, + {equation25, shape25, expected25}, + {equation26, shape26, expected26}, + {equation27, shape27, expected27}, + {equation28, shape28, expected28}, + {equation29, shape29, expected29}, + {equation30, shape30, expected30}, + {equation31, shape31, expected31}, +}}; + +static constexpr std::string_view equation32 = "abc,cd,def->abd"; +static constexpr std::array shape32{2, 2, 2}; +static constexpr std::array expected32{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}; +static constexpr std::string_view equation33 = "abc,cd,def->abe"; +static constexpr std::array shape33{2, 2, 2}; +static constexpr std::array expected33{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}; +static constexpr std::string_view equation34 = "abc,cd,def->acd"; +static constexpr std::array shape34{2, 2, 2}; +static constexpr std::array expected34{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}; +static constexpr std::string_view equation35 = "abc,cd,def->ace"; +static constexpr std::array shape35{2, 2, 2}; +static constexpr std::array expected35{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}; +static constexpr std::string_view equation36 = "abc,cd,dfe->abd"; +static constexpr std::array shape36{2, 2, 2}; +static constexpr std::array expected36{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}; +static constexpr std::string_view equation37 = "abc,cd,dfe->abf"; +static constexpr std::array shape37{2, 2, 2}; +static constexpr std::array expected37{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}; +static constexpr std::string_view equation38 = "abc,cd,dfe->acd"; +static constexpr std::array shape38{2, 2, 2}; +static constexpr std::array expected38{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}; +static constexpr std::string_view equation39 = "abc,cd,dfe->acf"; +static constexpr std::array shape39{2, 2, 2}; +static constexpr std::array expected39{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}; +static constexpr std::string_view equation40 = "abc,cd,edf->abe"; +static constexpr std::array shape40{2, 2, 2}; +static constexpr std::array expected40{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}; +static constexpr std::string_view equation41 = "abc,cd,edf->abd"; +static constexpr std::array shape41{2, 2, 2}; +static constexpr std::array expected41{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}; +static constexpr std::string_view equation42 = "abc,cd,edf->ace"; +static constexpr std::array shape42{2, 2, 2}; +static constexpr std::array expected42{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}; +static constexpr std::string_view equation43 = "abc,cd,edf->acd"; +static constexpr std::array shape43{2, 2, 2}; +static constexpr std::array expected43{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}; +static constexpr std::string_view equation44 = "abc,cd,efd->abe"; +static constexpr std::array shape44{2, 2, 2}; +static constexpr std::array expected44{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}; +static constexpr std::string_view equation45 = "abc,cd,efd->abf"; +static constexpr std::array shape45{2, 2, 2}; +static constexpr std::array expected45{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}; +static constexpr std::string_view equation46 = "abc,cd,efd->ace"; +static constexpr std::array shape46{2, 2, 2}; +static constexpr std::array expected46{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}; +static constexpr std::string_view equation47 = "abc,cd,efd->acf"; +static constexpr std::array shape47{2, 2, 2}; +static constexpr std::array expected47{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}; +static constexpr std::string_view equation48 = "abc,cd,fde->abf"; +static constexpr std::array shape48{2, 2, 2}; +static constexpr std::array expected48{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}; +static constexpr std::string_view equation49 = "abc,cd,fde->abd"; +static constexpr std::array shape49{2, 2, 2}; +static constexpr std::array expected49{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}; +static constexpr std::string_view equation50 = "abc,cd,fde->acf"; +static constexpr std::array shape50{2, 2, 2}; +static constexpr std::array expected50{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}; +static constexpr std::string_view equation51 = "abc,cd,fde->acd"; +static constexpr std::array shape51{2, 2, 2}; +static constexpr std::array expected51{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}; +static constexpr std::string_view equation52 = "abc,cd,fed->abf"; +static constexpr std::array shape52{2, 2, 2}; +static constexpr std::array expected52{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}; +static constexpr std::string_view equation53 = "abc,cd,fed->abe"; +static constexpr std::array shape53{2, 2, 2}; +static constexpr std::array expected53{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}; +static constexpr std::string_view equation54 = "abc,cd,fed->acf"; +static constexpr std::array shape54{2, 2, 2}; +static constexpr std::array expected54{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}; +static constexpr std::string_view equation55 = "abc,cd,fed->ace"; +static constexpr std::array shape55{2, 2, 2}; +static constexpr std::array expected55{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}; +static constexpr std::string_view equation56 = "abc,dc,def->abd"; +static constexpr std::array shape56{2, 2, 2}; +static constexpr std::array expected56{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}; +static constexpr std::string_view equation57 = "abc,dc,def->abe"; +static constexpr std::array shape57{2, 2, 2}; +static constexpr std::array expected57{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}; +static constexpr std::string_view equation58 = "abc,dc,def->acd"; +static constexpr std::array shape58{2, 2, 2}; +static constexpr std::array expected58{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}; +static constexpr std::string_view equation59 = "abc,dc,def->ace"; +static constexpr std::array shape59{2, 2, 2}; +static constexpr std::array expected59{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}; +static constexpr std::string_view equation60 = "abc,dc,dfe->abd"; +static constexpr std::array shape60{2, 2, 2}; +static constexpr std::array expected60{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}; +static constexpr std::string_view equation61 = "abc,dc,dfe->abf"; +static constexpr std::array shape61{2, 2, 2}; +static constexpr std::array expected61{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}; +static constexpr std::string_view equation62 = "abc,dc,dfe->acd"; +static constexpr std::array shape62{2, 2, 2}; +static constexpr std::array expected62{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}; +static constexpr std::string_view equation63 = "abc,dc,dfe->acf"; +static constexpr std::array shape63{2, 2, 2}; +static constexpr std::array expected63{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}; +static constexpr std::string_view equation64 = "abc,dc,edf->abe"; +static constexpr std::array shape64{2, 2, 2}; +static constexpr std::array expected64{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}; +static constexpr std::string_view equation65 = "abc,dc,edf->abd"; +static constexpr std::array shape65{2, 2, 2}; +static constexpr std::array expected65{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}; +static constexpr std::string_view equation66 = "abc,dc,edf->ace"; +static constexpr std::array shape66{2, 2, 2}; +static constexpr std::array expected66{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}; +static constexpr std::string_view equation67 = "abc,dc,edf->acd"; +static constexpr std::array shape67{2, 2, 2}; +static constexpr std::array expected67{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}; +static constexpr std::string_view equation68 = "abc,dc,efd->abe"; +static constexpr std::array shape68{2, 2, 2}; +static constexpr std::array expected68{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}; +static constexpr std::string_view equation69 = "abc,dc,efd->abf"; +static constexpr std::array shape69{2, 2, 2}; +static constexpr std::array expected69{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}; +static constexpr std::string_view equation70 = "abc,dc,efd->ace"; +static constexpr std::array shape70{2, 2, 2}; +static constexpr std::array expected70{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}; +static constexpr std::string_view equation71 = "abc,dc,efd->acf"; +static constexpr std::array shape71{2, 2, 2}; +static constexpr std::array expected71{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}; +static constexpr std::string_view equation72 = "abc,dc,fde->abf"; +static constexpr std::array shape72{2, 2, 2}; +static constexpr std::array expected72{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}; +static constexpr std::string_view equation73 = "abc,dc,fde->abd"; +static constexpr std::array shape73{2, 2, 2}; +static constexpr std::array expected73{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}; +static constexpr std::string_view equation74 = "abc,dc,fde->acf"; +static constexpr std::array shape74{2, 2, 2}; +static constexpr std::array expected74{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}; +static constexpr std::string_view equation75 = "abc,dc,fde->acd"; +static constexpr std::array shape75{2, 2, 2}; +static constexpr std::array expected75{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}; +static constexpr std::string_view equation76 = "abc,dc,fed->abf"; +static constexpr std::array shape76{2, 2, 2}; +static constexpr std::array expected76{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}; +static constexpr std::string_view equation77 = "abc,dc,fed->abe"; +static constexpr std::array shape77{2, 2, 2}; +static constexpr std::array expected77{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}; +static constexpr std::string_view equation78 = "abc,dc,fed->acf"; +static constexpr std::array shape78{2, 2, 2}; +static constexpr std::array expected78{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}; +static constexpr std::string_view equation79 = "abc,dc,fed->ace"; +static constexpr std::array shape79{2, 2, 2}; +static constexpr std::array expected79{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}; +static constexpr std::string_view equation80 = "acb,cd,def->acd"; +static constexpr std::array shape80{2, 2, 2}; +static constexpr std::array expected80{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}; +static constexpr std::string_view equation81 = "acb,cd,def->ace"; +static constexpr std::array shape81{2, 2, 2}; +static constexpr std::array expected81{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}; +static constexpr std::string_view equation82 = "acb,cd,def->abd"; +static constexpr std::array shape82{2, 2, 2}; +static constexpr std::array expected82{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}; +static constexpr std::string_view equation83 = "acb,cd,def->abe"; +static constexpr std::array shape83{2, 2, 2}; +static constexpr std::array expected83{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}; +static constexpr std::string_view equation84 = "acb,cd,dfe->acd"; +static constexpr std::array shape84{2, 2, 2}; +static constexpr std::array expected84{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}; +static constexpr std::string_view equation85 = "acb,cd,dfe->acf"; +static constexpr std::array shape85{2, 2, 2}; +static constexpr std::array expected85{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}; +static constexpr std::string_view equation86 = "acb,cd,dfe->abd"; +static constexpr std::array shape86{2, 2, 2}; +static constexpr std::array expected86{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}; +static constexpr std::string_view equation87 = "acb,cd,dfe->abf"; +static constexpr std::array shape87{2, 2, 2}; +static constexpr std::array expected87{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}; +static constexpr std::string_view equation88 = "acb,cd,edf->ace"; +static constexpr std::array shape88{2, 2, 2}; +static constexpr std::array expected88{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}; +static constexpr std::string_view equation89 = "acb,cd,edf->acd"; +static constexpr std::array shape89{2, 2, 2}; +static constexpr std::array expected89{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}; +static constexpr std::string_view equation90 = "acb,cd,edf->abe"; +static constexpr std::array shape90{2, 2, 2}; +static constexpr std::array expected90{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}; +static constexpr std::string_view equation91 = "acb,cd,edf->abd"; +static constexpr std::array shape91{2, 2, 2}; +static constexpr std::array expected91{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}; +static constexpr std::string_view equation92 = "acb,cd,efd->ace"; +static constexpr std::array shape92{2, 2, 2}; +static constexpr std::array expected92{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}; +static constexpr std::string_view equation93 = "acb,cd,efd->acf"; +static constexpr std::array shape93{2, 2, 2}; +static constexpr std::array expected93{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}; +static constexpr std::string_view equation94 = "acb,cd,efd->abe"; +static constexpr std::array shape94{2, 2, 2}; +static constexpr std::array expected94{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}; +static constexpr std::string_view equation95 = "acb,cd,efd->abf"; +static constexpr std::array shape95{2, 2, 2}; +static constexpr std::array expected95{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}; +static constexpr std::string_view equation96 = "acb,cd,fde->acf"; +static constexpr std::array shape96{2, 2, 2}; +static constexpr std::array expected96{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}; +static constexpr std::string_view equation97 = "acb,cd,fde->acd"; +static constexpr std::array shape97{2, 2, 2}; +static constexpr std::array expected97{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}; +static constexpr std::string_view equation98 = "acb,cd,fde->abf"; +static constexpr std::array shape98{2, 2, 2}; +static constexpr std::array expected98{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}; +static constexpr std::string_view equation99 = "acb,cd,fde->abd"; +static constexpr std::array shape99{2, 2, 2}; +static constexpr std::array expected99{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}; +static constexpr std::string_view equation100 = "acb,cd,fed->acf"; +static constexpr std::array shape100{2, 2, 2}; +static constexpr std::array expected100{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}; +static constexpr std::string_view equation101 = "acb,cd,fed->ace"; +static constexpr std::array shape101{2, 2, 2}; +static constexpr std::array expected101{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}; +static constexpr std::string_view equation102 = "acb,cd,fed->abf"; +static constexpr std::array shape102{2, 2, 2}; +static constexpr std::array expected102{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}; +static constexpr std::string_view equation103 = "acb,cd,fed->abe"; +static constexpr std::array shape103{2, 2, 2}; +static constexpr std::array expected103{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}; +static constexpr std::string_view equation104 = "acb,dc,def->acd"; +static constexpr std::array shape104{2, 2, 2}; +static constexpr std::array expected104{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}; +static constexpr std::string_view equation105 = "acb,dc,def->ace"; +static constexpr std::array shape105{2, 2, 2}; +static constexpr std::array expected105{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}; +static constexpr std::array case1 = {{ + {equation32, shape32, expected32}, + {equation33, shape33, expected33}, + {equation34, shape34, expected34}, + {equation35, shape35, expected35}, + {equation36, shape36, expected36}, + {equation37, shape37, expected37}, + {equation38, shape38, expected38}, + {equation39, shape39, expected39}, + {equation40, shape40, expected40}, + {equation41, shape41, expected41}, + {equation42, shape42, expected42}, + {equation43, shape43, expected43}, + {equation44, shape44, expected44}, + {equation45, shape45, expected45}, + {equation46, shape46, expected46}, + {equation47, shape47, expected47}, + {equation48, shape48, expected48}, + {equation49, shape49, expected49}, + {equation50, shape50, expected50}, + {equation51, shape51, expected51}, + {equation52, shape52, expected52}, + {equation53, shape53, expected53}, + {equation54, shape54, expected54}, + {equation55, shape55, expected55}, + {equation56, shape56, expected56}, + {equation57, shape57, expected57}, + {equation58, shape58, expected58}, + {equation59, shape59, expected59}, + {equation60, shape60, expected60}, + {equation61, shape61, expected61}, + {equation62, shape62, expected62}, + {equation63, shape63, expected63}, + {equation64, shape64, expected64}, + {equation65, shape65, expected65}, + {equation66, shape66, expected66}, + {equation67, shape67, expected67}, + {equation68, shape68, expected68}, + {equation69, shape69, expected69}, + {equation70, shape70, expected70}, + {equation71, shape71, expected71}, + {equation72, shape72, expected72}, + {equation73, shape73, expected73}, + {equation74, shape74, expected74}, + {equation75, shape75, expected75}, + {equation76, shape76, expected76}, + {equation77, shape77, expected77}, + {equation78, shape78, expected78}, + {equation79, shape79, expected79}, + {equation80, shape80, expected80}, + {equation81, shape81, expected81}, + {equation82, shape82, expected82}, + {equation83, shape83, expected83}, + {equation84, shape84, expected84}, + {equation85, shape85, expected85}, + {equation86, shape86, expected86}, + {equation87, shape87, expected87}, + {equation88, shape88, expected88}, + {equation89, shape89, expected89}, + {equation90, shape90, expected90}, + {equation91, shape91, expected91}, + {equation92, shape92, expected92}, + {equation93, shape93, expected93}, + {equation94, shape94, expected94}, + {equation95, shape95, expected95}, + {equation96, shape96, expected96}, + {equation97, shape97, expected97}, + {equation98, shape98, expected98}, + {equation99, shape99, expected99}, + {equation100, shape100, expected100}, + {equation101, shape101, expected101}, + {equation102, shape102, expected102}, + {equation103, shape103, expected103}, + {equation104, shape104, expected104}, + {equation105, shape105, expected105}, +}}; + +static constexpr std::string_view equation106 = "acb,dc,def->abd"; +static constexpr std::array shape106{2, 2, 2}; +static constexpr std::array expected106{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}; +static constexpr std::string_view equation107 = "acb,dc,def->abe"; +static constexpr std::array shape107{2, 2, 2}; +static constexpr std::array expected107{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}; +static constexpr std::string_view equation108 = "acb,dc,dfe->acd"; +static constexpr std::array shape108{2, 2, 2}; +static constexpr std::array expected108{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}; +static constexpr std::string_view equation109 = "acb,dc,dfe->acf"; +static constexpr std::array shape109{2, 2, 2}; +static constexpr std::array expected109{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}; +static constexpr std::string_view equation110 = "acb,dc,dfe->abd"; +static constexpr std::array shape110{2, 2, 2}; +static constexpr std::array expected110{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}; +static constexpr std::string_view equation111 = "acb,dc,dfe->abf"; +static constexpr std::array shape111{2, 2, 2}; +static constexpr std::array expected111{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}; +static constexpr std::string_view equation112 = "acb,dc,edf->ace"; +static constexpr std::array shape112{2, 2, 2}; +static constexpr std::array expected112{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}; +static constexpr std::string_view equation113 = "acb,dc,edf->acd"; +static constexpr std::array shape113{2, 2, 2}; +static constexpr std::array expected113{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}; +static constexpr std::string_view equation114 = "acb,dc,edf->abe"; +static constexpr std::array shape114{2, 2, 2}; +static constexpr std::array expected114{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}; +static constexpr std::string_view equation115 = "acb,dc,edf->abd"; +static constexpr std::array shape115{2, 2, 2}; +static constexpr std::array expected115{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}; +static constexpr std::string_view equation116 = "acb,dc,efd->ace"; +static constexpr std::array shape116{2, 2, 2}; +static constexpr std::array expected116{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}; +static constexpr std::string_view equation117 = "acb,dc,efd->acf"; +static constexpr std::array shape117{2, 2, 2}; +static constexpr std::array expected117{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}; +static constexpr std::string_view equation118 = "acb,dc,efd->abe"; +static constexpr std::array shape118{2, 2, 2}; +static constexpr std::array expected118{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}; +static constexpr std::string_view equation119 = "acb,dc,efd->abf"; +static constexpr std::array shape119{2, 2, 2}; +static constexpr std::array expected119{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}; +static constexpr std::string_view equation120 = "acb,dc,fde->acf"; +static constexpr std::array shape120{2, 2, 2}; +static constexpr std::array expected120{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}; +static constexpr std::string_view equation121 = "acb,dc,fde->acd"; +static constexpr std::array shape121{2, 2, 2}; +static constexpr std::array expected121{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}; +static constexpr std::string_view equation122 = "acb,dc,fde->abf"; +static constexpr std::array shape122{2, 2, 2}; +static constexpr std::array expected122{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}; +static constexpr std::string_view equation123 = "acb,dc,fde->abd"; +static constexpr std::array shape123{2, 2, 2}; +static constexpr std::array expected123{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}; +static constexpr std::string_view equation124 = "acb,dc,fed->acf"; +static constexpr std::array shape124{2, 2, 2}; +static constexpr std::array expected124{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}; +static constexpr std::string_view equation125 = "acb,dc,fed->ace"; +static constexpr std::array shape125{2, 2, 2}; +static constexpr std::array expected125{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}; +static constexpr std::string_view equation126 = "acb,dc,fed->abf"; +static constexpr std::array shape126{2, 2, 2}; +static constexpr std::array expected126{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}; +static constexpr std::string_view equation127 = "acb,dc,fed->abe"; +static constexpr std::array shape127{2, 2, 2}; +static constexpr std::array expected127{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}; +static constexpr std::string_view equation128 = "bac,cd,def->bad"; +static constexpr std::array shape128{2, 2, 2}; +static constexpr std::array expected128{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}; +static constexpr std::string_view equation129 = "bac,cd,def->bae"; +static constexpr std::array shape129{2, 2, 2}; +static constexpr std::array expected129{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}; +static constexpr std::string_view equation130 = "bac,cd,def->bcd"; +static constexpr std::array shape130{2, 2, 2}; +static constexpr std::array expected130{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}; +static constexpr std::string_view equation131 = "bac,cd,def->bce"; +static constexpr std::array shape131{2, 2, 2}; +static constexpr std::array expected131{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}; +static constexpr std::string_view equation132 = "bac,cd,dfe->bad"; +static constexpr std::array shape132{2, 2, 2}; +static constexpr std::array expected132{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}; +static constexpr std::string_view equation133 = "bac,cd,dfe->baf"; +static constexpr std::array shape133{2, 2, 2}; +static constexpr std::array expected133{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}; +static constexpr std::string_view equation134 = "bac,cd,dfe->bcd"; +static constexpr std::array shape134{2, 2, 2}; +static constexpr std::array expected134{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}; +static constexpr std::string_view equation135 = "bac,cd,dfe->bcf"; +static constexpr std::array shape135{2, 2, 2}; +static constexpr std::array expected135{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}; +static constexpr std::string_view equation136 = "bac,cd,edf->bae"; +static constexpr std::array shape136{2, 2, 2}; +static constexpr std::array expected136{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}; +static constexpr std::string_view equation137 = "bac,cd,edf->bad"; +static constexpr std::array shape137{2, 2, 2}; +static constexpr std::array expected137{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}; +static constexpr std::string_view equation138 = "bac,cd,edf->bce"; +static constexpr std::array shape138{2, 2, 2}; +static constexpr std::array expected138{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}; +static constexpr std::string_view equation139 = "bac,cd,edf->bcd"; +static constexpr std::array shape139{2, 2, 2}; +static constexpr std::array expected139{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}; +static constexpr std::string_view equation140 = "bac,cd,efd->bae"; +static constexpr std::array shape140{2, 2, 2}; +static constexpr std::array expected140{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}; +static constexpr std::string_view equation141 = "bac,cd,efd->baf"; +static constexpr std::array shape141{2, 2, 2}; +static constexpr std::array expected141{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}; +static constexpr std::string_view equation142 = "bac,cd,efd->bce"; +static constexpr std::array shape142{2, 2, 2}; +static constexpr std::array expected142{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}; +static constexpr std::string_view equation143 = "bac,cd,efd->bcf"; +static constexpr std::array shape143{2, 2, 2}; +static constexpr std::array expected143{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}; +static constexpr std::string_view equation144 = "bac,cd,fde->baf"; +static constexpr std::array shape144{2, 2, 2}; +static constexpr std::array expected144{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}; +static constexpr std::string_view equation145 = "bac,cd,fde->bad"; +static constexpr std::array shape145{2, 2, 2}; +static constexpr std::array expected145{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}; +static constexpr std::string_view equation146 = "bac,cd,fde->bcf"; +static constexpr std::array shape146{2, 2, 2}; +static constexpr std::array expected146{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}; +static constexpr std::string_view equation147 = "bac,cd,fde->bcd"; +static constexpr std::array shape147{2, 2, 2}; +static constexpr std::array expected147{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}; +static constexpr std::string_view equation148 = "bac,cd,fed->baf"; +static constexpr std::array shape148{2, 2, 2}; +static constexpr std::array expected148{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}; +static constexpr std::string_view equation149 = "bac,cd,fed->bae"; +static constexpr std::array shape149{2, 2, 2}; +static constexpr std::array expected149{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}; +static constexpr std::string_view equation150 = "bac,cd,fed->bcf"; +static constexpr std::array shape150{2, 2, 2}; +static constexpr std::array expected150{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}; +static constexpr std::string_view equation151 = "bac,cd,fed->bce"; +static constexpr std::array shape151{2, 2, 2}; +static constexpr std::array expected151{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}; +static constexpr std::string_view equation152 = "bac,dc,def->bad"; +static constexpr std::array shape152{2, 2, 2}; +static constexpr std::array expected152{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}; +static constexpr std::string_view equation153 = "bac,dc,def->bae"; +static constexpr std::array shape153{2, 2, 2}; +static constexpr std::array expected153{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}; +static constexpr std::string_view equation154 = "bac,dc,def->bcd"; +static constexpr std::array shape154{2, 2, 2}; +static constexpr std::array expected154{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}; +static constexpr std::string_view equation155 = "bac,dc,def->bce"; +static constexpr std::array shape155{2, 2, 2}; +static constexpr std::array expected155{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}; +static constexpr std::string_view equation156 = "bac,dc,dfe->bad"; +static constexpr std::array shape156{2, 2, 2}; +static constexpr std::array expected156{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}; +static constexpr std::string_view equation157 = "bac,dc,dfe->baf"; +static constexpr std::array shape157{2, 2, 2}; +static constexpr std::array expected157{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}; +static constexpr std::string_view equation158 = "bac,dc,dfe->bcd"; +static constexpr std::array shape158{2, 2, 2}; +static constexpr std::array expected158{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}; +static constexpr std::string_view equation159 = "bac,dc,dfe->bcf"; +static constexpr std::array shape159{2, 2, 2}; +static constexpr std::array expected159{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}; +static constexpr std::string_view equation160 = "bac,dc,edf->bae"; +static constexpr std::array shape160{2, 2, 2}; +static constexpr std::array expected160{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}; +static constexpr std::string_view equation161 = "bac,dc,edf->bad"; +static constexpr std::array shape161{2, 2, 2}; +static constexpr std::array expected161{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}; +static constexpr std::string_view equation162 = "bac,dc,edf->bce"; +static constexpr std::array shape162{2, 2, 2}; +static constexpr std::array expected162{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}; +static constexpr std::string_view equation163 = "bac,dc,edf->bcd"; +static constexpr std::array shape163{2, 2, 2}; +static constexpr std::array expected163{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}; +static constexpr std::string_view equation164 = "bac,dc,efd->bae"; +static constexpr std::array shape164{2, 2, 2}; +static constexpr std::array expected164{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}; +static constexpr std::string_view equation165 = "bac,dc,efd->baf"; +static constexpr std::array shape165{2, 2, 2}; +static constexpr std::array expected165{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}; +static constexpr std::string_view equation166 = "bac,dc,efd->bce"; +static constexpr std::array shape166{2, 2, 2}; +static constexpr std::array expected166{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}; +static constexpr std::string_view equation167 = "bac,dc,efd->bcf"; +static constexpr std::array shape167{2, 2, 2}; +static constexpr std::array expected167{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}; +static constexpr std::string_view equation168 = "bac,dc,fde->baf"; +static constexpr std::array shape168{2, 2, 2}; +static constexpr std::array expected168{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}; +static constexpr std::string_view equation169 = "bac,dc,fde->bad"; +static constexpr std::array shape169{2, 2, 2}; +static constexpr std::array expected169{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}; +static constexpr std::string_view equation170 = "bac,dc,fde->bcf"; +static constexpr std::array shape170{2, 2, 2}; +static constexpr std::array expected170{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}; +static constexpr std::string_view equation171 = "bac,dc,fde->bcd"; +static constexpr std::array shape171{2, 2, 2}; +static constexpr std::array expected171{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}; +static constexpr std::string_view equation172 = "bac,dc,fed->baf"; +static constexpr std::array shape172{2, 2, 2}; +static constexpr std::array expected172{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}; +static constexpr std::string_view equation173 = "bac,dc,fed->bae"; +static constexpr std::array shape173{2, 2, 2}; +static constexpr std::array expected173{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}; +static constexpr std::string_view equation174 = "bac,dc,fed->bcf"; +static constexpr std::array shape174{2, 2, 2}; +static constexpr std::array expected174{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}; +static constexpr std::string_view equation175 = "bac,dc,fed->bce"; +static constexpr std::array shape175{2, 2, 2}; +static constexpr std::array expected175{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}; +static constexpr std::string_view equation176 = "bca,cd,def->bcd"; +static constexpr std::array shape176{2, 2, 2}; +static constexpr std::array expected176{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}; +static constexpr std::string_view equation177 = "bca,cd,def->bce"; +static constexpr std::array shape177{2, 2, 2}; +static constexpr std::array expected177{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}; +static constexpr std::string_view equation178 = "bca,cd,def->bad"; +static constexpr std::array shape178{2, 2, 2}; +static constexpr std::array expected178{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}; +static constexpr std::string_view equation179 = "bca,cd,def->bae"; +static constexpr std::array shape179{2, 2, 2}; +static constexpr std::array expected179{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}; +static constexpr std::string_view equation180 = "bca,cd,dfe->bcd"; +static constexpr std::array shape180{2, 2, 2}; +static constexpr std::array expected180{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}; +static constexpr std::string_view equation181 = "bca,cd,dfe->bcf"; +static constexpr std::array shape181{2, 2, 2}; +static constexpr std::array expected181{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}; +static constexpr std::string_view equation182 = "bca,cd,dfe->bad"; +static constexpr std::array shape182{2, 2, 2}; +static constexpr std::array expected182{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}; +static constexpr std::string_view equation183 = "bca,cd,dfe->baf"; +static constexpr std::array shape183{2, 2, 2}; +static constexpr std::array expected183{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}; +static constexpr std::string_view equation184 = "bca,cd,edf->bce"; +static constexpr std::array shape184{2, 2, 2}; +static constexpr std::array expected184{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}; +static constexpr std::string_view equation185 = "bca,cd,edf->bcd"; +static constexpr std::array shape185{2, 2, 2}; +static constexpr std::array expected185{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}; +static constexpr std::string_view equation186 = "bca,cd,edf->bae"; +static constexpr std::array shape186{2, 2, 2}; +static constexpr std::array expected186{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}; +static constexpr std::string_view equation187 = "bca,cd,edf->bad"; +static constexpr std::array shape187{2, 2, 2}; +static constexpr std::array expected187{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}; +static constexpr std::string_view equation188 = "bca,cd,efd->bce"; +static constexpr std::array shape188{2, 2, 2}; +static constexpr std::array expected188{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}; +static constexpr std::string_view equation189 = "bca,cd,efd->bcf"; +static constexpr std::array shape189{2, 2, 2}; +static constexpr std::array expected189{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}; +static constexpr std::string_view equation190 = "bca,cd,efd->bae"; +static constexpr std::array shape190{2, 2, 2}; +static constexpr std::array expected190{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}; +static constexpr std::string_view equation191 = "bca,cd,efd->baf"; +static constexpr std::array shape191{2, 2, 2}; +static constexpr std::array expected191{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}; +static constexpr std::string_view equation192 = "bca,cd,fde->bcf"; +static constexpr std::array shape192{2, 2, 2}; +static constexpr std::array expected192{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}; +static constexpr std::string_view equation193 = "bca,cd,fde->bcd"; +static constexpr std::array shape193{2, 2, 2}; +static constexpr std::array expected193{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}; +static constexpr std::string_view equation194 = "bca,cd,fde->baf"; +static constexpr std::array shape194{2, 2, 2}; +static constexpr std::array expected194{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}; +static constexpr std::string_view equation195 = "bca,cd,fde->bad"; +static constexpr std::array shape195{2, 2, 2}; +static constexpr std::array expected195{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}; +static constexpr std::string_view equation196 = "bca,cd,fed->bcf"; +static constexpr std::array shape196{2, 2, 2}; +static constexpr std::array expected196{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}; +static constexpr std::string_view equation197 = "bca,cd,fed->bce"; +static constexpr std::array shape197{2, 2, 2}; +static constexpr std::array expected197{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}; +static constexpr std::string_view equation198 = "bca,cd,fed->baf"; +static constexpr std::array shape198{2, 2, 2}; +static constexpr std::array expected198{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}; +static constexpr std::string_view equation199 = "bca,cd,fed->bae"; +static constexpr std::array shape199{2, 2, 2}; +static constexpr std::array expected199{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}; +static constexpr std::string_view equation200 = "bca,dc,def->bcd"; +static constexpr std::array shape200{2, 2, 2}; +static constexpr std::array expected200{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}; +static constexpr std::string_view equation201 = "bca,dc,def->bce"; +static constexpr std::array shape201{2, 2, 2}; +static constexpr std::array expected201{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}; +static constexpr std::string_view equation202 = "bca,dc,def->bad"; +static constexpr std::array shape202{2, 2, 2}; +static constexpr std::array expected202{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}; +static constexpr std::string_view equation203 = "bca,dc,def->bae"; +static constexpr std::array shape203{2, 2, 2}; +static constexpr std::array expected203{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}; +static constexpr std::string_view equation204 = "bca,dc,dfe->bcd"; +static constexpr std::array shape204{2, 2, 2}; +static constexpr std::array expected204{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}; +static constexpr std::string_view equation205 = "bca,dc,dfe->bcf"; +static constexpr std::array shape205{2, 2, 2}; +static constexpr std::array expected205{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}; +static constexpr std::string_view equation206 = "bca,dc,dfe->bad"; +static constexpr std::array shape206{2, 2, 2}; +static constexpr std::array expected206{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}; +static constexpr std::string_view equation207 = "bca,dc,dfe->baf"; +static constexpr std::array shape207{2, 2, 2}; +static constexpr std::array expected207{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}; +static constexpr std::string_view equation208 = "bca,dc,edf->bce"; +static constexpr std::array shape208{2, 2, 2}; +static constexpr std::array expected208{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}; +static constexpr std::string_view equation209 = "bca,dc,edf->bcd"; +static constexpr std::array shape209{2, 2, 2}; +static constexpr std::array expected209{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}; +static constexpr std::string_view equation210 = "bca,dc,edf->bae"; +static constexpr std::array shape210{2, 2, 2}; +static constexpr std::array expected210{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}; +static constexpr std::string_view equation211 = "bca,dc,edf->bad"; +static constexpr std::array shape211{2, 2, 2}; +static constexpr std::array expected211{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}; +static constexpr std::string_view equation212 = "bca,dc,efd->bce"; +static constexpr std::array shape212{2, 2, 2}; +static constexpr std::array expected212{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}; +static constexpr std::string_view equation213 = "bca,dc,efd->bcf"; +static constexpr std::array shape213{2, 2, 2}; +static constexpr std::array expected213{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}; +static constexpr std::string_view equation214 = "bca,dc,efd->bae"; +static constexpr std::array shape214{2, 2, 2}; +static constexpr std::array expected214{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}; +static constexpr std::string_view equation215 = "bca,dc,efd->baf"; +static constexpr std::array shape215{2, 2, 2}; +static constexpr std::array expected215{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}; +static constexpr std::string_view equation216 = "bca,dc,fde->bcf"; +static constexpr std::array shape216{2, 2, 2}; +static constexpr std::array expected216{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}; +static constexpr std::string_view equation217 = "bca,dc,fde->bcd"; +static constexpr std::array shape217{2, 2, 2}; +static constexpr std::array expected217{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}; +static constexpr std::string_view equation218 = "bca,dc,fde->baf"; +static constexpr std::array shape218{2, 2, 2}; +static constexpr std::array expected218{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}; +static constexpr std::string_view equation219 = "bca,dc,fde->bad"; +static constexpr std::array shape219{2, 2, 2}; +static constexpr std::array expected219{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}; +static constexpr std::string_view equation220 = "bca,dc,fed->bcf"; +static constexpr std::array shape220{2, 2, 2}; +static constexpr std::array expected220{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}; +static constexpr std::string_view equation221 = "bca,dc,fed->bce"; +static constexpr std::array shape221{2, 2, 2}; +static constexpr std::array expected221{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}; +static constexpr std::string_view equation222 = "bca,dc,fed->baf"; +static constexpr std::array shape222{2, 2, 2}; +static constexpr std::array expected222{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}; +static constexpr std::string_view equation223 = "bca,dc,fed->bae"; +static constexpr std::array shape223{2, 2, 2}; +static constexpr std::array expected223{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}; +static constexpr std::string_view equation224 = "cab,cd,def->cad"; +static constexpr std::array shape224{2, 2, 2}; +static constexpr std::array expected224{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}; +static constexpr std::string_view equation225 = "cab,cd,def->cae"; +static constexpr std::array shape225{2, 2, 2}; +static constexpr std::array expected225{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}; +static constexpr std::string_view equation226 = "cab,cd,def->cbd"; +static constexpr std::array shape226{2, 2, 2}; +static constexpr std::array expected226{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}; +static constexpr std::string_view equation227 = "cab,cd,def->cbe"; +static constexpr std::array shape227{2, 2, 2}; +static constexpr std::array expected227{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}; +static constexpr std::string_view equation228 = "cab,cd,dfe->cad"; +static constexpr std::array shape228{2, 2, 2}; +static constexpr std::array expected228{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}; +static constexpr std::string_view equation229 = "cab,cd,dfe->caf"; +static constexpr std::array shape229{2, 2, 2}; +static constexpr std::array expected229{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}; +static constexpr std::string_view equation230 = "cab,cd,dfe->cbd"; +static constexpr std::array shape230{2, 2, 2}; +static constexpr std::array expected230{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}; +static constexpr std::string_view equation231 = "cab,cd,dfe->cbf"; +static constexpr std::array shape231{2, 2, 2}; +static constexpr std::array expected231{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}; +static constexpr std::string_view equation232 = "cab,cd,edf->cae"; +static constexpr std::array shape232{2, 2, 2}; +static constexpr std::array expected232{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}; +static constexpr std::string_view equation233 = "cab,cd,edf->cad"; +static constexpr std::array shape233{2, 2, 2}; +static constexpr std::array expected233{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}; +static constexpr std::string_view equation234 = "cab,cd,edf->cbe"; +static constexpr std::array shape234{2, 2, 2}; +static constexpr std::array expected234{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}; +static constexpr std::string_view equation235 = "cab,cd,edf->cbd"; +static constexpr std::array shape235{2, 2, 2}; +static constexpr std::array expected235{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}; +static constexpr std::string_view equation236 = "cab,cd,efd->cae"; +static constexpr std::array shape236{2, 2, 2}; +static constexpr std::array expected236{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}; +static constexpr std::string_view equation237 = "cab,cd,efd->caf"; +static constexpr std::array shape237{2, 2, 2}; +static constexpr std::array expected237{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}; +static constexpr std::string_view equation238 = "cab,cd,efd->cbe"; +static constexpr std::array shape238{2, 2, 2}; +static constexpr std::array expected238{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}; +static constexpr std::string_view equation239 = "cab,cd,efd->cbf"; +static constexpr std::array shape239{2, 2, 2}; +static constexpr std::array expected239{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}; +static constexpr std::string_view equation240 = "cab,cd,fde->caf"; +static constexpr std::array shape240{2, 2, 2}; +static constexpr std::array expected240{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}; +static constexpr std::string_view equation241 = "cab,cd,fde->cad"; +static constexpr std::array shape241{2, 2, 2}; +static constexpr std::array expected241{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}; +static constexpr std::string_view equation242 = "cab,cd,fde->cbf"; +static constexpr std::array shape242{2, 2, 2}; +static constexpr std::array expected242{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}; +static constexpr std::string_view equation243 = "cab,cd,fde->cbd"; +static constexpr std::array shape243{2, 2, 2}; +static constexpr std::array expected243{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}; +static constexpr std::string_view equation244 = "cab,cd,fed->caf"; +static constexpr std::array shape244{2, 2, 2}; +static constexpr std::array expected244{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}; +static constexpr std::string_view equation245 = "cab,cd,fed->cae"; +static constexpr std::array shape245{2, 2, 2}; +static constexpr std::array expected245{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}; +static constexpr std::string_view equation246 = "cab,cd,fed->cbf"; +static constexpr std::array shape246{2, 2, 2}; +static constexpr std::array expected246{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}; +static constexpr std::string_view equation247 = "cab,cd,fed->cbe"; +static constexpr std::array shape247{2, 2, 2}; +static constexpr std::array expected247{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}; +static constexpr std::string_view equation248 = "cab,dc,def->cad"; +static constexpr std::array shape248{2, 2, 2}; +static constexpr std::array expected248{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}; +static constexpr std::string_view equation249 = "cab,dc,def->cae"; +static constexpr std::array shape249{2, 2, 2}; +static constexpr std::array expected249{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}; +static constexpr std::string_view equation250 = "cab,dc,def->cbd"; +static constexpr std::array shape250{2, 2, 2}; +static constexpr std::array expected250{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}; +static constexpr std::array case2 = {{ + {equation106, shape106, expected106}, + {equation107, shape107, expected107}, + {equation108, shape108, expected108}, + {equation109, shape109, expected109}, + {equation110, shape110, expected110}, + {equation111, shape111, expected111}, + {equation112, shape112, expected112}, + {equation113, shape113, expected113}, + {equation114, shape114, expected114}, + {equation115, shape115, expected115}, + {equation116, shape116, expected116}, + {equation117, shape117, expected117}, + {equation118, shape118, expected118}, + {equation119, shape119, expected119}, + {equation120, shape120, expected120}, + {equation121, shape121, expected121}, + {equation122, shape122, expected122}, + {equation123, shape123, expected123}, + {equation124, shape124, expected124}, + {equation125, shape125, expected125}, + {equation126, shape126, expected126}, + {equation127, shape127, expected127}, + {equation128, shape128, expected128}, + {equation129, shape129, expected129}, + {equation130, shape130, expected130}, + {equation131, shape131, expected131}, + {equation132, shape132, expected132}, + {equation133, shape133, expected133}, + {equation134, shape134, expected134}, + {equation135, shape135, expected135}, + {equation136, shape136, expected136}, + {equation137, shape137, expected137}, + {equation138, shape138, expected138}, + {equation139, shape139, expected139}, + {equation140, shape140, expected140}, + {equation141, shape141, expected141}, + {equation142, shape142, expected142}, + {equation143, shape143, expected143}, + {equation144, shape144, expected144}, + {equation145, shape145, expected145}, + {equation146, shape146, expected146}, + {equation147, shape147, expected147}, + {equation148, shape148, expected148}, + {equation149, shape149, expected149}, + {equation150, shape150, expected150}, + {equation151, shape151, expected151}, + {equation152, shape152, expected152}, + {equation153, shape153, expected153}, + {equation154, shape154, expected154}, + {equation155, shape155, expected155}, + {equation156, shape156, expected156}, + {equation157, shape157, expected157}, + {equation158, shape158, expected158}, + {equation159, shape159, expected159}, + {equation160, shape160, expected160}, + {equation161, shape161, expected161}, + {equation162, shape162, expected162}, + {equation163, shape163, expected163}, + {equation164, shape164, expected164}, + {equation165, shape165, expected165}, + {equation166, shape166, expected166}, + {equation167, shape167, expected167}, + {equation168, shape168, expected168}, + {equation169, shape169, expected169}, + {equation170, shape170, expected170}, + {equation171, shape171, expected171}, + {equation172, shape172, expected172}, + {equation173, shape173, expected173}, + {equation174, shape174, expected174}, + {equation175, shape175, expected175}, + {equation176, shape176, expected176}, + {equation177, shape177, expected177}, + {equation178, shape178, expected178}, + {equation179, shape179, expected179}, + {equation180, shape180, expected180}, + {equation181, shape181, expected181}, + {equation182, shape182, expected182}, + {equation183, shape183, expected183}, + {equation184, shape184, expected184}, + {equation185, shape185, expected185}, + {equation186, shape186, expected186}, + {equation187, shape187, expected187}, + {equation188, shape188, expected188}, + {equation189, shape189, expected189}, + {equation190, shape190, expected190}, + {equation191, shape191, expected191}, + {equation192, shape192, expected192}, + {equation193, shape193, expected193}, + {equation194, shape194, expected194}, + {equation195, shape195, expected195}, + {equation196, shape196, expected196}, + {equation197, shape197, expected197}, + {equation198, shape198, expected198}, + {equation199, shape199, expected199}, + {equation200, shape200, expected200}, + {equation201, shape201, expected201}, + {equation202, shape202, expected202}, + {equation203, shape203, expected203}, + {equation204, shape204, expected204}, + {equation205, shape205, expected205}, + {equation206, shape206, expected206}, + {equation207, shape207, expected207}, + {equation208, shape208, expected208}, + {equation209, shape209, expected209}, + {equation210, shape210, expected210}, + {equation211, shape211, expected211}, + {equation212, shape212, expected212}, + {equation213, shape213, expected213}, + {equation214, shape214, expected214}, + {equation215, shape215, expected215}, + {equation216, shape216, expected216}, + {equation217, shape217, expected217}, + {equation218, shape218, expected218}, + {equation219, shape219, expected219}, + {equation220, shape220, expected220}, + {equation221, shape221, expected221}, + {equation222, shape222, expected222}, + {equation223, shape223, expected223}, + {equation224, shape224, expected224}, + {equation225, shape225, expected225}, + {equation226, shape226, expected226}, + {equation227, shape227, expected227}, + {equation228, shape228, expected228}, + {equation229, shape229, expected229}, + {equation230, shape230, expected230}, + {equation231, shape231, expected231}, + {equation232, shape232, expected232}, + {equation233, shape233, expected233}, + {equation234, shape234, expected234}, + {equation235, shape235, expected235}, + {equation236, shape236, expected236}, + {equation237, shape237, expected237}, + {equation238, shape238, expected238}, + {equation239, shape239, expected239}, + {equation240, shape240, expected240}, + {equation241, shape241, expected241}, + {equation242, shape242, expected242}, + {equation243, shape243, expected243}, + {equation244, shape244, expected244}, + {equation245, shape245, expected245}, + {equation246, shape246, expected246}, + {equation247, shape247, expected247}, + {equation248, shape248, expected248}, + {equation249, shape249, expected249}, + {equation250, shape250, expected250}, +}}; + +static constexpr std::string_view equation251 = "cab,dc,def->cbe"; +static constexpr std::array shape251{2, 2, 2}; +static constexpr std::array expected251{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}; +static constexpr std::string_view equation252 = "cab,dc,dfe->cad"; +static constexpr std::array shape252{2, 2, 2}; +static constexpr std::array expected252{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}; +static constexpr std::string_view equation253 = "cab,dc,dfe->caf"; +static constexpr std::array shape253{2, 2, 2}; +static constexpr std::array expected253{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}; +static constexpr std::string_view equation254 = "cab,dc,dfe->cbd"; +static constexpr std::array shape254{2, 2, 2}; +static constexpr std::array expected254{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}; +static constexpr std::string_view equation255 = "cab,dc,dfe->cbf"; +static constexpr std::array shape255{2, 2, 2}; +static constexpr std::array expected255{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}; +static constexpr std::string_view equation256 = "cab,dc,edf->cae"; +static constexpr std::array shape256{2, 2, 2}; +static constexpr std::array expected256{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}; +static constexpr std::string_view equation257 = "cab,dc,edf->cad"; +static constexpr std::array shape257{2, 2, 2}; +static constexpr std::array expected257{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}; +static constexpr std::string_view equation258 = "cab,dc,edf->cbe"; +static constexpr std::array shape258{2, 2, 2}; +static constexpr std::array expected258{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}; +static constexpr std::string_view equation259 = "cab,dc,edf->cbd"; +static constexpr std::array shape259{2, 2, 2}; +static constexpr std::array expected259{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}; +static constexpr std::string_view equation260 = "cab,dc,efd->cae"; +static constexpr std::array shape260{2, 2, 2}; +static constexpr std::array expected260{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}; +static constexpr std::string_view equation261 = "cab,dc,efd->caf"; +static constexpr std::array shape261{2, 2, 2}; +static constexpr std::array expected261{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}; +static constexpr std::string_view equation262 = "cab,dc,efd->cbe"; +static constexpr std::array shape262{2, 2, 2}; +static constexpr std::array expected262{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}; +static constexpr std::string_view equation263 = "cab,dc,efd->cbf"; +static constexpr std::array shape263{2, 2, 2}; +static constexpr std::array expected263{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}; +static constexpr std::string_view equation264 = "cab,dc,fde->caf"; +static constexpr std::array shape264{2, 2, 2}; +static constexpr std::array expected264{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}; +static constexpr std::string_view equation265 = "cab,dc,fde->cad"; +static constexpr std::array shape265{2, 2, 2}; +static constexpr std::array expected265{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}; +static constexpr std::string_view equation266 = "cab,dc,fde->cbf"; +static constexpr std::array shape266{2, 2, 2}; +static constexpr std::array expected266{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}; +static constexpr std::string_view equation267 = "cab,dc,fde->cbd"; +static constexpr std::array shape267{2, 2, 2}; +static constexpr std::array expected267{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}; +static constexpr std::string_view equation268 = "cab,dc,fed->caf"; +static constexpr std::array shape268{2, 2, 2}; +static constexpr std::array expected268{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}; +static constexpr std::string_view equation269 = "cab,dc,fed->cae"; +static constexpr std::array shape269{2, 2, 2}; +static constexpr std::array expected269{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}; +static constexpr std::string_view equation270 = "cab,dc,fed->cbf"; +static constexpr std::array shape270{2, 2, 2}; +static constexpr std::array expected270{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}; +static constexpr std::string_view equation271 = "cab,dc,fed->cbe"; +static constexpr std::array shape271{2, 2, 2}; +static constexpr std::array expected271{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}; +static constexpr std::string_view equation272 = "cba,cd,def->cbd"; +static constexpr std::array shape272{2, 2, 2}; +static constexpr std::array expected272{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}; +static constexpr std::string_view equation273 = "cba,cd,def->cbe"; +static constexpr std::array shape273{2, 2, 2}; +static constexpr std::array expected273{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}; +static constexpr std::string_view equation274 = "cba,cd,def->cad"; +static constexpr std::array shape274{2, 2, 2}; +static constexpr std::array expected274{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}; +static constexpr std::string_view equation275 = "cba,cd,def->cae"; +static constexpr std::array shape275{2, 2, 2}; +static constexpr std::array expected275{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}; +static constexpr std::string_view equation276 = "cba,cd,dfe->cbd"; +static constexpr std::array shape276{2, 2, 2}; +static constexpr std::array expected276{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}; +static constexpr std::string_view equation277 = "cba,cd,dfe->cbf"; +static constexpr std::array shape277{2, 2, 2}; +static constexpr std::array expected277{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}; +static constexpr std::string_view equation278 = "cba,cd,dfe->cad"; +static constexpr std::array shape278{2, 2, 2}; +static constexpr std::array expected278{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}; +static constexpr std::string_view equation279 = "cba,cd,dfe->caf"; +static constexpr std::array shape279{2, 2, 2}; +static constexpr std::array expected279{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}; +static constexpr std::string_view equation280 = "cba,cd,edf->cbe"; +static constexpr std::array shape280{2, 2, 2}; +static constexpr std::array expected280{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}; +static constexpr std::string_view equation281 = "cba,cd,edf->cbd"; +static constexpr std::array shape281{2, 2, 2}; +static constexpr std::array expected281{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}; +static constexpr std::string_view equation282 = "cba,cd,edf->cae"; +static constexpr std::array shape282{2, 2, 2}; +static constexpr std::array expected282{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}; +static constexpr std::string_view equation283 = "cba,cd,edf->cad"; +static constexpr std::array shape283{2, 2, 2}; +static constexpr std::array expected283{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}; +static constexpr std::string_view equation284 = "cba,cd,efd->cbe"; +static constexpr std::array shape284{2, 2, 2}; +static constexpr std::array expected284{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}; +static constexpr std::string_view equation285 = "cba,cd,efd->cbf"; +static constexpr std::array shape285{2, 2, 2}; +static constexpr std::array expected285{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}; +static constexpr std::string_view equation286 = "cba,cd,efd->cae"; +static constexpr std::array shape286{2, 2, 2}; +static constexpr std::array expected286{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}; +static constexpr std::string_view equation287 = "cba,cd,efd->caf"; +static constexpr std::array shape287{2, 2, 2}; +static constexpr std::array expected287{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}; +static constexpr std::string_view equation288 = "cba,cd,fde->cbf"; +static constexpr std::array shape288{2, 2, 2}; +static constexpr std::array expected288{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}; +static constexpr std::string_view equation289 = "cba,cd,fde->cbd"; +static constexpr std::array shape289{2, 2, 2}; +static constexpr std::array expected289{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}; +static constexpr std::string_view equation290 = "cba,cd,fde->caf"; +static constexpr std::array shape290{2, 2, 2}; +static constexpr std::array expected290{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}; +static constexpr std::string_view equation291 = "cba,cd,fde->cad"; +static constexpr std::array shape291{2, 2, 2}; +static constexpr std::array expected291{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}; +static constexpr std::string_view equation292 = "cba,cd,fed->cbf"; +static constexpr std::array shape292{2, 2, 2}; +static constexpr std::array expected292{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}; +static constexpr std::string_view equation293 = "cba,cd,fed->cbe"; +static constexpr std::array shape293{2, 2, 2}; +static constexpr std::array expected293{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}; +static constexpr std::string_view equation294 = "cba,cd,fed->caf"; +static constexpr std::array shape294{2, 2, 2}; +static constexpr std::array expected294{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}; +static constexpr std::string_view equation295 = "cba,cd,fed->cae"; +static constexpr std::array shape295{2, 2, 2}; +static constexpr std::array expected295{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}; +static constexpr std::string_view equation296 = "cba,dc,def->cbd"; +static constexpr std::array shape296{2, 2, 2}; +static constexpr std::array expected296{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}; +static constexpr std::string_view equation297 = "cba,dc,def->cbe"; +static constexpr std::array shape297{2, 2, 2}; +static constexpr std::array expected297{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}; +static constexpr std::string_view equation298 = "cba,dc,def->cad"; +static constexpr std::array shape298{2, 2, 2}; +static constexpr std::array expected298{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}; +static constexpr std::string_view equation299 = "cba,dc,def->cae"; +static constexpr std::array shape299{2, 2, 2}; +static constexpr std::array expected299{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}; +static constexpr std::string_view equation300 = "cba,dc,dfe->cbd"; +static constexpr std::array shape300{2, 2, 2}; +static constexpr std::array expected300{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}; +static constexpr std::string_view equation301 = "cba,dc,dfe->cbf"; +static constexpr std::array shape301{2, 2, 2}; +static constexpr std::array expected301{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}; +static constexpr std::string_view equation302 = "cba,dc,dfe->cad"; +static constexpr std::array shape302{2, 2, 2}; +static constexpr std::array expected302{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}; +static constexpr std::string_view equation303 = "cba,dc,dfe->caf"; +static constexpr std::array shape303{2, 2, 2}; +static constexpr std::array expected303{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}; +static constexpr std::string_view equation304 = "cba,dc,edf->cbe"; +static constexpr std::array shape304{2, 2, 2}; +static constexpr std::array expected304{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}; +static constexpr std::string_view equation305 = "cba,dc,edf->cbd"; +static constexpr std::array shape305{2, 2, 2}; +static constexpr std::array expected305{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}; +static constexpr std::string_view equation306 = "cba,dc,edf->cae"; +static constexpr std::array shape306{2, 2, 2}; +static constexpr std::array expected306{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}; +static constexpr std::string_view equation307 = "cba,dc,edf->cad"; +static constexpr std::array shape307{2, 2, 2}; +static constexpr std::array expected307{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}; +static constexpr std::string_view equation308 = "cba,dc,efd->cbe"; +static constexpr std::array shape308{2, 2, 2}; +static constexpr std::array expected308{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}; +static constexpr std::string_view equation309 = "cba,dc,efd->cbf"; +static constexpr std::array shape309{2, 2, 2}; +static constexpr std::array expected309{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}; +static constexpr std::string_view equation310 = "cba,dc,efd->cae"; +static constexpr std::array shape310{2, 2, 2}; +static constexpr std::array expected310{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}; +static constexpr std::string_view equation311 = "cba,dc,efd->caf"; +static constexpr std::array shape311{2, 2, 2}; +static constexpr std::array expected311{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}; +static constexpr std::string_view equation312 = "cba,dc,fde->cbf"; +static constexpr std::array shape312{2, 2, 2}; +static constexpr std::array expected312{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}; +static constexpr std::string_view equation313 = "cba,dc,fde->cbd"; +static constexpr std::array shape313{2, 2, 2}; +static constexpr std::array expected313{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}; +static constexpr std::string_view equation314 = "cba,dc,fde->caf"; +static constexpr std::array shape314{2, 2, 2}; +static constexpr std::array expected314{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}; +static constexpr std::string_view equation315 = "cba,dc,fde->cad"; +static constexpr std::array shape315{2, 2, 2}; +static constexpr std::array expected315{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}; +static constexpr std::string_view equation316 = "cba,dc,fed->cbf"; +static constexpr std::array shape316{2, 2, 2}; +static constexpr std::array expected316{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}; +static constexpr std::string_view equation317 = "cba,dc,fed->cbe"; +static constexpr std::array shape317{2, 2, 2}; +static constexpr std::array expected317{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}; +static constexpr std::string_view equation318 = "cba,dc,fed->caf"; +static constexpr std::array shape318{2, 2, 2}; +static constexpr std::array expected318{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}; +static constexpr std::string_view equation319 = "cba,dc,fed->cae"; +static constexpr std::array shape319{2, 2, 2}; +static constexpr std::array expected319{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}; +static constexpr std::array case3 = {{ + {equation251, shape251, expected251}, + {equation252, shape252, expected252}, + {equation253, shape253, expected253}, + {equation254, shape254, expected254}, + {equation255, shape255, expected255}, + {equation256, shape256, expected256}, + {equation257, shape257, expected257}, + {equation258, shape258, expected258}, + {equation259, shape259, expected259}, + {equation260, shape260, expected260}, + {equation261, shape261, expected261}, + {equation262, shape262, expected262}, + {equation263, shape263, expected263}, + {equation264, shape264, expected264}, + {equation265, shape265, expected265}, + {equation266, shape266, expected266}, + {equation267, shape267, expected267}, + {equation268, shape268, expected268}, + {equation269, shape269, expected269}, + {equation270, shape270, expected270}, + {equation271, shape271, expected271}, + {equation272, shape272, expected272}, + {equation273, shape273, expected273}, + {equation274, shape274, expected274}, + {equation275, shape275, expected275}, + {equation276, shape276, expected276}, + {equation277, shape277, expected277}, + {equation278, shape278, expected278}, + {equation279, shape279, expected279}, + {equation280, shape280, expected280}, + {equation281, shape281, expected281}, + {equation282, shape282, expected282}, + {equation283, shape283, expected283}, + {equation284, shape284, expected284}, + {equation285, shape285, expected285}, + {equation286, shape286, expected286}, + {equation287, shape287, expected287}, + {equation288, shape288, expected288}, + {equation289, shape289, expected289}, + {equation290, shape290, expected290}, + {equation291, shape291, expected291}, + {equation292, shape292, expected292}, + {equation293, shape293, expected293}, + {equation294, shape294, expected294}, + {equation295, shape295, expected295}, + {equation296, shape296, expected296}, + {equation297, shape297, expected297}, + {equation298, shape298, expected298}, + {equation299, shape299, expected299}, + {equation300, shape300, expected300}, + {equation301, shape301, expected301}, + {equation302, shape302, expected302}, + {equation303, shape303, expected303}, + {equation304, shape304, expected304}, + {equation305, shape305, expected305}, + {equation306, shape306, expected306}, + {equation307, shape307, expected307}, + {equation308, shape308, expected308}, + {equation309, shape309, expected309}, + {equation310, shape310, expected310}, + {equation311, shape311, expected311}, + {equation312, shape312, expected312}, + {equation313, shape313, expected313}, + {equation314, shape314, expected314}, + {equation315, shape315, expected315}, + {equation316, shape316, expected316}, + {equation317, shape317, expected317}, + {equation318, shape318, expected318}, + {equation319, shape319, expected319}, +}}; +TEST(Einsum, EinsumTransposeMatMulTwoInputsTestSuite) { std::vector m1{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; std::vector m2{0.f, 1.f, 2.f, 3.f}; - for (const auto& tst : test_cases) { + for (const auto& tst : case0) { OpTester test("Einsum", 12, onnxruntime::kOnnxDomain); - test.AddAttribute("equation", tst.equation); + std::string s(tst.equation); + test.AddAttribute("equation", s); test.AddInput("x", {2, 2, 2}, m1); test.AddInput("y", {2, 2}, m2); - test.AddOutput("o", tst.shape, tst.expected); + test.AddOutput("o", std::vector(tst.shape.begin(), tst.shape.end()), std::vector(tst.expected.begin(), tst.expected.end())); test.Run(); } } -TEST(Einsum, EinsumTransposeMatMulThreeInputsTestSuite) { - std::vector test_cases_set_1{ - EinsumTestCase("abc,cd,def->abd", std::vector{2, 2, 2}, std::vector{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}), - EinsumTestCase("abc,cd,def->abe", std::vector{2, 2, 2}, std::vector{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}), - EinsumTestCase("abc,cd,def->acd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}), - EinsumTestCase("abc,cd,def->ace", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}), - EinsumTestCase("abc,cd,dfe->abd", std::vector{2, 2, 2}, std::vector{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}), - EinsumTestCase("abc,cd,dfe->abf", std::vector{2, 2, 2}, std::vector{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}), - EinsumTestCase("abc,cd,dfe->acd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}), - EinsumTestCase("abc,cd,dfe->acf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}), - EinsumTestCase("abc,cd,edf->abe", std::vector{2, 2, 2}, std::vector{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}), - EinsumTestCase("abc,cd,edf->abd", std::vector{2, 2, 2}, std::vector{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}), - EinsumTestCase("abc,cd,edf->ace", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}), - EinsumTestCase("abc,cd,edf->acd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}), - EinsumTestCase("abc,cd,efd->abe", std::vector{2, 2, 2}, std::vector{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}), - EinsumTestCase("abc,cd,efd->abf", std::vector{2, 2, 2}, std::vector{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}), - EinsumTestCase("abc,cd,efd->ace", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}), - EinsumTestCase("abc,cd,efd->acf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}), - EinsumTestCase("abc,cd,fde->abf", std::vector{2, 2, 2}, std::vector{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}), - EinsumTestCase("abc,cd,fde->abd", std::vector{2, 2, 2}, std::vector{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}), - EinsumTestCase("abc,cd,fde->acf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}), - EinsumTestCase("abc,cd,fde->acd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}), - EinsumTestCase("abc,cd,fed->abf", std::vector{2, 2, 2}, std::vector{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}), - EinsumTestCase("abc,cd,fed->abe", std::vector{2, 2, 2}, std::vector{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}), - EinsumTestCase("abc,cd,fed->acf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}), - EinsumTestCase("abc,cd,fed->ace", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}), - EinsumTestCase("abc,dc,def->abd", std::vector{2, 2, 2}, std::vector{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}), - EinsumTestCase("abc,dc,def->abe", std::vector{2, 2, 2}, std::vector{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}), - EinsumTestCase("abc,dc,def->acd", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}), - EinsumTestCase("abc,dc,def->ace", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}), - EinsumTestCase("abc,dc,dfe->abd", std::vector{2, 2, 2}, std::vector{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}), - EinsumTestCase("abc,dc,dfe->abf", std::vector{2, 2, 2}, std::vector{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}), - EinsumTestCase("abc,dc,dfe->acd", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}), - EinsumTestCase("abc,dc,dfe->acf", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}), - EinsumTestCase("abc,dc,edf->abe", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}), - EinsumTestCase("abc,dc,edf->abd", std::vector{2, 2, 2}, std::vector{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}), - EinsumTestCase("abc,dc,edf->ace", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}), - EinsumTestCase("abc,dc,edf->acd", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}), - EinsumTestCase("abc,dc,efd->abe", std::vector{2, 2, 2}, std::vector{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}), - EinsumTestCase("abc,dc,efd->abf", std::vector{2, 2, 2}, std::vector{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}), - EinsumTestCase("abc,dc,efd->ace", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}), - EinsumTestCase("abc,dc,efd->acf", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}), - EinsumTestCase("abc,dc,fde->abf", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}), - EinsumTestCase("abc,dc,fde->abd", std::vector{2, 2, 2}, std::vector{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}), - EinsumTestCase("abc,dc,fde->acf", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}), - EinsumTestCase("abc,dc,fde->acd", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}), - EinsumTestCase("abc,dc,fed->abf", std::vector{2, 2, 2}, std::vector{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}), - EinsumTestCase("abc,dc,fed->abe", std::vector{2, 2, 2}, std::vector{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}), - EinsumTestCase("abc,dc,fed->acf", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}), - EinsumTestCase("abc,dc,fed->ace", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}), - EinsumTestCase("acb,cd,def->acd", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}), - EinsumTestCase("acb,cd,def->ace", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}), - EinsumTestCase("acb,cd,def->abd", std::vector{2, 2, 2}, std::vector{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}), - EinsumTestCase("acb,cd,def->abe", std::vector{2, 2, 2}, std::vector{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}), - EinsumTestCase("acb,cd,dfe->acd", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}), - EinsumTestCase("acb,cd,dfe->acf", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}), - EinsumTestCase("acb,cd,dfe->abd", std::vector{2, 2, 2}, std::vector{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}), - EinsumTestCase("acb,cd,dfe->abf", std::vector{2, 2, 2}, std::vector{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}), - EinsumTestCase("acb,cd,edf->ace", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}), - EinsumTestCase("acb,cd,edf->acd", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}), - EinsumTestCase("acb,cd,edf->abe", std::vector{2, 2, 2}, std::vector{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}), - EinsumTestCase("acb,cd,edf->abd", std::vector{2, 2, 2}, std::vector{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}), - EinsumTestCase("acb,cd,efd->ace", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}), - EinsumTestCase("acb,cd,efd->acf", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}), - EinsumTestCase("acb,cd,efd->abe", std::vector{2, 2, 2}, std::vector{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}), - EinsumTestCase("acb,cd,efd->abf", std::vector{2, 2, 2}, std::vector{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}), - EinsumTestCase("acb,cd,fde->acf", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}), - EinsumTestCase("acb,cd,fde->acd", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}), - EinsumTestCase("acb,cd,fde->abf", std::vector{2, 2, 2}, std::vector{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}), - EinsumTestCase("acb,cd,fde->abd", std::vector{2, 2, 2}, std::vector{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}), - EinsumTestCase("acb,cd,fed->acf", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}), - EinsumTestCase("acb,cd,fed->ace", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}), - EinsumTestCase("acb,cd,fed->abf", std::vector{2, 2, 2}, std::vector{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}), - EinsumTestCase("acb,cd,fed->abe", std::vector{2, 2, 2}, std::vector{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}), - EinsumTestCase("acb,dc,def->acd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}), - EinsumTestCase("acb,dc,def->ace", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f})}; - - std::vector test_cases_set_2{ - EinsumTestCase("acb,dc,def->abd", std::vector{2, 2, 2}, std::vector{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}), - EinsumTestCase("acb,dc,def->abe", std::vector{2, 2, 2}, std::vector{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}), - EinsumTestCase("acb,dc,dfe->acd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}), - EinsumTestCase("acb,dc,dfe->acf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}), - EinsumTestCase("acb,dc,dfe->abd", std::vector{2, 2, 2}, std::vector{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}), - EinsumTestCase("acb,dc,dfe->abf", std::vector{2, 2, 2}, std::vector{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}), - EinsumTestCase("acb,dc,edf->ace", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}), - EinsumTestCase("acb,dc,edf->acd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}), - EinsumTestCase("acb,dc,edf->abe", std::vector{2, 2, 2}, std::vector{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}), - EinsumTestCase("acb,dc,edf->abd", std::vector{2, 2, 2}, std::vector{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}), - EinsumTestCase("acb,dc,efd->ace", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}), - EinsumTestCase("acb,dc,efd->acf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}), - EinsumTestCase("acb,dc,efd->abe", std::vector{2, 2, 2}, std::vector{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}), - EinsumTestCase("acb,dc,efd->abf", std::vector{2, 2, 2}, std::vector{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}), - EinsumTestCase("acb,dc,fde->acf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}), - EinsumTestCase("acb,dc,fde->acd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}), - EinsumTestCase("acb,dc,fde->abf", std::vector{2, 2, 2}, std::vector{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}), - EinsumTestCase("acb,dc,fde->abd", std::vector{2, 2, 2}, std::vector{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}), - EinsumTestCase("acb,dc,fed->acf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}), - EinsumTestCase("acb,dc,fed->ace", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}), - EinsumTestCase("acb,dc,fed->abf", std::vector{2, 2, 2}, std::vector{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}), - EinsumTestCase("acb,dc,fed->abe", std::vector{2, 2, 2}, std::vector{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}), - EinsumTestCase("bac,cd,def->bad", std::vector{2, 2, 2}, std::vector{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}), - EinsumTestCase("bac,cd,def->bae", std::vector{2, 2, 2}, std::vector{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}), - EinsumTestCase("bac,cd,def->bcd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}), - EinsumTestCase("bac,cd,def->bce", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}), - EinsumTestCase("bac,cd,dfe->bad", std::vector{2, 2, 2}, std::vector{12.f, 66.f, 36.f, 242.f, 60.f, 418.f, 84.f, 594.f}), - EinsumTestCase("bac,cd,dfe->baf", std::vector{2, 2, 2}, std::vector{29.f, 49.f, 105.f, 173.f, 181.f, 297.f, 257.f, 421.f}), - EinsumTestCase("bac,cd,dfe->bcd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 48.f, 264.f, 0.f, 220.f, 144.f, 792.f}), - EinsumTestCase("bac,cd,dfe->bcf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 116.f, 196.f, 90.f, 130.f, 348.f, 588.f}), - EinsumTestCase("bac,cd,edf->bae", std::vector{2, 2, 2}, std::vector{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}), - EinsumTestCase("bac,cd,edf->bad", std::vector{2, 2, 2}, std::vector{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}), - EinsumTestCase("bac,cd,edf->bce", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}), - EinsumTestCase("bac,cd,edf->bcd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}), - EinsumTestCase("bac,cd,efd->bae", std::vector{2, 2, 2}, std::vector{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}), - EinsumTestCase("bac,cd,efd->baf", std::vector{2, 2, 2}, std::vector{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}), - EinsumTestCase("bac,cd,efd->bce", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}), - EinsumTestCase("bac,cd,efd->bcf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}), - EinsumTestCase("bac,cd,fde->baf", std::vector{2, 2, 2}, std::vector{17.f, 57.f, 61.f, 197.f, 105.f, 337.f, 149.f, 477.f}), - EinsumTestCase("bac,cd,fde->bad", std::vector{2, 2, 2}, std::vector{20.f, 54.f, 60.f, 198.f, 100.f, 342.f, 140.f, 486.f}), - EinsumTestCase("bac,cd,fde->bcf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 68.f, 228.f, 50.f, 130.f, 204.f, 684.f}), - EinsumTestCase("bac,cd,fde->bcd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 80.f, 216.f, 0.f, 180.f, 240.f, 648.f}), - EinsumTestCase("bac,cd,fed->baf", std::vector{2, 2, 2}, std::vector{16.f, 56.f, 56.f, 192.f, 96.f, 328.f, 136.f, 464.f}), - EinsumTestCase("bac,cd,fed->bae", std::vector{2, 2, 2}, std::vector{26.f, 46.f, 90.f, 158.f, 154.f, 270.f, 218.f, 382.f}), - EinsumTestCase("bac,cd,fed->bcf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 64.f, 224.f, 40.f, 120.f, 192.f, 672.f}), - EinsumTestCase("bac,cd,fed->bce", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 104.f, 184.f, 60.f, 100.f, 312.f, 552.f}), - EinsumTestCase("bac,dc,def->bad", std::vector{2, 2, 2}, std::vector{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}), - EinsumTestCase("bac,dc,def->bae", std::vector{2, 2, 2}, std::vector{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}), - EinsumTestCase("bac,dc,def->bcd", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}), - EinsumTestCase("bac,dc,def->bce", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}), - EinsumTestCase("bac,dc,dfe->bad", std::vector{2, 2, 2}, std::vector{6.f, 66.f, 18.f, 286.f, 30.f, 506.f, 42.f, 726.f}), - EinsumTestCase("bac,dc,dfe->baf", std::vector{2, 2, 2}, std::vector{28.f, 44.f, 120.f, 184.f, 212.f, 324.f, 304.f, 464.f}), - EinsumTestCase("bac,dc,dfe->bcd", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 24.f, 264.f, 0.f, 440.f, 72.f, 792.f}), - EinsumTestCase("bac,dc,dfe->bcf", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 112.f, 176.f, 180.f, 260.f, 336.f, 528.f}), - EinsumTestCase("bac,dc,edf->bae", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}), - EinsumTestCase("bac,dc,edf->bad", std::vector{2, 2, 2}, std::vector{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}), - EinsumTestCase("bac,dc,edf->bce", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}), - EinsumTestCase("bac,dc,edf->bcd", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}), - EinsumTestCase("bac,dc,efd->bae", std::vector{2, 2, 2}, std::vector{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}), - EinsumTestCase("bac,dc,efd->baf", std::vector{2, 2, 2}, std::vector{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}), - EinsumTestCase("bac,dc,efd->bce", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}), - EinsumTestCase("bac,dc,efd->bcf", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}), - EinsumTestCase("bac,dc,fde->baf", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 68.f, 196.f, 120.f, 344.f, 172.f, 492.f}), - EinsumTestCase("bac,dc,fde->bad", std::vector{2, 2, 2}, std::vector{10.f, 54.f, 30.f, 234.f, 50.f, 414.f, 70.f, 594.f}), - EinsumTestCase("bac,dc,fde->bcf", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 64.f, 192.f, 100.f, 260.f, 192.f, 576.f}), - EinsumTestCase("bac,dc,fde->bcd", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 40.f, 216.f, 0.f, 360.f, 120.f, 648.f}), - EinsumTestCase("bac,dc,fed->baf", std::vector{2, 2, 2}, std::vector{14.f, 46.f, 58.f, 186.f, 102.f, 326.f, 146.f, 466.f}), - EinsumTestCase("bac,dc,fed->bae", std::vector{2, 2, 2}, std::vector{22.f, 38.f, 90.f, 154.f, 158.f, 270.f, 226.f, 386.f}), - EinsumTestCase("bac,dc,fed->bcf", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 56.f, 184.f, 80.f, 240.f, 168.f, 552.f}), - EinsumTestCase("bac,dc,fed->bce", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 88.f, 152.f, 120.f, 200.f, 264.f, 456.f}), - EinsumTestCase("bca,cd,def->bcd", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}), - EinsumTestCase("bca,cd,def->bce", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}), - EinsumTestCase("bca,cd,def->bad", std::vector{2, 2, 2}, std::vector{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}), - EinsumTestCase("bca,cd,def->bae", std::vector{2, 2, 2}, std::vector{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}), - EinsumTestCase("bca,cd,dfe->bcd", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 60.f, 330.f, 0.f, 198.f, 156.f, 858.f}), - EinsumTestCase("bca,cd,dfe->bcf", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 145.f, 245.f, 81.f, 117.f, 377.f, 637.f}), - EinsumTestCase("bca,cd,dfe->bad", std::vector{2, 2, 2}, std::vector{24.f, 132.f, 36.f, 220.f, 72.f, 484.f, 84.f, 572.f}), - EinsumTestCase("bca,cd,dfe->baf", std::vector{2, 2, 2}, std::vector{58.f, 98.f, 96.f, 160.f, 210.f, 346.f, 248.f, 408.f}), - EinsumTestCase("bca,cd,edf->bce", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}), - EinsumTestCase("bca,cd,edf->bcd", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}), - EinsumTestCase("bca,cd,edf->bae", std::vector{2, 2, 2}, std::vector{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}), - EinsumTestCase("bca,cd,edf->bad", std::vector{2, 2, 2}, std::vector{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}), - EinsumTestCase("bca,cd,efd->bce", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}), - EinsumTestCase("bca,cd,efd->bcf", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}), - EinsumTestCase("bca,cd,efd->bae", std::vector{2, 2, 2}, std::vector{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}), - EinsumTestCase("bca,cd,efd->baf", std::vector{2, 2, 2}, std::vector{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}), - EinsumTestCase("bca,cd,fde->bcf", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 85.f, 285.f, 45.f, 117.f, 221.f, 741.f}), - EinsumTestCase("bca,cd,fde->bcd", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 100.f, 270.f, 0.f, 162.f, 260.f, 702.f}), - EinsumTestCase("bca,cd,fde->baf", std::vector{2, 2, 2}, std::vector{34.f, 114.f, 56.f, 184.f, 122.f, 394.f, 144.f, 464.f}), - EinsumTestCase("bca,cd,fde->bad", std::vector{2, 2, 2}, std::vector{40.f, 108.f, 60.f, 180.f, 120.f, 396.f, 140.f, 468.f}), - EinsumTestCase("bca,cd,fed->bcf", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 80.f, 280.f, 36.f, 108.f, 208.f, 728.f}), - EinsumTestCase("bca,cd,fed->bce", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 130.f, 230.f, 54.f, 90.f, 338.f, 598.f}), - EinsumTestCase("bca,cd,fed->baf", std::vector{2, 2, 2}, std::vector{32.f, 112.f, 52.f, 180.f, 112.f, 384.f, 132.f, 452.f}), - EinsumTestCase("bca,cd,fed->bae", std::vector{2, 2, 2}, std::vector{52.f, 92.f, 84.f, 148.f, 180.f, 316.f, 212.f, 372.f}), - EinsumTestCase("bca,dc,def->bcd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}), - EinsumTestCase("bca,dc,def->bce", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}), - EinsumTestCase("bca,dc,def->bad", std::vector{2, 2, 2}, std::vector{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}), - EinsumTestCase("bca,dc,def->bae", std::vector{2, 2, 2}, std::vector{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}), - EinsumTestCase("bca,dc,dfe->bcd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 30.f, 330.f, 0.f, 396.f, 78.f, 858.f}), - EinsumTestCase("bca,dc,dfe->bcf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}), - EinsumTestCase("bca,dc,dfe->bad", std::vector{2, 2, 2}, std::vector{12.f, 132.f, 18.f, 242.f, 36.f, 572.f, 42.f, 682.f}), - EinsumTestCase("bca,dc,dfe->baf", std::vector{2, 2, 2}, std::vector{56.f, 88.f, 102.f, 158.f, 240.f, 368.f, 286.f, 438.f}), - EinsumTestCase("bca,dc,edf->bce", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}), - EinsumTestCase("bca,dc,edf->bcd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}), - EinsumTestCase("bca,dc,edf->bae", std::vector{2, 2, 2}, std::vector{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}), - EinsumTestCase("bca,dc,edf->bad", std::vector{2, 2, 2}, std::vector{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}), - EinsumTestCase("bca,dc,efd->bce", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}), - EinsumTestCase("bca,dc,efd->bcf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}), - EinsumTestCase("bca,dc,efd->bae", std::vector{2, 2, 2}, std::vector{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}), - EinsumTestCase("bca,dc,efd->baf", std::vector{2, 2, 2}, std::vector{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}), - EinsumTestCase("bca,dc,fde->bcf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 80.f, 240.f, 90.f, 234.f, 208.f, 624.f}), - EinsumTestCase("bca,dc,fde->bcd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 50.f, 270.f, 0.f, 324.f, 130.f, 702.f}), - EinsumTestCase("bca,dc,fde->baf", std::vector{2, 2, 2}, std::vector{32.f, 96.f, 58.f, 170.f, 136.f, 392.f, 162.f, 466.f}), - EinsumTestCase("bca,dc,fde->bad", std::vector{2, 2, 2}, std::vector{20.f, 108.f, 30.f, 198.f, 60.f, 468.f, 70.f, 558.f}), - EinsumTestCase("bca,dc,fed->bcf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 70.f, 230.f, 72.f, 216.f, 182.f, 598.f}), - EinsumTestCase("bca,dc,fed->bce", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 110.f, 190.f, 108.f, 180.f, 286.f, 494.f}), - EinsumTestCase("bca,dc,fed->baf", std::vector{2, 2, 2}, std::vector{28.f, 92.f, 50.f, 162.f, 116.f, 372.f, 138.f, 442.f}), - EinsumTestCase("bca,dc,fed->bae", std::vector{2, 2, 2}, std::vector{44.f, 76.f, 78.f, 134.f, 180.f, 308.f, 214.f, 366.f}), - EinsumTestCase("cab,cd,def->cad", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}), - EinsumTestCase("cab,cd,def->cae", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}), - EinsumTestCase("cab,cd,def->cbd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}), - EinsumTestCase("cab,cd,def->cbe", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}), - EinsumTestCase("cab,cd,dfe->cad", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}), - EinsumTestCase("cab,cd,dfe->caf", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}), - EinsumTestCase("cab,cd,dfe->cbd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}), - EinsumTestCase("cab,cd,dfe->cbf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}), - EinsumTestCase("cab,cd,edf->cae", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}), - EinsumTestCase("cab,cd,edf->cad", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}), - EinsumTestCase("cab,cd,edf->cbe", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}), - EinsumTestCase("cab,cd,edf->cbd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}), - EinsumTestCase("cab,cd,efd->cae", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}), - EinsumTestCase("cab,cd,efd->caf", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}), - EinsumTestCase("cab,cd,efd->cbe", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}), - EinsumTestCase("cab,cd,efd->cbf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}), - EinsumTestCase("cab,cd,fde->caf", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}), - EinsumTestCase("cab,cd,fde->cad", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}), - EinsumTestCase("cab,cd,fde->cbf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}), - EinsumTestCase("cab,cd,fde->cbd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}), - EinsumTestCase("cab,cd,fed->caf", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}), - EinsumTestCase("cab,cd,fed->cae", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}), - EinsumTestCase("cab,cd,fed->cbf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}), - EinsumTestCase("cab,cd,fed->cbe", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}), - EinsumTestCase("cab,dc,def->cad", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}), - EinsumTestCase("cab,dc,def->cae", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}), - EinsumTestCase("cab,dc,def->cbd", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f})}; - - std::vector test_cases_set_3{ - EinsumTestCase("cab,dc,def->cbe", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}), - EinsumTestCase("cab,dc,dfe->cad", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}), - EinsumTestCase("cab,dc,dfe->caf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}), - EinsumTestCase("cab,dc,dfe->cbd", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}), - EinsumTestCase("cab,dc,dfe->cbf", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}), - EinsumTestCase("cab,dc,edf->cae", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}), - EinsumTestCase("cab,dc,edf->cad", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}), - EinsumTestCase("cab,dc,edf->cbe", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}), - EinsumTestCase("cab,dc,edf->cbd", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}), - EinsumTestCase("cab,dc,efd->cae", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}), - EinsumTestCase("cab,dc,efd->caf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}), - EinsumTestCase("cab,dc,efd->cbe", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}), - EinsumTestCase("cab,dc,efd->cbf", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}), - EinsumTestCase("cab,dc,fde->caf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}), - EinsumTestCase("cab,dc,fde->cad", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}), - EinsumTestCase("cab,dc,fde->cbf", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}), - EinsumTestCase("cab,dc,fde->cbd", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}), - EinsumTestCase("cab,dc,fed->caf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}), - EinsumTestCase("cab,dc,fed->cae", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}), - EinsumTestCase("cab,dc,fed->cbf", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}), - EinsumTestCase("cab,dc,fed->cbe", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}), - EinsumTestCase("cba,cd,def->cbd", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}), - EinsumTestCase("cba,cd,def->cbe", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}), - EinsumTestCase("cba,cd,def->cad", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}), - EinsumTestCase("cba,cd,def->cae", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}), - EinsumTestCase("cba,cd,dfe->cbd", std::vector{2, 2, 2}, std::vector{0.f, 22.f, 0.f, 110.f, 108.f, 594.f, 156.f, 858.f}), - EinsumTestCase("cba,cd,dfe->cbf", std::vector{2, 2, 2}, std::vector{9.f, 13.f, 45.f, 65.f, 261.f, 441.f, 377.f, 637.f}), - EinsumTestCase("cba,cd,dfe->cad", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 88.f, 120.f, 660.f, 144.f, 792.f}), - EinsumTestCase("cba,cd,dfe->caf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 36.f, 52.f, 290.f, 490.f, 348.f, 588.f}), - EinsumTestCase("cba,cd,edf->cbe", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}), - EinsumTestCase("cba,cd,edf->cbd", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}), - EinsumTestCase("cba,cd,edf->cae", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}), - EinsumTestCase("cba,cd,edf->cad", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}), - EinsumTestCase("cba,cd,efd->cbe", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}), - EinsumTestCase("cba,cd,efd->cbf", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}), - EinsumTestCase("cba,cd,efd->cae", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}), - EinsumTestCase("cba,cd,efd->caf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}), - EinsumTestCase("cba,cd,fde->cbf", std::vector{2, 2, 2}, std::vector{5.f, 13.f, 25.f, 65.f, 153.f, 513.f, 221.f, 741.f}), - EinsumTestCase("cba,cd,fde->cbd", std::vector{2, 2, 2}, std::vector{0.f, 18.f, 0.f, 90.f, 180.f, 486.f, 260.f, 702.f}), - EinsumTestCase("cba,cd,fde->caf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 20.f, 52.f, 170.f, 570.f, 204.f, 684.f}), - EinsumTestCase("cba,cd,fde->cad", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 72.f, 200.f, 540.f, 240.f, 648.f}), - EinsumTestCase("cba,cd,fed->cbf", std::vector{2, 2, 2}, std::vector{4.f, 12.f, 20.f, 60.f, 144.f, 504.f, 208.f, 728.f}), - EinsumTestCase("cba,cd,fed->cbe", std::vector{2, 2, 2}, std::vector{6.f, 10.f, 30.f, 50.f, 234.f, 414.f, 338.f, 598.f}), - EinsumTestCase("cba,cd,fed->caf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 16.f, 48.f, 160.f, 560.f, 192.f, 672.f}), - EinsumTestCase("cba,cd,fed->cae", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 24.f, 40.f, 260.f, 460.f, 312.f, 552.f}), - EinsumTestCase("cba,dc,def->cbd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}), - EinsumTestCase("cba,dc,def->cbe", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}), - EinsumTestCase("cba,dc,def->cad", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}), - EinsumTestCase("cba,dc,def->cae", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}), - EinsumTestCase("cba,dc,dfe->cbd", std::vector{2, 2, 2}, std::vector{0.f, 44.f, 0.f, 220.f, 54.f, 594.f, 78.f, 858.f}), - EinsumTestCase("cba,dc,dfe->cbf", std::vector{2, 2, 2}, std::vector{18.f, 26.f, 90.f, 130.f, 252.f, 396.f, 364.f, 572.f}), - EinsumTestCase("cba,dc,dfe->cad", std::vector{2, 2, 2}, std::vector{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}), - EinsumTestCase("cba,dc,dfe->caf", std::vector{2, 2, 2}, std::vector{36.f, 52.f, 72.f, 104.f, 280.f, 440.f, 336.f, 528.f}), - EinsumTestCase("cba,dc,edf->cbe", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}), - EinsumTestCase("cba,dc,edf->cbd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}), - EinsumTestCase("cba,dc,edf->cae", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}), - EinsumTestCase("cba,dc,edf->cad", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}), - EinsumTestCase("cba,dc,efd->cbe", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}), - EinsumTestCase("cba,dc,efd->cbf", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}), - EinsumTestCase("cba,dc,efd->cae", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}), - EinsumTestCase("cba,dc,efd->caf", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}), - EinsumTestCase("cba,dc,fde->cbf", std::vector{2, 2, 2}, std::vector{10.f, 26.f, 50.f, 130.f, 144.f, 432.f, 208.f, 624.f}), - EinsumTestCase("cba,dc,fde->cbd", std::vector{2, 2, 2}, std::vector{0.f, 36.f, 0.f, 180.f, 90.f, 486.f, 130.f, 702.f}), - EinsumTestCase("cba,dc,fde->caf", std::vector{2, 2, 2}, std::vector{20.f, 52.f, 40.f, 104.f, 160.f, 480.f, 192.f, 576.f}), - EinsumTestCase("cba,dc,fde->cad", std::vector{2, 2, 2}, std::vector{0.f, 72.f, 0.f, 144.f, 100.f, 540.f, 120.f, 648.f}), - EinsumTestCase("cba,dc,fed->cbf", std::vector{2, 2, 2}, std::vector{8.f, 24.f, 40.f, 120.f, 126.f, 414.f, 182.f, 598.f}), - EinsumTestCase("cba,dc,fed->cbe", std::vector{2, 2, 2}, std::vector{12.f, 20.f, 60.f, 100.f, 198.f, 342.f, 286.f, 494.f}), - EinsumTestCase("cba,dc,fed->caf", std::vector{2, 2, 2}, std::vector{16.f, 48.f, 32.f, 96.f, 140.f, 460.f, 168.f, 552.f}), - EinsumTestCase("cba,dc,fed->cae", std::vector{2, 2, 2}, std::vector{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f})}; - - auto test_lambda = [](const std::vector& test_cases_set) { - std::vector m1{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; - std::vector m2{0.f, 1.f, 2.f, 3.f}; - std::vector m3{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; - for (const auto& tst : test_cases_set) { - OpTester test("Einsum", 12, onnxruntime::kOnnxDomain); - test.AddAttribute("equation", tst.equation); - test.AddInput("x", {2, 2, 2}, m1); - test.AddInput("y", {2, 2}, m2); - test.AddInput("z", {2, 2, 2}, m3); - test.AddOutput("o", tst.shape, tst.expected); - test.Run(); - } - }; - - test_lambda(test_cases_set_1); - test_lambda(test_cases_set_2); - test_lambda(test_cases_set_3); +class EinsumTransposeMatMulThreeInputsTest : public testing::TestWithParam> { + // You can implement all the usual fixture class members here. + // To access the test parameter, call GetParam() from class + // TestWithParam. +}; + +TEST_P(EinsumTransposeMatMulThreeInputsTest, EinsumTransposeMatMulThreeInputsTestSuite) { + gsl::span test_cases_set = GetParam(); -} // namespace test + std::vector m1{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; + std::vector m2{0.f, 1.f, 2.f, 3.f}; + std::vector m3{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; + for (const auto& tst : test_cases_set) { + OpTester test("Einsum", 12, onnxruntime::kOnnxDomain); + test.AddAttribute("equation", std::string(tst.equation)); + test.AddInput("x", {2, 2, 2}, m1); + test.AddInput("y", {2, 2}, m2); + test.AddInput("z", {2, 2, 2}, m3); + test.AddOutput("o", std::vector(tst.shape.begin(), tst.shape.end()), std::vector(tst.expected.begin(), tst.expected.end())); + test.Run(); + } +} + +INSTANTIATE_TEST_SUITE_P(EinsumTransposeMatMulThreeInputsTests, EinsumTransposeMatMulThreeInputsTest, testing::Values(case1, case2, case3)); } // namespace test } // namespace onnxruntime From 570a2af6628b6cc8365187c2605ff15cc915621f Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 29 Jan 2024 20:13:54 -0800 Subject: [PATCH 2/6] rename --- .../test/providers/cpu/math/einsum_test.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/onnxruntime/test/providers/cpu/math/einsum_test.cc b/onnxruntime/test/providers/cpu/math/einsum_test.cc index 0654dfc7cba82..f969279aceff0 100644 --- a/onnxruntime/test/providers/cpu/math/einsum_test.cc +++ b/onnxruntime/test/providers/cpu/math/einsum_test.cc @@ -769,13 +769,6 @@ TEST(Einsum, ExplicitEinsumAsTensorContraction_Half) { // for two and three inputs (most common use-case of Einsum operator) struct EinsumTestCase { - std::string equation; - std::vector shape; - std::vector expected; - EinsumTestCase(const std::string& eq, const std::vector& sh, const std::vector& exp) : equation(eq), shape(sh), expected(exp) {} -}; - -struct EinsumTestCase2 { std::string_view equation; gsl::span shape; gsl::span expected; @@ -876,7 +869,7 @@ static constexpr std::array expected30{0.f, 2.f, 0.f, 10.f, 9.f, 27.f, static constexpr std::string_view equation31 = "cba,dc->cad"; static constexpr std::array shape31{2, 2, 2}; static constexpr std::array expected31{0.f, 4.f, 0.f, 8.f, 10.f, 30.f, 12.f, 36.f}; -static constexpr std::array case0 = {{ +static constexpr std::array case0 = {{ {equation0, shape0, expected0}, {equation1, shape1, expected1}, {equation2, shape2, expected2}, @@ -1133,7 +1126,7 @@ static constexpr std::array expected104{0.f, 44.f, 30.f, 330.f, 0.f, 3 static constexpr std::string_view equation105 = "acb,dc,def->ace"; static constexpr std::array shape105{2, 2, 2}; static constexpr std::array expected105{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}; -static constexpr std::array case1 = {{ +static constexpr std::array case1 = {{ {equation32, shape32, expected32}, {equation33, shape33, expected33}, {equation34, shape34, expected34}, @@ -1645,7 +1638,7 @@ static constexpr std::array expected249{18.f, 26.f, 90.f, 130.f, 252.f static constexpr std::string_view equation250 = "cab,dc,def->cbd"; static constexpr std::array shape250{2, 2, 2}; static constexpr std::array expected250{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}; -static constexpr std::array case2 = {{ +static constexpr std::array case2 = {{ {equation106, shape106, expected106}, {equation107, shape107, expected107}, {equation108, shape108, expected108}, @@ -2000,7 +1993,7 @@ static constexpr std::array expected318{16.f, 48.f, 32.f, 96.f, 140.f, static constexpr std::string_view equation319 = "cba,dc,fed->cae"; static constexpr std::array shape319{2, 2, 2}; static constexpr std::array expected319{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}; -static constexpr std::array case3 = {{ +static constexpr std::array case3 = {{ {equation251, shape251, expected251}, {equation252, shape252, expected252}, {equation253, shape253, expected253}, @@ -2086,14 +2079,14 @@ TEST(Einsum, EinsumTransposeMatMulTwoInputsTestSuite) { } } -class EinsumTransposeMatMulThreeInputsTest : public testing::TestWithParam> { +class EinsumTransposeMatMulThreeInputsTest : public testing::TestWithParam> { // You can implement all the usual fixture class members here. // To access the test parameter, call GetParam() from class // TestWithParam. }; TEST_P(EinsumTransposeMatMulThreeInputsTest, EinsumTransposeMatMulThreeInputsTestSuite) { - gsl::span test_cases_set = GetParam(); + gsl::span test_cases_set = GetParam(); std::vector m1{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; std::vector m2{0.f, 1.f, 2.f, 3.f}; From 3edaf544fa331f43b85484be7f9b2e8feb179b18 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 30 Jan 2024 09:06:03 -0800 Subject: [PATCH 3/6] Update einsum_test.cc --- onnxruntime/test/providers/cpu/math/einsum_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime/test/providers/cpu/math/einsum_test.cc b/onnxruntime/test/providers/cpu/math/einsum_test.cc index f969279aceff0..2e7ae176f5cbc 100644 --- a/onnxruntime/test/providers/cpu/math/einsum_test.cc +++ b/onnxruntime/test/providers/cpu/math/einsum_test.cc @@ -2093,7 +2093,8 @@ TEST_P(EinsumTransposeMatMulThreeInputsTest, EinsumTransposeMatMulThreeInputsTes std::vector m3{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; for (const auto& tst : test_cases_set) { OpTester test("Einsum", 12, onnxruntime::kOnnxDomain); - test.AddAttribute("equation", std::string(tst.equation)); + std::string s(tst.equation); + test.AddAttribute("equation", s); test.AddInput("x", {2, 2, 2}, m1); test.AddInput("y", {2, 2}, m2); test.AddInput("z", {2, 2, 2}, m3); From 949924efcb938070fa88a72bb0b71ca97a8ce62e Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 30 Jan 2024 09:08:50 -0800 Subject: [PATCH 4/6] update --- cmake/onnxruntime_unittests.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 351ea1a95581b..714f35380ca02 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -825,8 +825,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") ) endif() list(REMOVE_ITEM all_tests "${TEST_SRC_DIR}/providers/cpu/reduction/reduction_ops_test.cc" - "${TEST_SRC_DIR}/providers/cpu/tensor/grid_sample_test.cc" - "${TEST_SRC_DIR}/providers/cpu/math/einsum_test.cc") + "${TEST_SRC_DIR}/providers/cpu/tensor/grid_sample_test.cc") endif() set(test_all_args) From 125391b3f8b8813e5ec35f4aa6fe7ab8b87e30f9 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 30 Jan 2024 09:42:55 -0800 Subject: [PATCH 5/6] update --- onnxruntime/test/providers/cpu/math/einsum_test.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/onnxruntime/test/providers/cpu/math/einsum_test.cc b/onnxruntime/test/providers/cpu/math/einsum_test.cc index 2e7ae176f5cbc..ee367dca5e2eb 100644 --- a/onnxruntime/test/providers/cpu/math/einsum_test.cc +++ b/onnxruntime/test/providers/cpu/math/einsum_test.cc @@ -2074,7 +2074,10 @@ TEST(Einsum, EinsumTransposeMatMulTwoInputsTestSuite) { test.AddAttribute("equation", s); test.AddInput("x", {2, 2, 2}, m1); test.AddInput("y", {2, 2}, m2); - test.AddOutput("o", std::vector(tst.shape.begin(), tst.shape.end()), std::vector(tst.expected.begin(), tst.expected.end())); + + std::vector v1(tst.shape.begin(), tst.shape.end()); + std::vector v2(tst.expected.begin(), tst.expected.end()); + test.AddOutput("o", v1, v2); test.Run(); } } @@ -2098,7 +2101,9 @@ TEST_P(EinsumTransposeMatMulThreeInputsTest, EinsumTransposeMatMulThreeInputsTes test.AddInput("x", {2, 2, 2}, m1); test.AddInput("y", {2, 2}, m2); test.AddInput("z", {2, 2, 2}, m3); - test.AddOutput("o", std::vector(tst.shape.begin(), tst.shape.end()), std::vector(tst.expected.begin(), tst.expected.end())); + std::vector v1(tst.shape.begin(), tst.shape.end()); + std::vector v2(tst.expected.begin(), tst.expected.end()); + test.AddOutput("o", v1, v2); test.Run(); } } From 52daa09bf0d142b7ad48697ed514968a3179bb89 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 30 Jan 2024 11:26:15 -0800 Subject: [PATCH 6/6] update --- .../test/providers/cpu/math/einsum_test.cc | 614 +++++++++--------- 1 file changed, 301 insertions(+), 313 deletions(-) diff --git a/onnxruntime/test/providers/cpu/math/einsum_test.cc b/onnxruntime/test/providers/cpu/math/einsum_test.cc index ee367dca5e2eb..4e968d3de6b8a 100644 --- a/onnxruntime/test/providers/cpu/math/einsum_test.cc +++ b/onnxruntime/test/providers/cpu/math/einsum_test.cc @@ -1126,82 +1126,6 @@ static constexpr std::array expected104{0.f, 44.f, 30.f, 330.f, 0.f, 3 static constexpr std::string_view equation105 = "acb,dc,def->ace"; static constexpr std::array shape105{2, 2, 2}; static constexpr std::array expected105{18.f, 26.f, 140.f, 220.f, 162.f, 234.f, 364.f, 572.f}; -static constexpr std::array case1 = {{ - {equation32, shape32, expected32}, - {equation33, shape33, expected33}, - {equation34, shape34, expected34}, - {equation35, shape35, expected35}, - {equation36, shape36, expected36}, - {equation37, shape37, expected37}, - {equation38, shape38, expected38}, - {equation39, shape39, expected39}, - {equation40, shape40, expected40}, - {equation41, shape41, expected41}, - {equation42, shape42, expected42}, - {equation43, shape43, expected43}, - {equation44, shape44, expected44}, - {equation45, shape45, expected45}, - {equation46, shape46, expected46}, - {equation47, shape47, expected47}, - {equation48, shape48, expected48}, - {equation49, shape49, expected49}, - {equation50, shape50, expected50}, - {equation51, shape51, expected51}, - {equation52, shape52, expected52}, - {equation53, shape53, expected53}, - {equation54, shape54, expected54}, - {equation55, shape55, expected55}, - {equation56, shape56, expected56}, - {equation57, shape57, expected57}, - {equation58, shape58, expected58}, - {equation59, shape59, expected59}, - {equation60, shape60, expected60}, - {equation61, shape61, expected61}, - {equation62, shape62, expected62}, - {equation63, shape63, expected63}, - {equation64, shape64, expected64}, - {equation65, shape65, expected65}, - {equation66, shape66, expected66}, - {equation67, shape67, expected67}, - {equation68, shape68, expected68}, - {equation69, shape69, expected69}, - {equation70, shape70, expected70}, - {equation71, shape71, expected71}, - {equation72, shape72, expected72}, - {equation73, shape73, expected73}, - {equation74, shape74, expected74}, - {equation75, shape75, expected75}, - {equation76, shape76, expected76}, - {equation77, shape77, expected77}, - {equation78, shape78, expected78}, - {equation79, shape79, expected79}, - {equation80, shape80, expected80}, - {equation81, shape81, expected81}, - {equation82, shape82, expected82}, - {equation83, shape83, expected83}, - {equation84, shape84, expected84}, - {equation85, shape85, expected85}, - {equation86, shape86, expected86}, - {equation87, shape87, expected87}, - {equation88, shape88, expected88}, - {equation89, shape89, expected89}, - {equation90, shape90, expected90}, - {equation91, shape91, expected91}, - {equation92, shape92, expected92}, - {equation93, shape93, expected93}, - {equation94, shape94, expected94}, - {equation95, shape95, expected95}, - {equation96, shape96, expected96}, - {equation97, shape97, expected97}, - {equation98, shape98, expected98}, - {equation99, shape99, expected99}, - {equation100, shape100, expected100}, - {equation101, shape101, expected101}, - {equation102, shape102, expected102}, - {equation103, shape103, expected103}, - {equation104, shape104, expected104}, - {equation105, shape105, expected105}, -}}; static constexpr std::string_view equation106 = "acb,dc,def->abd"; static constexpr std::array shape106{2, 2, 2}; @@ -1638,153 +1562,6 @@ static constexpr std::array expected249{18.f, 26.f, 90.f, 130.f, 252.f static constexpr std::string_view equation250 = "cab,dc,def->cbd"; static constexpr std::array shape250{2, 2, 2}; static constexpr std::array expected250{0.f, 88.f, 0.f, 176.f, 60.f, 660.f, 72.f, 792.f}; -static constexpr std::array case2 = {{ - {equation106, shape106, expected106}, - {equation107, shape107, expected107}, - {equation108, shape108, expected108}, - {equation109, shape109, expected109}, - {equation110, shape110, expected110}, - {equation111, shape111, expected111}, - {equation112, shape112, expected112}, - {equation113, shape113, expected113}, - {equation114, shape114, expected114}, - {equation115, shape115, expected115}, - {equation116, shape116, expected116}, - {equation117, shape117, expected117}, - {equation118, shape118, expected118}, - {equation119, shape119, expected119}, - {equation120, shape120, expected120}, - {equation121, shape121, expected121}, - {equation122, shape122, expected122}, - {equation123, shape123, expected123}, - {equation124, shape124, expected124}, - {equation125, shape125, expected125}, - {equation126, shape126, expected126}, - {equation127, shape127, expected127}, - {equation128, shape128, expected128}, - {equation129, shape129, expected129}, - {equation130, shape130, expected130}, - {equation131, shape131, expected131}, - {equation132, shape132, expected132}, - {equation133, shape133, expected133}, - {equation134, shape134, expected134}, - {equation135, shape135, expected135}, - {equation136, shape136, expected136}, - {equation137, shape137, expected137}, - {equation138, shape138, expected138}, - {equation139, shape139, expected139}, - {equation140, shape140, expected140}, - {equation141, shape141, expected141}, - {equation142, shape142, expected142}, - {equation143, shape143, expected143}, - {equation144, shape144, expected144}, - {equation145, shape145, expected145}, - {equation146, shape146, expected146}, - {equation147, shape147, expected147}, - {equation148, shape148, expected148}, - {equation149, shape149, expected149}, - {equation150, shape150, expected150}, - {equation151, shape151, expected151}, - {equation152, shape152, expected152}, - {equation153, shape153, expected153}, - {equation154, shape154, expected154}, - {equation155, shape155, expected155}, - {equation156, shape156, expected156}, - {equation157, shape157, expected157}, - {equation158, shape158, expected158}, - {equation159, shape159, expected159}, - {equation160, shape160, expected160}, - {equation161, shape161, expected161}, - {equation162, shape162, expected162}, - {equation163, shape163, expected163}, - {equation164, shape164, expected164}, - {equation165, shape165, expected165}, - {equation166, shape166, expected166}, - {equation167, shape167, expected167}, - {equation168, shape168, expected168}, - {equation169, shape169, expected169}, - {equation170, shape170, expected170}, - {equation171, shape171, expected171}, - {equation172, shape172, expected172}, - {equation173, shape173, expected173}, - {equation174, shape174, expected174}, - {equation175, shape175, expected175}, - {equation176, shape176, expected176}, - {equation177, shape177, expected177}, - {equation178, shape178, expected178}, - {equation179, shape179, expected179}, - {equation180, shape180, expected180}, - {equation181, shape181, expected181}, - {equation182, shape182, expected182}, - {equation183, shape183, expected183}, - {equation184, shape184, expected184}, - {equation185, shape185, expected185}, - {equation186, shape186, expected186}, - {equation187, shape187, expected187}, - {equation188, shape188, expected188}, - {equation189, shape189, expected189}, - {equation190, shape190, expected190}, - {equation191, shape191, expected191}, - {equation192, shape192, expected192}, - {equation193, shape193, expected193}, - {equation194, shape194, expected194}, - {equation195, shape195, expected195}, - {equation196, shape196, expected196}, - {equation197, shape197, expected197}, - {equation198, shape198, expected198}, - {equation199, shape199, expected199}, - {equation200, shape200, expected200}, - {equation201, shape201, expected201}, - {equation202, shape202, expected202}, - {equation203, shape203, expected203}, - {equation204, shape204, expected204}, - {equation205, shape205, expected205}, - {equation206, shape206, expected206}, - {equation207, shape207, expected207}, - {equation208, shape208, expected208}, - {equation209, shape209, expected209}, - {equation210, shape210, expected210}, - {equation211, shape211, expected211}, - {equation212, shape212, expected212}, - {equation213, shape213, expected213}, - {equation214, shape214, expected214}, - {equation215, shape215, expected215}, - {equation216, shape216, expected216}, - {equation217, shape217, expected217}, - {equation218, shape218, expected218}, - {equation219, shape219, expected219}, - {equation220, shape220, expected220}, - {equation221, shape221, expected221}, - {equation222, shape222, expected222}, - {equation223, shape223, expected223}, - {equation224, shape224, expected224}, - {equation225, shape225, expected225}, - {equation226, shape226, expected226}, - {equation227, shape227, expected227}, - {equation228, shape228, expected228}, - {equation229, shape229, expected229}, - {equation230, shape230, expected230}, - {equation231, shape231, expected231}, - {equation232, shape232, expected232}, - {equation233, shape233, expected233}, - {equation234, shape234, expected234}, - {equation235, shape235, expected235}, - {equation236, shape236, expected236}, - {equation237, shape237, expected237}, - {equation238, shape238, expected238}, - {equation239, shape239, expected239}, - {equation240, shape240, expected240}, - {equation241, shape241, expected241}, - {equation242, shape242, expected242}, - {equation243, shape243, expected243}, - {equation244, shape244, expected244}, - {equation245, shape245, expected245}, - {equation246, shape246, expected246}, - {equation247, shape247, expected247}, - {equation248, shape248, expected248}, - {equation249, shape249, expected249}, - {equation250, shape250, expected250}, -}}; static constexpr std::string_view equation251 = "cab,dc,def->cbe"; static constexpr std::array shape251{2, 2, 2}; @@ -1993,77 +1770,294 @@ static constexpr std::array expected318{16.f, 48.f, 32.f, 96.f, 140.f, static constexpr std::string_view equation319 = "cba,dc,fed->cae"; static constexpr std::array shape319{2, 2, 2}; static constexpr std::array expected319{24.f, 40.f, 48.f, 80.f, 220.f, 380.f, 264.f, 456.f}; -static constexpr std::array case3 = {{ - {equation251, shape251, expected251}, - {equation252, shape252, expected252}, - {equation253, shape253, expected253}, - {equation254, shape254, expected254}, - {equation255, shape255, expected255}, - {equation256, shape256, expected256}, - {equation257, shape257, expected257}, - {equation258, shape258, expected258}, - {equation259, shape259, expected259}, - {equation260, shape260, expected260}, - {equation261, shape261, expected261}, - {equation262, shape262, expected262}, - {equation263, shape263, expected263}, - {equation264, shape264, expected264}, - {equation265, shape265, expected265}, - {equation266, shape266, expected266}, - {equation267, shape267, expected267}, - {equation268, shape268, expected268}, - {equation269, shape269, expected269}, - {equation270, shape270, expected270}, - {equation271, shape271, expected271}, - {equation272, shape272, expected272}, - {equation273, shape273, expected273}, - {equation274, shape274, expected274}, - {equation275, shape275, expected275}, - {equation276, shape276, expected276}, - {equation277, shape277, expected277}, - {equation278, shape278, expected278}, - {equation279, shape279, expected279}, - {equation280, shape280, expected280}, - {equation281, shape281, expected281}, - {equation282, shape282, expected282}, - {equation283, shape283, expected283}, - {equation284, shape284, expected284}, - {equation285, shape285, expected285}, - {equation286, shape286, expected286}, - {equation287, shape287, expected287}, - {equation288, shape288, expected288}, - {equation289, shape289, expected289}, - {equation290, shape290, expected290}, - {equation291, shape291, expected291}, - {equation292, shape292, expected292}, - {equation293, shape293, expected293}, - {equation294, shape294, expected294}, - {equation295, shape295, expected295}, - {equation296, shape296, expected296}, - {equation297, shape297, expected297}, - {equation298, shape298, expected298}, - {equation299, shape299, expected299}, - {equation300, shape300, expected300}, - {equation301, shape301, expected301}, - {equation302, shape302, expected302}, - {equation303, shape303, expected303}, - {equation304, shape304, expected304}, - {equation305, shape305, expected305}, - {equation306, shape306, expected306}, - {equation307, shape307, expected307}, - {equation308, shape308, expected308}, - {equation309, shape309, expected309}, - {equation310, shape310, expected310}, - {equation311, shape311, expected311}, - {equation312, shape312, expected312}, - {equation313, shape313, expected313}, - {equation314, shape314, expected314}, - {equation315, shape315, expected315}, - {equation316, shape316, expected316}, - {equation317, shape317, expected317}, - {equation318, shape318, expected318}, - {equation319, shape319, expected319}, -}}; +static constexpr std::array case1 = {{{equation32, shape32, expected32}, + {equation33, shape33, expected33}, + {equation34, shape34, expected34}, + {equation35, shape35, expected35}, + {equation36, shape36, expected36}, + {equation37, shape37, expected37}, + {equation38, shape38, expected38}, + {equation39, shape39, expected39}, + {equation40, shape40, expected40}, + {equation41, shape41, expected41}, + {equation42, shape42, expected42}, + {equation43, shape43, expected43}, + {equation44, shape44, expected44}, + {equation45, shape45, expected45}, + {equation46, shape46, expected46}, + {equation47, shape47, expected47}, + {equation48, shape48, expected48}, + {equation49, shape49, expected49}, + {equation50, shape50, expected50}, + {equation51, shape51, expected51}, + {equation52, shape52, expected52}, + {equation53, shape53, expected53}, + {equation54, shape54, expected54}, + {equation55, shape55, expected55}, + {equation56, shape56, expected56}, + {equation57, shape57, expected57}, + {equation58, shape58, expected58}, + {equation59, shape59, expected59}, + {equation60, shape60, expected60}, + {equation61, shape61, expected61}, + {equation62, shape62, expected62}, + {equation63, shape63, expected63}, + {equation64, shape64, expected64}, + {equation65, shape65, expected65}, + {equation66, shape66, expected66}, + {equation67, shape67, expected67}, + {equation68, shape68, expected68}, + {equation69, shape69, expected69}, + {equation70, shape70, expected70}, + {equation71, shape71, expected71}, + {equation72, shape72, expected72}, + {equation73, shape73, expected73}, + {equation74, shape74, expected74}, + {equation75, shape75, expected75}, + {equation76, shape76, expected76}, + {equation77, shape77, expected77}, + {equation78, shape78, expected78}, + {equation79, shape79, expected79}, + {equation80, shape80, expected80}, + {equation81, shape81, expected81}, + {equation82, shape82, expected82}, + {equation83, shape83, expected83}, + {equation84, shape84, expected84}, + {equation85, shape85, expected85}, + {equation86, shape86, expected86}, + {equation87, shape87, expected87}, + {equation88, shape88, expected88}, + {equation89, shape89, expected89}, + {equation90, shape90, expected90}, + {equation91, shape91, expected91}, + {equation92, shape92, expected92}, + {equation93, shape93, expected93}, + {equation94, shape94, expected94}, + {equation95, shape95, expected95}, + {equation96, shape96, expected96}, + {equation97, shape97, expected97}, + {equation98, shape98, expected98}, + {equation99, shape99, expected99}, + {equation100, shape100, expected100}, + {equation101, shape101, expected101}, + {equation102, shape102, expected102}, + {equation103, shape103, expected103}, + {equation104, shape104, expected104}, + {equation105, shape105, expected105}, + {equation106, shape106, expected106}, + {equation107, shape107, expected107}, + {equation108, shape108, expected108}, + {equation109, shape109, expected109}, + {equation110, shape110, expected110}, + {equation111, shape111, expected111}, + {equation112, shape112, expected112}, + {equation113, shape113, expected113}, + {equation114, shape114, expected114}, + {equation115, shape115, expected115}, + {equation116, shape116, expected116}, + {equation117, shape117, expected117}, + {equation118, shape118, expected118}, + {equation119, shape119, expected119}, + {equation120, shape120, expected120}, + {equation121, shape121, expected121}, + {equation122, shape122, expected122}, + {equation123, shape123, expected123}, + {equation124, shape124, expected124}, + {equation125, shape125, expected125}, + {equation126, shape126, expected126}, + {equation127, shape127, expected127}, + {equation128, shape128, expected128}, + {equation129, shape129, expected129}, + {equation130, shape130, expected130}, + {equation131, shape131, expected131}, + {equation132, shape132, expected132}, + {equation133, shape133, expected133}, + {equation134, shape134, expected134}, + {equation135, shape135, expected135}, + {equation136, shape136, expected136}, + {equation137, shape137, expected137}, + {equation138, shape138, expected138}, + {equation139, shape139, expected139}, + {equation140, shape140, expected140}, + {equation141, shape141, expected141}, + {equation142, shape142, expected142}, + {equation143, shape143, expected143}, + {equation144, shape144, expected144}, + {equation145, shape145, expected145}, + {equation146, shape146, expected146}, + {equation147, shape147, expected147}, + {equation148, shape148, expected148}, + {equation149, shape149, expected149}, + {equation150, shape150, expected150}, + {equation151, shape151, expected151}, + {equation152, shape152, expected152}, + {equation153, shape153, expected153}, + {equation154, shape154, expected154}, + {equation155, shape155, expected155}, + {equation156, shape156, expected156}, + {equation157, shape157, expected157}, + {equation158, shape158, expected158}, + {equation159, shape159, expected159}, + {equation160, shape160, expected160}, + {equation161, shape161, expected161}, + {equation162, shape162, expected162}, + {equation163, shape163, expected163}, + {equation164, shape164, expected164}, + {equation165, shape165, expected165}, + {equation166, shape166, expected166}, + {equation167, shape167, expected167}, + {equation168, shape168, expected168}, + {equation169, shape169, expected169}, + {equation170, shape170, expected170}, + {equation171, shape171, expected171}, + {equation172, shape172, expected172}, + {equation173, shape173, expected173}, + {equation174, shape174, expected174}, + {equation175, shape175, expected175}, + {equation176, shape176, expected176}, + {equation177, shape177, expected177}, + {equation178, shape178, expected178}, + {equation179, shape179, expected179}, + {equation180, shape180, expected180}, + {equation181, shape181, expected181}, + {equation182, shape182, expected182}, + {equation183, shape183, expected183}, + {equation184, shape184, expected184}, + {equation185, shape185, expected185}, + {equation186, shape186, expected186}, + {equation187, shape187, expected187}, + {equation188, shape188, expected188}, + {equation189, shape189, expected189}, + {equation190, shape190, expected190}, + {equation191, shape191, expected191}, + {equation192, shape192, expected192}, + {equation193, shape193, expected193}, + {equation194, shape194, expected194}, + {equation195, shape195, expected195}, + {equation196, shape196, expected196}, + {equation197, shape197, expected197}, + {equation198, shape198, expected198}, + {equation199, shape199, expected199}, + {equation200, shape200, expected200}, + {equation201, shape201, expected201}, + {equation202, shape202, expected202}, + {equation203, shape203, expected203}, + {equation204, shape204, expected204}, + {equation205, shape205, expected205}, + {equation206, shape206, expected206}, + {equation207, shape207, expected207}, + {equation208, shape208, expected208}, + {equation209, shape209, expected209}, + {equation210, shape210, expected210}, + {equation211, shape211, expected211}, + {equation212, shape212, expected212}, + {equation213, shape213, expected213}, + {equation214, shape214, expected214}, + {equation215, shape215, expected215}, + {equation216, shape216, expected216}, + {equation217, shape217, expected217}, + {equation218, shape218, expected218}, + {equation219, shape219, expected219}, + {equation220, shape220, expected220}, + {equation221, shape221, expected221}, + {equation222, shape222, expected222}, + {equation223, shape223, expected223}, + {equation224, shape224, expected224}, + {equation225, shape225, expected225}, + {equation226, shape226, expected226}, + {equation227, shape227, expected227}, + {equation228, shape228, expected228}, + {equation229, shape229, expected229}, + {equation230, shape230, expected230}, + {equation231, shape231, expected231}, + {equation232, shape232, expected232}, + {equation233, shape233, expected233}, + {equation234, shape234, expected234}, + {equation235, shape235, expected235}, + {equation236, shape236, expected236}, + {equation237, shape237, expected237}, + {equation238, shape238, expected238}, + {equation239, shape239, expected239}, + {equation240, shape240, expected240}, + {equation241, shape241, expected241}, + {equation242, shape242, expected242}, + {equation243, shape243, expected243}, + {equation244, shape244, expected244}, + {equation245, shape245, expected245}, + {equation246, shape246, expected246}, + {equation247, shape247, expected247}, + {equation248, shape248, expected248}, + {equation249, shape249, expected249}, + {equation250, shape250, expected250}, + {equation251, shape251, expected251}, + {equation252, shape252, expected252}, + {equation253, shape253, expected253}, + {equation254, shape254, expected254}, + {equation255, shape255, expected255}, + {equation256, shape256, expected256}, + {equation257, shape257, expected257}, + {equation258, shape258, expected258}, + {equation259, shape259, expected259}, + {equation260, shape260, expected260}, + {equation261, shape261, expected261}, + {equation262, shape262, expected262}, + {equation263, shape263, expected263}, + {equation264, shape264, expected264}, + {equation265, shape265, expected265}, + {equation266, shape266, expected266}, + {equation267, shape267, expected267}, + {equation268, shape268, expected268}, + {equation269, shape269, expected269}, + {equation270, shape270, expected270}, + {equation271, shape271, expected271}, + {equation272, shape272, expected272}, + {equation273, shape273, expected273}, + {equation274, shape274, expected274}, + {equation275, shape275, expected275}, + {equation276, shape276, expected276}, + {equation277, shape277, expected277}, + {equation278, shape278, expected278}, + {equation279, shape279, expected279}, + {equation280, shape280, expected280}, + {equation281, shape281, expected281}, + {equation282, shape282, expected282}, + {equation283, shape283, expected283}, + {equation284, shape284, expected284}, + {equation285, shape285, expected285}, + {equation286, shape286, expected286}, + {equation287, shape287, expected287}, + {equation288, shape288, expected288}, + {equation289, shape289, expected289}, + {equation290, shape290, expected290}, + {equation291, shape291, expected291}, + {equation292, shape292, expected292}, + {equation293, shape293, expected293}, + {equation294, shape294, expected294}, + {equation295, shape295, expected295}, + {equation296, shape296, expected296}, + {equation297, shape297, expected297}, + {equation298, shape298, expected298}, + {equation299, shape299, expected299}, + {equation300, shape300, expected300}, + {equation301, shape301, expected301}, + {equation302, shape302, expected302}, + {equation303, shape303, expected303}, + {equation304, shape304, expected304}, + {equation305, shape305, expected305}, + {equation306, shape306, expected306}, + {equation307, shape307, expected307}, + {equation308, shape308, expected308}, + {equation309, shape309, expected309}, + {equation310, shape310, expected310}, + {equation311, shape311, expected311}, + {equation312, shape312, expected312}, + {equation313, shape313, expected313}, + {equation314, shape314, expected314}, + {equation315, shape315, expected315}, + {equation316, shape316, expected316}, + {equation317, shape317, expected317}, + {equation318, shape318, expected318}, + {equation319, shape319, expected319}}}; TEST(Einsum, EinsumTransposeMatMulTwoInputsTestSuite) { std::vector m1{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; @@ -2082,33 +2076,27 @@ TEST(Einsum, EinsumTransposeMatMulTwoInputsTestSuite) { } } -class EinsumTransposeMatMulThreeInputsTest : public testing::TestWithParam> { - // You can implement all the usual fixture class members here. - // To access the test parameter, call GetParam() from class - // TestWithParam. +class EinsumTransposeMatMulThreeInputsTest : public testing::TestWithParam { }; TEST_P(EinsumTransposeMatMulThreeInputsTest, EinsumTransposeMatMulThreeInputsTestSuite) { - gsl::span test_cases_set = GetParam(); - + const auto& tst = GetParam(); std::vector m1{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; std::vector m2{0.f, 1.f, 2.f, 3.f}; std::vector m3{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f}; - for (const auto& tst : test_cases_set) { - OpTester test("Einsum", 12, onnxruntime::kOnnxDomain); - std::string s(tst.equation); - test.AddAttribute("equation", s); - test.AddInput("x", {2, 2, 2}, m1); - test.AddInput("y", {2, 2}, m2); - test.AddInput("z", {2, 2, 2}, m3); - std::vector v1(tst.shape.begin(), tst.shape.end()); - std::vector v2(tst.expected.begin(), tst.expected.end()); - test.AddOutput("o", v1, v2); - test.Run(); - } + OpTester test("Einsum", 12, onnxruntime::kOnnxDomain); + std::string s(tst.equation); + test.AddAttribute("equation", s); + test.AddInput("x", {2, 2, 2}, m1); + test.AddInput("y", {2, 2}, m2); + test.AddInput("z", {2, 2, 2}, m3); + std::vector v1(tst.shape.begin(), tst.shape.end()); + std::vector v2(tst.expected.begin(), tst.expected.end()); + test.AddOutput("o", v1, v2); + test.Run(); } -INSTANTIATE_TEST_SUITE_P(EinsumTransposeMatMulThreeInputsTests, EinsumTransposeMatMulThreeInputsTest, testing::Values(case1, case2, case3)); +INSTANTIATE_TEST_SUITE_P(EinsumTransposeMatMulThreeInputsTests, EinsumTransposeMatMulThreeInputsTest, testing::ValuesIn(case1)); } // namespace test } // namespace onnxruntime