1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") 2load(":targets.bzl", "define_common_targets") 3 4oncall("executorch") 5 6define_common_targets() 7 8runtime.python_test( 9 name = "test_xnnpack_passes", 10 srcs = glob([ 11 "passes/*.py", 12 ]) + [ 13 "test_xnnpack_utils_classes.py", 14 ], 15 deps = [ 16 "//executorch/backends/xnnpack/_passes:xnnpack_passes", 17 "//executorch/backends/xnnpack/test/tester:tester", 18 "//executorch/backends/xnnpack/utils:xnnpack_utils", 19 "//executorch/exir:lib", 20 "//executorch/exir:pass_base", 21 "//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib", 22 "//executorch/exir/dialects:lib", 23 ], 24 external_deps = [ 25 "libtorch", 26 ], 27) 28 29runtime.python_test( 30 name = "test_xnnpack_ops", 31 srcs = glob([ 32 "ops/*.py", 33 ]) + [ 34 "test_xnnpack_utils.py", 35 ], 36 deps = [ 37 "//executorch/backends/xnnpack/partition:xnnpack_partitioner", 38 "//executorch/backends/xnnpack/test/tester:tester", 39 "//executorch/devtools:lib", 40 "//executorch/devtools/bundled_program:config", 41 "//executorch/devtools/bundled_program/serialize:lib", 42 "//executorch/exir/passes:constant_prop_pass", 43 "//pytorch/ao:torchao", # @manual 44 ], 45 external_deps = [ 46 "libtorch", 47 ], 48) 49 50runtime.python_test( 51 name = "test_xnnpack_models", 52 srcs = glob([ 53 "models/*.py", 54 ]), 55 tags = ["long_running"], 56 deps = [ 57 "fbsource//third-party/pypi/timm:timm", 58 "fbsource//third-party/pypi/torchsr:torchsr", # @manual 59 "fbsource//third-party/pypi/transformers:transformers", # @manual 60 "//executorch/backends/xnnpack/test/tester:tester", 61 "//executorch/examples/models/llama:llama2_model", 62 "//pytorch/audio/src:torchaudio_core", 63 "//pytorch/vision:torchvision", # @manual 64 ], 65 external_deps = [ 66 "libtorch", 67 ], 68) 69 70runtime.python_test( 71 name = "test_xnnpack_serialization", 72 srcs = glob([ 73 "serialization/*.py", 74 ]), 75 deps = [ 76 "//executorch/backends/xnnpack:xnnpack_preprocess", 77 ], 78) 79