From fc6b8ead01049df60f9179a4623fa29dfff6029e Mon Sep 17 00:00:00 2001 From: Chen Lai Date: Thu, 26 Sep 2024 18:33:13 -0700 Subject: [PATCH] Add BUCK file to coreml export script (#5702) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5702 As title, add a target file so we can use it internally ``` buck run //executorch/examples/apple/coreml/scripts:export -- -m resnet18 ``` ghstack-source-id: 244901220 exported-using-ghexport bypass-github-export-checks Reviewed By: shoumikhin Differential Revision: D63476610 fbshipit-source-id: 908d27ff24335deacbb8a55d1510afac85277f05 --- examples/apple/coreml/scripts/TARGETS | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/apple/coreml/scripts/TARGETS diff --git a/examples/apple/coreml/scripts/TARGETS b/examples/apple/coreml/scripts/TARGETS new file mode 100644 index 0000000000..c47af5235f --- /dev/null +++ b/examples/apple/coreml/scripts/TARGETS @@ -0,0 +1,18 @@ +# Any targets that should be shared between fbcode and xplat must be defined in +# targets.bzl. This file can contain fbcode-only targets. +load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary") + +python_binary( + name = "export", + srcs = [ + "export.py", + ], + main_function = "executorch.examples.apple.coreml.scripts.export.main", + deps = [ + "//executorch/backends/apple/coreml:backend", + "//executorch/backends/apple/coreml:partitioner", + "//executorch/backends/apple/coreml:quantizer", + "//executorch/devtools/etrecord:etrecord", + "//executorch/examples/models:models", + ], +)