load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") load(":targets.bzl", "define_common_targets") oncall("executorch") define_common_targets() runtime.python_test( name = "test_xnnpack_passes", srcs = glob([ "passes/*.py", ]) + [ "test_xnnpack_utils_classes.py", ], deps = [ "//executorch/backends/xnnpack/_passes:xnnpack_passes", "//executorch/backends/xnnpack/test/tester:tester", "//executorch/backends/xnnpack/utils:xnnpack_utils", "//executorch/exir:lib", "//executorch/exir:pass_base", "//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib", "//executorch/exir/dialects:lib", ], external_deps = [ "libtorch", ], ) runtime.python_test( name = "test_xnnpack_ops", srcs = glob([ "ops/*.py", ]) + [ "test_xnnpack_utils.py", ], deps = [ "//executorch/backends/xnnpack/partition:xnnpack_partitioner", "//executorch/backends/xnnpack/test/tester:tester", "//executorch/devtools:lib", "//executorch/devtools/bundled_program:config", "//executorch/devtools/bundled_program/serialize:lib", "//executorch/exir/passes:constant_prop_pass", "//pytorch/ao:torchao", # @manual ], external_deps = [ "libtorch", ], ) runtime.python_test( name = "test_xnnpack_models", srcs = glob([ "models/*.py", ]), tags = ["long_running"], deps = [ "fbsource//third-party/pypi/timm:timm", "fbsource//third-party/pypi/torchsr:torchsr", # @manual "fbsource//third-party/pypi/transformers:transformers", # @manual "//executorch/backends/xnnpack/test/tester:tester", "//executorch/examples/models/llama:llama2_model", "//pytorch/audio/src:torchaudio_core", "//pytorch/vision:torchvision", # @manual ], external_deps = [ "libtorch", ], ) runtime.python_test( name = "test_xnnpack_serialization", srcs = glob([ "serialization/*.py", ]), deps = [ "//executorch/backends/xnnpack:xnnpack_preprocess", ], )