From 3143d3f697e3da9d20b047046d017d92527b34d0 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni <kaushikcfd@gmail.com> Date: Fri, 3 Sep 2021 21:14:55 -0500 Subject: [PATCH] add broadcasting tests in einsums --- test/test_codegen.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_codegen.py b/test/test_codegen.py index 90cb68b..bf7c31c 100755 --- a/test/test_codegen.py +++ b/test/test_codegen.py @@ -827,9 +827,16 @@ def test_reductions(ctx_factory, axis, redn, shape): (" ij -> ", # np.sum [(10, 4)]), - ("dij,ej,ej,dej->ei", + ("dij,ej,ej,dej->ei", # diff: curvimesh [(2, 10, 10), (100, 10), (100, 10), (2, 100, 10)]), + + ("dij,ej,ej,dej->ei", # diff: simplex + [(2, 10, 10), (100, 1), + (100, 1), (2, 100, 10)]), + + ("ij,ij->ij", # broadcasting + [(1, 3), (3, 1)]), ])) def test_einsum(ctx_factory, spec, argshapes): ctx = ctx_factory() -- GitLab