summaryrefslogtreecommitdiffstats
path: root/eval/src/tests/instruction/generic_concat
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-10-08 11:35:11 +0000
committerArne Juul <arnej@verizonmedia.com>2020-10-08 11:35:11 +0000
commit414b8980ccce279eec6704e0bbba3eb3472f93ed (patch)
tree29bbd694a8ca6a6f88afd9af26682c12e79daa09 /eval/src/tests/instruction/generic_concat
parent324eacf779a5d75815ba7bae51a7ce636f98099c (diff)
add layouts to trigger now-fixed bug
Diffstat (limited to 'eval/src/tests/instruction/generic_concat')
-rw-r--r--eval/src/tests/instruction/generic_concat/generic_concat_test.cpp62
1 files changed, 35 insertions, 27 deletions
diff --git a/eval/src/tests/instruction/generic_concat/generic_concat_test.cpp b/eval/src/tests/instruction/generic_concat/generic_concat_test.cpp
index d845cc55e2f..97ed091ae2b 100644
--- a/eval/src/tests/instruction/generic_concat/generic_concat_test.cpp
+++ b/eval/src/tests/instruction/generic_concat/generic_concat_test.cpp
@@ -20,29 +20,37 @@ using vespalib::make_string_short::fmt;
std::vector<Layout> concat_layouts = {
{}, {},
- {}, {x(5)},
- {x(5)}, {},
- {x(2)}, {x(3)},
- {x(2)}, {y(3)},
- {y(2)}, {z(3)},
- {x(5)}, {x(2),y(5)},
- {y(3)}, {x(2),z(3)},
- {x(2)}, {x(3),y(5),z(2)},
- {x(2),y(5),z(2)}, {x(3),y(5),z(2)},
- {x(3),y(5)}, {y(5),z(7)},
- float_cells({x(3),y(5)}), {y(5),z(7)},
- {x(3),y(5)}, float_cells({y(5),z(7)}),
- float_cells({x(3),y(5)}), float_cells({y(5),z(7)}),
- {y({"a","b","c"})}, {y({"a","b","c"})},
- {y({"a","b","c"})}, {y({"a","b"})},
- {y({"a","b","c"})}, {y({"b","c","d"})},
- float_cells({y({"a","b","c"})}), {y({"b","c","d"})},
- {y({"a","b","c"})}, float_cells({y({"b","c","d"})}),
- float_cells({y({"a","b","c"})}), float_cells({z({"foo","bar","baz"})}),
- {y({"a","b","c"})}, {y({"a","b","c"}),z({"foo","bar","baz"})},
- {y({"a","b"}),z({"foo","bar","baz"})}, {y({"a","b","c"}),z({"foo","bar"})},
- {x(2),y({"a","b","c"})}, {x(3),y({"b","c","d"})},
- {x(2),y({"a","b"})}, {x(3),z({"c","d"})}
+ {}, {y(5)},
+ {y(5)}, {},
+ {y(2)}, {y(3)},
+ {y(2)}, {x(3)},
+ {x(2)}, {z(3)},
+ {x(2),y(3)}, {x(2),y(3)},
+ {x(2),y(3)}, {x(2),y(4)},
+ {y(3),z(5)}, {y(3),z(5)},
+ {y(3),z(5)}, {y(4),z(5)},
+ {x(2),y(3),z(5)}, {x(2),y(3),z(5)},
+ {x(2),y(3),z(5)}, {x(2),y(4),z(5)},
+ {x(2),y(3),z({"a","b"})}, {x(2),y(3),z({"b","c"})},
+ {x(2),y(3),z({"a","b"})}, {x(2),y(4),z({"b","c"})},
+ {y(5)}, {y(2),x(5)},
+ {x(3)}, {y(2),z(3)},
+ {y(2)}, {y(3),x(5),z(2)},
+ {y(2),x(5),z(2)}, {y(3),x(5),z(2)},
+ {y(3),x(5)}, {x(5),z(7)},
+ float_cells({y(3),x(5)}), {x(5),z(7)},
+ {y(3),x(5)}, float_cells({x(5),z(7)}),
+ float_cells({y(3),x(5)}), float_cells({x(5),z(7)}),
+ {x({"a","b","c"})}, {x({"a","b","c"})},
+ {x({"a","b","c"})}, {x({"a","b"})},
+ {x({"a","b","c"})}, {x({"b","c","d"})},
+ float_cells({x({"a","b","c"})}), {x({"b","c","d"})},
+ {x({"a","b","c"})}, float_cells({x({"b","c","d"})}),
+ float_cells({x({"a","b","c"})}), float_cells({z({"foo","bar","baz"})}),
+ {x({"a","b","c"})}, {x({"a","b","c"}),z({"foo","bar","baz"})},
+ {x({"a","b"}),z({"foo","bar","baz"})}, {x({"a","b","c"}),z({"foo","bar"})},
+ {y(2),x({"a","b","c"})}, {y(3),x({"b","c","d"})},
+ {y(2),x({"a","b"})}, {y(3),z({"c","d"})}
};
TensorSpec perform_simpletensor_concat(const TensorSpec &a, const TensorSpec &b, const std::string &dimension) {
@@ -125,8 +133,8 @@ TEST(GenericConcatTest, generic_reference_concat_works) {
const TensorSpec lhs = spec(concat_layouts[i], N());
const TensorSpec rhs = spec(concat_layouts[i + 1], Div16(N()));
SCOPED_TRACE(fmt("\n===\nin LHS: %s\nin RHS: %s\n===\n", lhs.to_string().c_str(), rhs.to_string().c_str()));
- auto actual = reference_concat(lhs, rhs, "x");
- auto expect = perform_simpletensor_concat(lhs, rhs, "x");
+ auto actual = reference_concat(lhs, rhs, "y");
+ auto expect = perform_simpletensor_concat(lhs, rhs, "y");
EXPECT_EQ(actual, expect);
}
}
@@ -137,8 +145,8 @@ TEST(GenericConcatTest, generic_concat_works_for_simple_values) {
const TensorSpec lhs = spec(concat_layouts[i], N());
const TensorSpec rhs = spec(concat_layouts[i + 1], Div16(N()));
SCOPED_TRACE(fmt("\n===\nin LHS: %s\nin RHS: %s\n===\n", lhs.to_string().c_str(), rhs.to_string().c_str()));
- auto actual = perform_generic_concat(lhs, rhs, "x");
- auto expect = reference_concat(lhs, rhs, "x");
+ auto actual = perform_generic_concat(lhs, rhs, "y");
+ auto expect = reference_concat(lhs, rhs, "y");
EXPECT_EQ(actual, expect);
}
}