Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "model",
srcs = [
"__init__.py",
Expand Down
59 changes: 59 additions & 0 deletions examples/models/llava/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain fbcode-only targets.

load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

fbcode_target(_kind = define_common_targets,)

fbcode_target(_kind = runtime.python_library,
name = "model",
srcs = [
"model.py",
],
_is_external_target = True,
base_module = "executorch.examples.models.llava",
visibility = ["PUBLIC"],
deps = [
"//caffe2:torch",
"//executorch/examples/models/llama:export_library",
"//executorch/examples/models/llama:llama2_model",
"fbsource//third-party/pypi/transformers:transformers",
],
)

fbcode_target(_kind = runtime.python_library,
name = "export_lib",
srcs = [
"export_llava.py",
],
_is_external_target = True,
base_module = "executorch.examples.models.llava",
resources = {
"//executorch/examples/models/llama/params:params": "params.json",
},
visibility = [
"//bento/...",
"//bento_kernels/...",
"//executorch/...",
],
deps = [
":model",
],
)

fbcode_target(_kind = runtime.python_binary,
name = "export",
main_function = "executorch.examples.models.llava.export_llava.main",
# visibility = ["//executorch/examples/..."],
preload_deps = [
"//executorch/extension/llm/custom_ops:custom_ops_aot_lib",
"//executorch/kernels/quantized:aot_lib",
],
deps = [
":export_lib",
],
)
17 changes: 17 additions & 0 deletions examples/models/mobilebert/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("executorch")

fbcode_target(_kind = python_library,
name = "mobilebert_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"fbsource//third-party/pypi/transformers:transformers", # @manual
"//caffe2:torch",
"//executorch/examples/models:model_base",
],
)
17 changes: 17 additions & 0 deletions examples/models/mobilenet_v2/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("executorch")

fbcode_target(_kind = python_library,
name = "mv2_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"//caffe2:torch",
"//executorch/examples/models:model_base",
"//pytorch/vision:torchvision", # @manual
],
)
Loading