Skip to content
Closed
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
7 changes: 4 additions & 3 deletions docs/TARGETS → docs/BUCK
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:native_rules.bzl", "buck_filegroup", "buck_sh_test")
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")

oncall("executorch")

python_binary(
fbcode_target(_kind = python_binary,
name = "sphinx",
main_module = "sphinx.cmd.build",
par_style = "xar",
Expand All @@ -30,12 +31,12 @@ python_binary(
],
)

buck_filegroup(
fbcode_target(_kind = buck_filegroup,
name = "source",
srcs = glob(["source/**/*"]),
)

buck_sh_test(
fbcode_target(_kind = buck_sh_test,
name = "doctest",
args = [
"-M",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
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")

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "llama_transformer",
srcs = [
"llama_transformer.py",
Expand All @@ -17,7 +18,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "utils",
srcs = [
"utils.py",
Expand All @@ -30,7 +31,7 @@ runtime.python_library(
],
)

runtime.python_binary(
fbcode_target(_kind = runtime.python_binary,
name = "export",
srcs = [
"export.py",
Expand Down
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")
# 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(
fbcode_target(_kind = python_binary,
name = "export",
srcs = [
"export.py",
Expand Down
20 changes: 18 additions & 2 deletions examples/apple/mps/executor_runner/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
oncall("executorch")
#
# Copyright (c) 2023 Apple Inc. All rights reserved.
# Provided subject to the LICENSE file in the top level directory.
Expand All @@ -8,6 +10,20 @@

load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()
non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/examples/apple/mps/executor_runner/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

#
# Copyright (c) 2023 Apple Inc. All rights reserved.
# Provided subject to the LICENSE file in the top level directory.
#

# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain fbcode-only targets.

load(":targets.bzl", "define_common_targets")


fbcode_target(_kind = define_common_targets,)
13 changes: 0 additions & 13 deletions examples/apple/mps/executor_runner/TARGETS

This file was deleted.

15 changes: 13 additions & 2 deletions examples/devtools/example_runner/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
oncall("executorch")
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain xplat-only targets.

load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()
non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/examples/devtools/example_runner/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain fbcode-only targets.

load(":targets.bzl", "define_common_targets")


fbcode_target(_kind = define_common_targets,)
8 changes: 0 additions & 8 deletions examples/devtools/example_runner/TARGETS

This file was deleted.

30 changes: 30 additions & 0 deletions examples/devtools/scripts/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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")

fbcode_target(_kind = runtime.python_binary,
name = "export_bundled_program",
main_function = ".export_bundled_program.main",
main_src = "export_bundled_program.py",
deps = [
"//caffe2:torch",
"//executorch/devtools:lib",
"//executorch/devtools/bundled_program:config",
"//executorch/devtools/bundled_program/serialize:lib",
"//executorch/examples/models:models",
"//executorch/extension/export_util:export_util",
],
)

fbcode_target(_kind = runtime.python_binary,
name = "gen_sample_etrecord",
srcs = ["gen_sample_etrecord.py"],
main_function = "executorch.examples.devtools.scripts.gen_sample_etrecord.main",
deps = [
"//executorch/devtools:lib",
"//executorch/devtools/etrecord:etrecord",
"//executorch/examples/models:models",
"//executorch/exir:lib",
],
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("papaya_oncall")

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "model_loading_lib",
srcs = [
"model_loading_lib.py",
Expand All @@ -20,7 +21,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "training_lib",
srcs = [
"training_lib.py",
Expand All @@ -36,7 +37,7 @@ runtime.python_library(
],
)

python_binary(
fbcode_target(_kind = python_binary,
name = "runner",
srcs = [
"runner.py",
Expand All @@ -53,7 +54,7 @@ python_binary(
],
)

python_binary(
fbcode_target(_kind = python_binary,
name = "model_exporter",
srcs = [
"model_exporter.py",
Expand Down
53 changes: 53 additions & 0 deletions examples/models/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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 = "models",
srcs = [
"__init__.py",
"model_factory.py",
],
deps = [
"//caffe2:torch",
"//executorch/examples/models:model_base", # @manual
"//executorch/examples/models/deeplab_v3:dl3_model", # @manual
"//executorch/examples/models/edsr:edsr_model", # @manual
"//executorch/examples/models/emformer_rnnt:emformer_rnnt_model", # @manual
"//executorch/examples/models/inception_v3:ic3_model", # @manual
"//executorch/examples/models/inception_v4:ic4_model", # @manual
"//executorch/examples/models/llama:llama2_model", # @manual
"//executorch/examples/models/mobilebert:mobilebert_model", # @manual
"//executorch/examples/models/mobilenet_v2:mv2_model", # @manual
"//executorch/examples/models/mobilenet_v3:mv3_model", # @manual
"//executorch/examples/models/resnet:resnet_model", # @manual
"//executorch/examples/models/torchvision_vit:vit_model", # @manual
"//executorch/examples/models/toy_model:toy_model", # @manual
"//executorch/examples/models/wav2letter:w2l_model", # @manual
"//executorch/examples/models/llama3_2_vision:multimodal_lib", # @manual
"//executorch/examples/models/gemma3:gemma3", # @manual
"//executorch/examples/models/qwen2_5:qwen2_5", # @manual
"//executorch/examples/models/qwen3:qwen3", # @manual
"//executorch/examples/models/phi_4_mini:phi_4_mini", # @manual
"//executorch/examples/models/smollm2:smollm2", # @manual
"//executorch/examples/models/smollm3:smollm3", # @manual
],
)

fbcode_target(_kind = python_library,
name = "checkpoint",
srcs = [
"checkpoint.py",
],
)

fbcode_target(_kind = python_library,
name = "model_base",
srcs = [
"model_base.py",
],
deps = [
"//caffe2:torch",
],
)
17 changes: 17 additions & 0 deletions examples/models/deeplab_v3/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 = "dl3_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"//caffe2:torch",
"//executorch/examples/models:model_base",
"//pytorch/vision:torchvision", # @manual
],
)
17 changes: 17 additions & 0 deletions examples/models/edsr/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 = "edsr_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"fbsource//third-party/pypi/torchsr:torchsr", # @manual
"//caffe2:torch",
"//executorch/examples/models:model_base",
],
)
17 changes: 17 additions & 0 deletions examples/models/emformer_rnnt/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 = "emformer_rnnt_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"//caffe2:torch",
"//executorch/examples/models:model_base",
"//pytorch/audio/src:torchaudio_core",
],
)
25 changes: 25 additions & 0 deletions examples/models/gemma3/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("executorch")

fbcode_target(_kind = runtime.python_library,
name = "gemma3",
srcs = [
"__init__.py",
"convert_weights.py",
],
_is_external_target = True,
base_module = "executorch.examples.models.gemma3",
resources = {
"config/1b_config.json": "config/1b_config.json",
},
deps = [
"//caffe2:torch",
"//executorch/examples/models:model_base",
"//executorch/examples/models/llama:llama2_model",
"fbcode//pytorch/torchtune:lib",
],
visibility = ["PUBLIC"],
)
17 changes: 17 additions & 0 deletions examples/models/inception_v3/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 = "ic3_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"//caffe2:torch",
"//executorch/examples/models:model_base",
"//pytorch/vision:torchvision", # @manual
],
)
17 changes: 17 additions & 0 deletions examples/models/inception_v4/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 = "ic4_model",
srcs = [
"__init__.py",
"model.py",
],
deps = [
"fbsource//third-party/pypi/timm:timm",
"//caffe2:torch",
"//executorch/examples/models:model_base",
],
)
Loading
Loading