|  | 
|  | 1 | +# Any targets that should be shared between fbcode and xplat must be defined in | 
|  | 2 | +# targets.bzl. This file can contain fbcode-only targets. | 
|  | 3 | + | 
|  | 4 | +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") | 
|  | 5 | + | 
|  | 6 | +runtime.python_library( | 
|  | 7 | +    name = "llama_transformer", | 
|  | 8 | +    srcs = [ | 
|  | 9 | +        "llama_transformer.py", | 
|  | 10 | +    ], | 
|  | 11 | +    _is_external_target = True, | 
|  | 12 | +    base_module = "executorch.examples.apple.coreml.llama", | 
|  | 13 | +    visibility = [ | 
|  | 14 | +        "//executorch/...", | 
|  | 15 | +        "@EXECUTORCH_CLIENTS", | 
|  | 16 | +    ], | 
|  | 17 | +    deps = [ | 
|  | 18 | +        "//caffe2:torch", | 
|  | 19 | +        "//executorch/examples/models/llama:llama_transformer", | 
|  | 20 | +    ], | 
|  | 21 | +) | 
|  | 22 | + | 
|  | 23 | +runtime.python_library( | 
|  | 24 | +    name = "utils", | 
|  | 25 | +    srcs = [ | 
|  | 26 | +        "utils.py", | 
|  | 27 | +    ], | 
|  | 28 | +    _is_external_target = True, | 
|  | 29 | +    base_module = "executorch.examples.apple.coreml.llama", | 
|  | 30 | +    visibility = [ | 
|  | 31 | +        "//executorch/...", | 
|  | 32 | +        "@EXECUTORCH_CLIENTS", | 
|  | 33 | +    ], | 
|  | 34 | +    deps = [ | 
|  | 35 | +        "//caffe2:torch", | 
|  | 36 | +    ], | 
|  | 37 | +) | 
|  | 38 | + | 
|  | 39 | +runtime.python_binary( | 
|  | 40 | +    name = "export", | 
|  | 41 | +    srcs = [ | 
|  | 42 | +        "export.py", | 
|  | 43 | +    ], | 
|  | 44 | +    main_function = "executorch.examples.apple.coreml.llama.export.main", | 
|  | 45 | +    visibility = [ | 
|  | 46 | +        "//executorch/...", | 
|  | 47 | +        "@EXECUTORCH_CLIENTS", | 
|  | 48 | +    ], | 
|  | 49 | +    deps = [ | 
|  | 50 | +        "fbsource//third-party/pypi/coremltools:coremltools", | 
|  | 51 | +        ":llama_transformer", | 
|  | 52 | +        ":utils", | 
|  | 53 | +        "//caffe2:torch", | 
|  | 54 | +        "//executorch/backends/apple/coreml:backend", | 
|  | 55 | +        "//executorch/backends/apple/coreml:partitioner", | 
|  | 56 | +        "//executorch/examples/models/llama:source_transformation", | 
|  | 57 | +        "//executorch/exir/backend:utils", | 
|  | 58 | +        "//executorch/exir/capture:config", | 
|  | 59 | +        "//executorch/exir/passes:lib", | 
|  | 60 | +        "//executorch/exir/passes:quant_fusion_pass", | 
|  | 61 | +        "//executorch/exir/passes:sym_shape_eval_pass", | 
|  | 62 | +        "//executorch/exir/program:program", | 
|  | 63 | +        "//executorch/extension/export_util:export_util", | 
|  | 64 | +        "//executorch/extension/llm/export:export_lib", | 
|  | 65 | +    ], | 
|  | 66 | +) | 
0 commit comments