1load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary") 2load("@fbcode_macros//build_defs:python_library.bzl", "python_library") 3load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") 4 5oncall("executorch") 6 7python_library( 8 name = "size_analysis_tool_lib", 9 srcs = [ 10 "size_analysis_tool.py", 11 ], 12 visibility = ["PUBLIC"], 13 deps = [ 14 "//caffe2:torch", 15 "//executorch/devtools:lib", 16 "//executorch/exir:lib", 17 "//executorch/exir/backend:backend_api", 18 ], 19) 20 21python_binary( 22 name = "size_analysis_tool", 23 srcs = [ 24 "size_analysis_tool.py", 25 ], 26 main_function = "executorch.devtools.size_analysis_tool.size_analysis_tool.main", 27 visibility = ["PUBLIC"], 28 deps = [ 29 "//caffe2:torch", 30 "//executorch/devtools:lib", 31 "//executorch/exir:lib", 32 "//executorch/exir/backend:backend_api", 33 ], 34) 35 36python_unittest( 37 name = "size_analysis_tool_test", 38 srcs = [ 39 "size_analysis_tool.py", 40 "size_analysis_tool_test.py", 41 ], 42 deps = [ 43 "//caffe2:torch", 44 "//executorch/backends/xnnpack/partition:xnnpack_partitioner", 45 "//executorch/backends/xnnpack/utils:xnnpack_utils", 46 "//executorch/devtools:lib", 47 "//executorch/exir:lib", 48 "//executorch/exir/backend:backend_api", 49 "//executorch/exir/passes:spec_prop_pass", 50 ], 51) 52