summaryrefslogtreecommitdiffstats
path: root/eval/src/tests
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2019-07-11 10:58:52 +0000
committerHåvard Pettersen <havardpe@oath.com>2019-07-11 10:58:52 +0000
commite8e0d99e3146881f4e5c328aacf7a24fb9140101 (patch)
treeba88d3a54bdaec76e5dd7890f59b76cac8d31625 /eval/src/tests
parent5a0acd6e0a6aa36e26a5142308a0c85fc20a6b0a (diff)
enable hw dot product for float cells
Diffstat (limited to 'eval/src/tests')
-rw-r--r--eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp12
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)"));
}
//-----------------------------------------------------------------------------