@@ -29,15 +29,13 @@ cc_library(
2929 ],
3030)
3131
32+ # Split from :threading to break a circular dependency with :allocator.
3233cc_library (
33- name = "threading " ,
34- srcs = ["util/threading .cc" ],
35- hdrs = ["util/threading .h" ],
34+ name = "topology " ,
35+ srcs = ["util/topology .cc" ],
36+ hdrs = ["util/topology .h" ],
3637 deps = [
37- ":basics" ,
38- # Placeholder for container detection, do not remove
3938 "@highway//:hwy" ,
40- "@highway//:thread_pool" ,
4139 "@highway//:topology" ,
4240 ],
4341)
@@ -48,32 +46,54 @@ cc_library(
4846 hdrs = ["util/allocator.h" ],
4947 deps = [
5048 ":basics" ,
51- ":threading " ,
49+ ":topology " ,
5250 "@highway//:hwy" ,
5351 "@highway//:thread_pool" ,
52+ "@highway//:topology" ,
5453 ],
5554)
5655
5756cc_library (
58- name = "test_util" ,
59- hdrs = ["util/test_util.h" ],
57+ name = "threading" ,
58+ srcs = ["util/threading.cc" ],
59+ hdrs = ["util/threading.h" ],
6060 deps = [
61+ ":allocator" ,
62+ ":basics" ,
63+ ":topology" ,
64+ # Placeholder for container detection, do not remove
6165 "@highway//:hwy" ,
62- "@highway//:hwy_test_util " ,
63- "@highway//:stats " ,
66+ "@highway//:thread_pool " ,
67+ "@highway//:topology " ,
6468 ],
6569)
6670
6771cc_test (
6872 name = "threading_test" ,
6973 srcs = ["util/threading_test.cc" ],
7074 deps = [
75+ ":allocator" ,
76+ ":basics" ,
7177 ":threading" ,
7278 "@googletest//:gtest_main" ,
79+ "@highway//:auto_tune" ,
7380 "@highway//:hwy" ,
7481 "@highway//:hwy_test_util" ,
7582 "@highway//:nanobenchmark" ,
83+ "@highway//:robust_statistics" ,
84+ "@highway//:stats" ,
7685 "@highway//:thread_pool" ,
86+ "@highway//:timer" ,
87+ ],
88+ )
89+
90+ cc_library (
91+ name = "test_util" ,
92+ hdrs = ["util/test_util.h" ],
93+ deps = [
94+ "@highway//:hwy" ,
95+ "@highway//:hwy_test_util" ,
96+ "@highway//:stats" ,
7797 ],
7898)
7999
@@ -104,6 +124,7 @@ cc_library(
104124 ":allocator" ,
105125 ":basics" ,
106126 ":threading" ,
127+ ":topology" ,
107128 "//compression:compress" ,
108129 "@highway//:algo" ,
109130 "@highway//:bit_set" ,
@@ -113,7 +134,6 @@ cc_library(
113134 "@highway//:nanobenchmark" ,
114135 "@highway//:profiler" ,
115136 "@highway//:thread_pool" ,
116- "@highway//:topology" ,
117137 "@highway//hwy/contrib/sort:vqsort" ,
118138 ],
119139)
@@ -128,11 +148,11 @@ cc_test(
128148 tags = ["ops_tests" ],
129149 deps = [
130150 ":allocator" ,
151+ ":app" ,
131152 ":ops" ,
132153 ":test_util" ,
133154 ":threading" ,
134155 "@googletest//:gtest_main" , # buildcleaner: keep
135- "//:app" ,
136156 "//compression:compress" ,
137157 "//compression:test_util" ,
138158 "@highway//:hwy" ,
@@ -154,11 +174,12 @@ cc_test(
154174 tags = ["ops_tests" ],
155175 deps = [
156176 ":allocator" ,
177+ ":app" ,
157178 ":common" ,
158179 ":ops" ,
159180 ":test_util" ,
181+ ":threading" ,
160182 "@googletest//:gtest_main" , # buildcleaner: keep
161- "//:app" ,
162183 "//compression:compress" ,
163184 "@highway//:hwy" ,
164185 "@highway//:hwy_test_util" ,
@@ -405,6 +426,7 @@ cc_library(
405426 ":cross_entropy" ,
406427 ":gemma_lib" ,
407428 ":kv_cache" ,
429+ ":ops" ,
408430 ":threading" ,
409431 # Placeholder for internal dep, do not remove.,
410432 "@google_benchmark//:benchmark" ,
@@ -464,13 +486,13 @@ cc_binary(
464486 ":benchmark_helper" ,
465487 ":common" ,
466488 ":gemma_lib" ,
489+ ":ops" ,
467490 ":threading" ,
468491 # Placeholder for internal dep, do not remove.,
469492 "//compression:sfp" ,
470493 "//paligemma:image" ,
471494 "@highway//:hwy" ,
472495 "@highway//:profiler" ,
473- "@highway//:thread_pool" ,
474496 ],
475497)
476498
@@ -634,13 +656,12 @@ cc_test(
634656 ":backprop" ,
635657 ":backprop_scalar" ,
636658 ":common" ,
637- ":gemma_lib" ,
638659 ":ops" ,
639660 ":prompt" ,
640661 ":sampler" ,
662+ ":threading" ,
641663 ":weights" ,
642664 "@googletest//:gtest_main" ,
643- "//:threading" ,
644665 "//compression:compress" ,
645666 "@highway//:hwy" ,
646667 "@highway//:hwy_test_util" ,
0 commit comments