xref: /aosp_15_r20/external/executorch/exir/verification/TARGETS (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1load("@fbcode_macros//build_defs:cpp_python_extension.bzl", "cpp_python_extension")
2load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
3load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
4
5oncall("executorch")
6
7cpp_python_extension(
8    name = "bindings",
9    srcs = [
10        "bindings.cpp",
11    ],
12    deps = [
13        "//caffe2:torch-cpp-cpu",
14        "//caffe2:torch_extension",
15        "//caffe2/c10:c10",
16    ],
17    external_deps = [
18        "pybind11",
19    ],
20)
21
22python_library(
23    name = "interpreter",
24    srcs = [
25        "interpreter.py",
26    ],
27    deps = [
28        ":bindings",  # @manual
29        "//caffe2:torch",
30        "//executorch/exir:lib",
31        "//executorch/exir:schema",
32        "//executorch/exir:tensor",
33        "//executorch/extension/pytree:pylib",
34    ],
35)
36
37python_library(
38    name = "devhtml",
39    srcs = [
40        "dev_html.py",
41    ],
42    deps = [
43        ":interpreter",  # @manual
44    ],
45)
46
47python_library(
48    name = "verifier",
49    srcs = [
50        "arg_validator.py",
51        "verifier.py",
52    ],
53    deps = [
54        "//caffe2:torch",
55        "//executorch/exir:error",
56        "//executorch/exir:lowered_backend_module",
57        "//executorch/exir/capture:config",
58        "//executorch/exir/dialects/edge:lib",
59        "//executorch/exir/emit:emit",
60    ],
61)
62
63python_unittest(
64    name = "test_verifier",
65    srcs = ["test/test_verifier.py"],
66    deps = [
67        ":verifier",
68        "//caffe2:torch",
69        "//executorch/exir:lib",
70        "//executorch/exir/dialects:lib",
71    ],
72)
73