File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ cc_library(
2525 textual_hdrs = [
2626 "ops/ops-inl.h" ,
2727 "ops/matmul-inl.h" ,
28+ "ops/matvec-inl.h" ,
2829 ],
2930 deps = [
3031 "//compression:compress" ,
@@ -56,6 +57,25 @@ cc_test(
5657 ],
5758)
5859
60+ cc_test (
61+ name = "matvec_test" ,
62+ size = "small" ,
63+ timeout = "long" ,
64+ srcs = ["ops/matvec_test.cc" ],
65+ local_defines = ["HWY_IS_TEST" ],
66+ # for test_suite.
67+ tags = ["hwy_ops_test" ],
68+ deps = [
69+ ":ops" ,
70+ "@googletest//:gtest_main" , # buildcleaner: keep
71+ "//compression:compress" ,
72+ "@hwy//:hwy" ,
73+ "@hwy//:hwy_test_util" ,
74+ "@hwy//:nanobenchmark" ,
75+ "@hwy//:thread_pool" ,
76+ ],
77+ )
78+
5979cc_test (
6080 name = "matmul_test" ,
6181 size = "small" ,
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ set(SOURCES
9898 gemma/weights.cc
9999 gemma/weights.h
100100 ops/matmul-inl.h
101+ ops/matvec-inl.h
101102 ops/ops-inl.h
102103 util/app.h
103104 util/args.h
@@ -148,7 +149,9 @@ set(GEMMA_TEST_FILES
148149 backprop/backward_test.cc
149150 backprop/backward_scalar_test.cc
150151 backprop/optimize_test.cc
151- gemma/ops_test.cc
152+ ops/ops_test.cc
153+ ops/matmul_test.cc
154+ ops/matvec_test.cc
152155 evals/gemma_test.cc
153156)
154157
Original file line number Diff line number Diff line change 3939#define THIRD_PARTY_GEMMA_CPP_FORWARD_TOGGLE
4040#endif
4141
42- #include " ops/matmul -inl.h"
42+ #include " ops/matvec -inl.h"
4343#include " ops/ops-inl.h"
4444#include " hwy/highway.h"
4545
Original file line number Diff line number Diff line change 4040#include " gemma/weights.h"
4141// Placeholder for internal test4, do not remove
4242#include " ops/matmul-inl.h"
43+ #include " ops/matvec-inl.h"
4344#include " ops/ops-inl.h"
4445#include " hwy/aligned_allocator.h"
4546#include " hwy/base.h"
4647#include " hwy/bit_set.h"
47- #include " hwy/contrib/matvec/matvec-inl.h"
4848#include " hwy/contrib/thread_pool/thread_pool.h"
4949#include " hwy/contrib/thread_pool/topology.h"
5050#include " hwy/highway.h"
You can’t perform that action at this time.
0 commit comments