summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-02-03 13:18:27 +0000
committerArne Juul <arnej@verizonmedia.com>2021-02-03 13:18:27 +0000
commitd71935fcbaf1b0d69660d87002947c17fcf4e9a8 (patch)
treedaa3145ceacfb75665f9f4e06f78d89f771a67c4 /eval
parent0ef2f5d6cf93073e7c6ed9a2e26c41b6c2cbee89 (diff)
use GenSpec in dense_matmul_function_test
Diffstat (limited to 'eval')
-rw-r--r--eval/src/tests/instruction/dense_matmul_function/dense_matmul_function_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/eval/src/tests/instruction/dense_matmul_function/dense_matmul_function_test.cpp b/eval/src/tests/instruction/dense_matmul_function/dense_matmul_function_test.cpp
index 0bafa450ca2..bcc5e6c7b5d 100644
--- a/eval/src/tests/instruction/dense_matmul_function/dense_matmul_function_test.cpp
+++ b/eval/src/tests/instruction/dense_matmul_function/dense_matmul_function_test.cpp
@@ -4,7 +4,7 @@
#include <vespa/eval/eval/operation.h>
#include <vespa/eval/eval/tensor_function.h>
#include <vespa/eval/eval/test/eval_fixture.h>
-#include <vespa/eval/eval/test/tensor_model.hpp>
+#include <vespa/eval/eval/test/gen_spec.h>
#include <vespa/eval/instruction/dense_matmul_function.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/stash.h>
@@ -19,12 +19,12 @@ const ValueBuilderFactory &prod_factory = FastValueBuilderFactory::get();
EvalFixture::ParamRepo make_params() {
return EvalFixture::ParamRepo()
- .add_matrix("a", 2, "d", 3) // inner/inner
- .add_matrix("a", 2, "b", 5) // inner/outer
- .add_matrix("b", 5, "c", 2) // outer/outer
- .add_matrix("a", 2, "c", 3) // not matching
+ .add_variants("a2d3", GenSpec().idx("a", 2).idx("d", 3)) // inner/inner
+ .add_variants("a2b5", GenSpec().idx("a", 2).idx("b", 5)) // inner/outer
+ .add_variants("b5c2", GenSpec().idx("b", 5).idx("c", 2)) // outer/outer
+ .add_variants("a2c3", GenSpec().idx("a", 2).idx("c", 3)) // not matching
//------------------------------------------
- .add_matrix("b", 5, "d", 3); // fixed param
+ .add_variants("b5d3", GenSpec().idx("b", 5).idx("d", 3)); // fixed param
}
EvalFixture::ParamRepo param_repo = make_params();
@@ -87,7 +87,7 @@ TEST("require that xw product can be debug dumped") {
vespalib::string make_expr(const vespalib::string &a, const vespalib::string &b, const vespalib::string &common,
bool float_a, bool float_b)
{
- return make_string("reduce(%s%s*%s%s,sum,%s)", a.c_str(), float_a ? "f" : "", b.c_str(), float_b ? "f" : "", common.c_str());
+ return make_string("reduce(%s%s*%s%s,sum,%s)", a.c_str(), float_a ? "_f" : "", b.c_str(), float_b ? "_f" : "", common.c_str());
}
void verify_optimized_multi(const vespalib::string &a, const vespalib::string &b, const vespalib::string &common,