|
| 1 | +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") |
| 2 | + |
| 3 | +def define_common_targets(is_fbcode = False): |
| 4 | + if not is_fbcode: |
| 5 | + return |
| 6 | + |
| 7 | + runtime.python_library( |
| 8 | + name = "inspector", |
| 9 | + srcs = [ |
| 10 | + "_inspector.py", |
| 11 | + ], |
| 12 | + deps = [ |
| 13 | + "fbsource//third-party/pypi/ipython:ipython", |
| 14 | + "fbsource//third-party/pypi/numpy:numpy", |
| 15 | + "fbsource//third-party/pypi/pandas:pandas", |
| 16 | + "fbsource//third-party/pypi/tabulate:tabulate", |
| 17 | + ":inspector_utils", |
| 18 | + ":vgf_neural_statistics", |
| 19 | + "//executorch/devtools/debug_format:et_schema", |
| 20 | + "//executorch/devtools/etdump:schema_flatcc", |
| 21 | + "//executorch/devtools/etrecord:etrecord", |
| 22 | + "//executorch/exir:lib", |
| 23 | + "//executorch/devtools/inspector:intermediate_output_capturer", |
| 24 | + "//executorch/devtools/inspector/numerical_comparator:lib", |
| 25 | + ], |
| 26 | + ) |
| 27 | + |
| 28 | + runtime.python_library( |
| 29 | + name = "vgf_neural_statistics", |
| 30 | + srcs = [ |
| 31 | + "vgf_neural_statistics.py", |
| 32 | + ], |
| 33 | + ) |
| 34 | + |
| 35 | + runtime.python_binary( |
| 36 | + name = "inspector_cli", |
| 37 | + main_function = ".inspector_cli.main", |
| 38 | + main_src = "inspector_cli.py", |
| 39 | + deps = [ |
| 40 | + "//executorch/devtools:lib", |
| 41 | + "//executorch/devtools/inspector:lib", |
| 42 | + ], |
| 43 | + ) |
| 44 | + |
| 45 | + runtime.python_library( |
| 46 | + name = "inspector_utils", |
| 47 | + srcs = [ |
| 48 | + "_inspector_utils.py", |
| 49 | + ], |
| 50 | + deps = [ |
| 51 | + "fbsource//third-party/pypi/matplotlib:matplotlib", |
| 52 | + "fbsource//third-party/pypi/numpy:numpy", |
| 53 | + "//caffe2:torch", |
| 54 | + "//executorch/devtools/debug_format:base_schema", |
| 55 | + "//executorch/devtools/debug_format:et_schema", |
| 56 | + "//executorch/devtools/etdump:schema_flatcc", |
| 57 | + "//executorch/devtools/etdump:serialize", |
| 58 | + "//executorch/devtools/etrecord:etrecord", |
| 59 | + ], |
| 60 | + ) |
| 61 | + |
| 62 | + runtime.python_library( |
| 63 | + name = "intermediate_output_capturer", |
| 64 | + srcs = [ |
| 65 | + "_intermediate_output_capturer.py", |
| 66 | + ], |
| 67 | + deps = [ |
| 68 | + "//executorch/devtools/inspector:inspector_utils", |
| 69 | + ], |
| 70 | + ) |
| 71 | + |
| 72 | + runtime.python_library( |
| 73 | + name = "lib", |
| 74 | + srcs = ["__init__.py"], |
| 75 | + deps = [ |
| 76 | + ":inspector", |
| 77 | + ":inspector_utils", |
| 78 | + ":vgf_neural_statistics", |
| 79 | + ], |
| 80 | + ) |
0 commit comments