diff --git a/BUILD.bazel b/BUILD.bazel index 3df419d80948..ca244cd03d1e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -319,6 +319,15 @@ xnnpack_cc_library( hdrs = INTERNAL_MICROKERNEL_HDRS, gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":common", + ":config_hdrs", + ":memory", + ":microparams", + ":mutex", + ":xnnpack_h", + "@FP16", + ], ) xnnpack_cc_library( @@ -355,6 +364,10 @@ xnnpack_cc_library( hdrs = ["src/xnnpack/init-once.h"], gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":common", + ":xnnpack_h", + ], ) xnnpack_cc_library( @@ -441,7 +454,10 @@ xnnpack_cc_library( "src/xnnpack/config.h", "src/xnnpack/config-types.h", ], - deps = [":params"], + deps = [ + ":hardware_config", + ":params", + ], ) xnnpack_cc_library( @@ -587,6 +603,9 @@ xnnpack_cc_library( hdrs = ["src/xnnpack/node-type.h"], gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":common", + ], ) xnnpack_cc_library( @@ -594,6 +613,9 @@ xnnpack_cc_library( hdrs = ["src/xnnpack/allocation-type.h"], gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":common", + ], ) xnnpack_cc_library( @@ -601,6 +623,9 @@ xnnpack_cc_library( hdrs = ["src/xnnpack/operator-type.h"], gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":common", + ], ) xnnpack_cc_library( @@ -608,6 +633,9 @@ xnnpack_cc_library( hdrs = ["src/xnnpack/microkernel-type.h"], gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":common", + ], ) xnnpack_cc_library( @@ -615,6 +643,9 @@ xnnpack_cc_library( hdrs = ["src/xnnpack/internal.h"], gcc_copts = xnnpack_gcc_std_copts(), msvc_copts = xnnpack_msvc_std_copts(), + deps = [ + ":xnnpack_h", + ], ) xnnpack_cc_library( @@ -1369,6 +1400,9 @@ xnnpack_cc_library( wasm_srcs = WASM32_ASM_MICROKERNEL_SRCS, wasmrelaxedsimd_srcs = WASM32_ASM_MICROKERNEL_SRCS, wasmsimd_srcs = WASM32_ASM_MICROKERNEL_SRCS, + deps = [ + ":common", + ], ) xnnpack_cc_library( @@ -2116,18 +2150,25 @@ xnnpack_cc_library( ":allocator", ":cache", ":common", + ":config_hdrs", ":enable_jit", ":enable_sparse", + ":hardware_config", ":internal", ":logging", ":math", + ":memory", + ":microkernel_type", + ":microkernels_h", ":node_type", ":operator_type", + ":operator_utils", ":operators", ":params", ":requantization", ":xnnpack_h", "@FP16", + "@pthreadpool", ] + xnnpack_slinky_deps(), ) diff --git a/bench/BUILD.bazel b/bench/BUILD.bazel index 97578ee4c1b2..adfe50722911 100644 --- a/bench/BUILD.bazel +++ b/bench/BUILD.bazel @@ -61,6 +61,7 @@ xnnpack_cc_library( "//:hardware_config", "//:memory", "//:params", + "//:xnnpack_h", "@com_google_benchmark//:benchmark", ] + select({ "//:cpuinfo_enabled": ["@cpuinfo"], @@ -505,13 +506,20 @@ xnnpack_benchmark( deps = MICROKERNEL_BENCHMARK_DEPS, ) +cc_library( + name = "spmm", + hdrs = ["spmm.h"], + deps = [ + "@com_google_benchmark//:benchmark", + ], +) + xnnpack_benchmark( name = "f16_spmm_bench", srcs = [ "f16-spmm.cc", - "spmm.h", ], - deps = MICROKERNEL_BENCHMARK_DEPS, + deps = MICROKERNEL_BENCHMARK_DEPS + [":spmm"], ) [xnnpack_benchmark( @@ -868,9 +876,9 @@ xnnpack_benchmark( name = "f32_spmm_bench", srcs = [ "f32-spmm.cc", - "spmm.h", ], deps = MICROKERNEL_BENCHMARK_DEPS + [ + ":spmm", ":spmm_benchmark", ], ) @@ -1069,7 +1077,7 @@ xnnpack_cc_library( hdrs = [ "rsum-benchmark.h", ], - deps = MICROKERNEL_BENCHMARK_DEPS, + deps = MICROKERNEL_BENCHMARK_DEPS + ["@com_google_benchmark//:benchmark"], ) xnnpack_cc_library( @@ -1079,7 +1087,11 @@ xnnpack_cc_library( "gemm.h", "gemm-benchmark.h", ], - deps = MICROKERNEL_BENCHMARK_DEPS, + deps = MICROKERNEL_BENCHMARK_DEPS + [ + "//:config_hdrs", + "//:math", + "@com_google_benchmark//:benchmark", + ], ) xnnpack_cc_library( @@ -1089,7 +1101,10 @@ xnnpack_cc_library( "spmm-benchmark.h", ], deps = MICROKERNEL_BENCHMARK_DEPS + [ + ":spmm", "//:isa_checks", + "//:math", + "@com_google_benchmark//:benchmark", ], ) @@ -1358,7 +1373,6 @@ xnnpack_benchmark( deps = [ ":bench_utils", "//:XNNPACK", - "//:aligned_allocator", "//:models_h", "//models:fp16_mobilenet_v1", "//models:fp16_mobilenet_v2", @@ -1389,6 +1403,5 @@ xnnpack_benchmark( "//models:qu8_mobilenet_v2", "//models:qu8_mobilenet_v3_large", "//models:qu8_mobilenet_v3_small", - "@pthreadpool", ], ) diff --git a/models/BUILD b/models/BUILD index 9a0f34d4aa8d..8938608522bd 100644 --- a/models/BUILD +++ b/models/BUILD @@ -18,10 +18,9 @@ xnnpack_cc_library( deps = [ "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -32,10 +31,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -46,10 +44,10 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", + "//:memory", "//:models_h", - "@pthreadpool", ], ) @@ -59,11 +57,11 @@ xnnpack_cc_library( copts = xnnpack_std_cxxopts(), visibility = xnnpack_visibility(), deps = [ + "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -74,10 +72,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -88,10 +85,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -102,10 +98,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -116,10 +111,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -130,10 +124,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -144,10 +137,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -158,10 +150,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -172,10 +163,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -186,10 +176,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -201,10 +190,9 @@ xnnpack_cc_library( deps = [ "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -214,10 +202,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -228,10 +215,10 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", + "//:memory", "//:models_h", - "@pthreadpool", ], ) @@ -241,11 +228,11 @@ xnnpack_cc_library( copts = xnnpack_std_cxxopts(), visibility = xnnpack_visibility(), deps = [ + "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -256,10 +243,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -271,10 +257,9 @@ xnnpack_cc_library( deps = [ "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -285,10 +270,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -299,10 +283,10 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", + "//:memory", "//:models_h", - "@pthreadpool", ], ) @@ -312,11 +296,11 @@ xnnpack_cc_library( copts = xnnpack_std_cxxopts(), visibility = xnnpack_visibility(), deps = [ + "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -327,10 +311,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -342,10 +325,9 @@ xnnpack_cc_library( deps = [ "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -356,10 +338,9 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -370,11 +351,10 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", "//:post_operation", - "@pthreadpool", ], ) @@ -385,10 +365,10 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", + "//:memory", "//:models_h", - "@pthreadpool", ], ) @@ -398,11 +378,11 @@ xnnpack_cc_library( copts = xnnpack_std_cxxopts(), visibility = xnnpack_visibility(), deps = [ + "@FP16", "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) @@ -413,9 +393,8 @@ xnnpack_cc_library( visibility = xnnpack_visibility(), deps = [ "//:XNNPACK", - "//:aligned_allocator", "//:cache", + "//:common", "//:models_h", - "@pthreadpool", ], ) diff --git a/test/BUILD.bazel b/test/BUILD.bazel index c6c596213782..c7d5d3afab60 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -83,6 +83,7 @@ xnnpack_cc_library( hdrs = ["gemm-microkernel-tester.h"], deps = MICROKERNEL_TEST_DEPS + xnnpack_test_deps_for_library() + [ "//:XNNPACK", + "//:config_hdrs", "//:jit", "//:post_operation", ], @@ -2705,7 +2706,6 @@ xnnpack_unit_test( deps = [ "//:microkernel_configs", "//:operator_utils", - "//:params", ], )