aboutsummaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-03-17 14:03:44 +0000
committerArne Juul <arnej@verizonmedia.com>2021-03-23 16:57:41 +0000
commite60e7dd7ca8df92da82ae92e4e17b31da36b221a (patch)
treee1b62391ccf1100a499e574bb1761eaf8bc52e72 /eval
parenta851a849bab624a7a1fdc221332b5bb4c69aadd0 (diff)
handle new cell types in optimizer tests
Diffstat (limited to 'eval')
-rw-r--r--eval/src/tests/instruction/dense_multi_matmul_function/dense_multi_matmul_function_test.cpp9
-rw-r--r--eval/src/tests/instruction/inplace_map_function/inplace_map_function_test.cpp6
-rw-r--r--eval/src/tests/instruction/pow_as_map_optimizer/pow_as_map_optimizer_test.cpp10
3 files changed, 15 insertions, 10 deletions
diff --git a/eval/src/tests/instruction/dense_multi_matmul_function/dense_multi_matmul_function_test.cpp b/eval/src/tests/instruction/dense_multi_matmul_function/dense_multi_matmul_function_test.cpp
index 9fa25466f4a..7816556517c 100644
--- a/eval/src/tests/instruction/dense_multi_matmul_function/dense_multi_matmul_function_test.cpp
+++ b/eval/src/tests/instruction/dense_multi_matmul_function/dense_multi_matmul_function_test.cpp
@@ -39,10 +39,11 @@ struct FunInfo {
void verify_optimized(const vespalib::string &expr, const FunInfo &details)
{
TEST_STATE(expr.c_str());
- auto same_types = CellTypeSpace(CellTypeUtils::list_types(), 2).same();
- EvalFixture::verify<FunInfo>(expr, {details}, same_types);
- auto diff_types = CellTypeSpace(CellTypeUtils::list_types(), 2).different();
- EvalFixture::verify<FunInfo>(expr, {}, diff_types);
+ auto stable_types = CellTypeSpace({CellType::FLOAT, CellType::DOUBLE}, 2);
+ auto unstable_types = CellTypeSpace({CellType::BFLOAT16, CellType::INT8}, 2);
+ EvalFixture::verify<FunInfo>(expr, {details}, CellTypeSpace(stable_types).same());
+ EvalFixture::verify<FunInfo>(expr, {}, CellTypeSpace(stable_types).different());
+ EvalFixture::verify<FunInfo>(expr, {}, unstable_types);
}
void verify_not_optimized(const vespalib::string &expr) {
diff --git a/eval/src/tests/instruction/inplace_map_function/inplace_map_function_test.cpp b/eval/src/tests/instruction/inplace_map_function/inplace_map_function_test.cpp
index 0983f84a4af..414613a062d 100644
--- a/eval/src/tests/instruction/inplace_map_function/inplace_map_function_test.cpp
+++ b/eval/src/tests/instruction/inplace_map_function/inplace_map_function_test.cpp
@@ -27,8 +27,10 @@ struct FunInfo {
void verify_optimized(const vespalib::string &expr) {
SCOPED_TRACE(expr.c_str());
- CellTypeSpace all_types(CellTypeUtils::list_types(), 1);
- EvalFixture::verify<FunInfo>(expr, {FunInfo{false}}, all_types);
+ auto stable_types = CellTypeSpace({CellType::FLOAT, CellType::DOUBLE}, 1);
+ auto unstable_types = CellTypeSpace({CellType::BFLOAT16, CellType::INT8}, 1);
+ EvalFixture::verify<FunInfo>(expr, {FunInfo{false}}, stable_types);
+ EvalFixture::verify<FunInfo>(expr, {}, unstable_types);
}
void verify_not_optimized(const vespalib::string &expr) {
diff --git a/eval/src/tests/instruction/pow_as_map_optimizer/pow_as_map_optimizer_test.cpp b/eval/src/tests/instruction/pow_as_map_optimizer/pow_as_map_optimizer_test.cpp
index e5a8cd9e92c..f81ba10a8f3 100644
--- a/eval/src/tests/instruction/pow_as_map_optimizer/pow_as_map_optimizer_test.cpp
+++ b/eval/src/tests/instruction/pow_as_map_optimizer/pow_as_map_optimizer_test.cpp
@@ -31,15 +31,17 @@ struct InplaceInfo {
void verify_optimized(const vespalib::string &expr, op1_t op1, bool inplace = false) {
SCOPED_TRACE(expr.c_str());
+ auto stable_types = CellTypeSpace({CellType::FLOAT, CellType::DOUBLE}, 1);
if (inplace) {
InplaceInfo details{op1};
- auto all_types = CellTypeSpace(CellTypeUtils::list_types(), 1);
- EvalFixture::verify<InplaceInfo>(expr, {details}, all_types);
+ EvalFixture::verify<InplaceInfo>(expr, {details}, stable_types);
} else {
MapInfo details{op1};
- auto all_types = CellTypeSpace(CellTypeUtils::list_types(), 1);
- EvalFixture::verify<MapInfo>(expr, {details}, all_types);
+ EvalFixture::verify<MapInfo>(expr, {details}, stable_types);
}
+ MapInfo details{op1};
+ auto unstable_types = CellTypeSpace({CellType::BFLOAT16, CellType::INT8}, 1);
+ EvalFixture::verify<MapInfo>(expr, {details}, unstable_types);
}
void verify_not_optimized(const vespalib::string &expr) {