aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/tests/tensor
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-11-09 19:15:45 +0000
committerArne Juul <arnej@verizonmedia.com>2020-11-10 14:24:11 +0000
commit15a778a86d9712f9bb56729a012af42838d7d245 (patch)
treed7d02d507cc7de16aad5644deaab992b288dab6d /eval/src/tests/tensor
parent615ae184cdf79ac893b1179aa2f9a8a56eede205 (diff)
benchmark some forms of join with number
Diffstat (limited to 'eval/src/tests/tensor')
-rw-r--r--eval/src/tests/tensor/instruction_benchmark/instruction_benchmark.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/eval/src/tests/tensor/instruction_benchmark/instruction_benchmark.cpp b/eval/src/tests/tensor/instruction_benchmark/instruction_benchmark.cpp
index bcd021b05fb..9ea27ff2f10 100644
--- a/eval/src/tests/tensor/instruction_benchmark/instruction_benchmark.cpp
+++ b/eval/src/tests/tensor/instruction_benchmark/instruction_benchmark.cpp
@@ -705,6 +705,12 @@ TEST(DenseJoin, no_overlap) {
benchmark_join("dense no overlap multiply", lhs, rhs, operation::Mul::f);
}
+TEST(DenseJoin, multiply_by_number) {
+ auto lhs = make_spec(3.0);
+ auto rhs = make_cube(D::idx("a", 16), D::idx("b", 16), D::idx("c", 16), 2.0);
+ benchmark_join("dense cube multiply by number", lhs, rhs, operation::Mul::f);
+}
+
//-----------------------------------------------------------------------------
TEST(SparseJoin, small_vectors) {
@@ -743,6 +749,12 @@ TEST(SparseJoin, no_overlap) {
benchmark_join("sparse no overlap multiply", lhs, rhs, operation::Mul::f);
}
+TEST(SparseJoin, multiply_by_number) {
+ auto lhs = make_spec(3.0);
+ auto rhs = make_cube(D::map("a", 16, 2), D::map("b", 16, 2), D::map("c", 16, 2), 2.0);
+ benchmark_join("sparse multiply by number", lhs, rhs, operation::Mul::f);
+}
+
//-----------------------------------------------------------------------------
TEST(MixedJoin, full_overlap) {
@@ -763,6 +775,12 @@ TEST(MixedJoin, no_overlap) {
benchmark_join("mixed no overlap multiply", lhs, rhs, operation::Mul::f);
}
+TEST(MixedJoin, multiply_by_number) {
+ auto lhs = make_spec(3.0);
+ auto rhs = make_cube(D::map("a", 16, 2), D::map("b", 16, 2), D::idx("c", 16), 2.0);
+ benchmark_join("mixed multiply by number", lhs, rhs, operation::Mul::f);
+}
+
//-----------------------------------------------------------------------------
TEST(ReduceBench, number_reduce) {