diff options
Diffstat (limited to 'eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp')
-rw-r--r-- | eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp b/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp index 356625417d8..9bf97f449b3 100644 --- a/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp +++ b/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp @@ -103,6 +103,7 @@ EvalFixture::ParamRepo make_params() { .add("v05_x5", spec({x(5)}, MyVecSeq(6.0))) .add("v06_x5", spec({x(5)}, MyVecSeq(7.0))) .add("v07_x5f", spec(float_cells({x(5)}), MyVecSeq(7.0))) + .add("v08_x5f", spec(float_cells({x(5)}), MyVecSeq(6.0))) .add("m01_x3y3", spec({x(3),y(3)}, MyVecSeq(1.0))) .add("m02_x3y3", spec({x(3),y(3)}, MyVecSeq(2.0))); } @@ -183,8 +184,9 @@ void verify_not_compatible(const vespalib::string &a, const vespalib::string &b) TEST("require that type compatibility test is appropriate") { TEST_DO(verify_compatible("tensor(x[5])", "tensor(x[5])")); - TEST_DO(verify_not_compatible("tensor(x[5])", "tensor<float>(x[5])")); - TEST_DO(verify_not_compatible("tensor<float>(x[5])", "tensor<float>(x[5])")); + TEST_DO(verify_compatible("tensor(x[5])", "tensor<float>(x[5])")); + TEST_DO(verify_compatible("tensor<float>(x[5])", "tensor(x[5])")); + TEST_DO(verify_compatible("tensor<float>(x[5])", "tensor<float>(x[5])")); TEST_DO(verify_not_compatible("tensor(x[5])", "tensor(x[6])")); TEST_DO(verify_not_compatible("tensor(x[5])", "tensor(y[5])")); TEST_DO(verify_compatible("tensor(x[3],y[7],z[9])", "tensor(x[3],y[7],z[9])")); @@ -192,8 +194,10 @@ TEST("require that type compatibility test is appropriate") { TEST_DO(verify_not_compatible("tensor(x[9],y[7],z[5])", "tensor(x[5],y[7],z[9])")); } -TEST("require that optimization is disabled for tensors with non-double cells") { - TEST_DO(assertNotOptimized("reduce(v05_x5*v07_x5f,sum)")); +TEST("require that optimization also works for tensors with non-double cells") { + TEST_DO(assertOptimized("reduce(v05_x5*v07_x5f,sum)")); + TEST_DO(assertOptimized("reduce(v07_x5f*v05_x5,sum)")); + TEST_DO(assertOptimized("reduce(v07_x5f*v08_x5f,sum)")); } //----------------------------------------------------------------------------- |