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
10 changes: 9 additions & 1 deletion extension/llm/custom_ops/spinquant/test/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()
non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/extension/llm/custom_ops/spinquant/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

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


fbcode_target(_kind = define_common_targets,)
5 changes: 0 additions & 5 deletions extension/llm/custom_ops/spinquant/test/TARGETS

This file was deleted.

12 changes: 10 additions & 2 deletions extension/llm/custom_ops/spinquant/third-party/FFHT/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
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/extension/llm/custom_ops/spinquant/third-party/FFHT/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

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


fbcode_target(_kind = define_common_targets,)
5 changes: 0 additions & 5 deletions extension/llm/custom_ops/spinquant/third-party/FFHT/TARGETS

This file was deleted.

103 changes: 101 additions & 2 deletions extension/llm/export/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,107 @@
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/extension/llm/export/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("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")


fbcode_target(_kind = define_common_targets,)

fbcode_target(_kind = runtime.python_library,
name = "export_lib",
srcs = [
"builder.py",
"export_passes.py",
"partitioner_lib.py",
"quantizer_lib.py",
],
_is_external_target = True,
base_module = "executorch.extension.llm.export",
visibility = [
"//bento/...",
"//bento_kernels/...",
"//executorch/examples/...",
"//executorch/extension/llm/...",
"//meta_intern_odllm/...",
],
deps = [
"//caffe2:torch",
"//executorch/backends/apple/coreml:backend",
"//executorch/backends/apple/coreml:partitioner",
"//executorch/backends/apple/mps:partitioner",
"//executorch/backends/qualcomm/partition:partition",
"//executorch/backends/qualcomm/quantizer:quantizer",
"//executorch/backends/transforms:duplicate_dynamic_quant_chain",
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
"//executorch/backends/vulkan/quantizer:vulkan_quantizer",
"//executorch/backends/xnnpack/partition:xnnpack_partitioner",
"//executorch/backends/xnnpack/quantizer:xnnpack_quantizer",
"//executorch/exir:delegate",
"//executorch/exir:lib",
"//executorch/exir/backend:backend_details",
"//executorch/extension/export_util:export_util",
"//executorch/extension/llm/custom_ops:custom_ops_aot_lib",
"//executorch/extension/llm/custom_ops:custom_ops_aot_py",
"//pytorch/tokenizers/pytorch_tokenizers:tokenizers",
],
)

fbcode_target(_kind = runtime.python_binary,
name = "export_llm",
srcs = [
"export_llm.py",
],
main_function = "executorch.extension.llm.export.export_llm.main",
preload_deps = [
"//executorch/extension/llm/custom_ops:model_sharding_py",
"//executorch/extension/llm/custom_ops:custom_ops_aot_lib",
"//executorch/kernels/quantized:aot_lib",
],
deps = [
"fbsource//third-party/pypi/hydra-core:hydra-core",
"fbsource//third-party/pypi/omegaconf:omegaconf",
"//executorch/examples/models/llama:export_library",
"//executorch/extension/pybindings:aten_lib",
],
)

fbcode_target(_kind = runtime.python_library,
name = "export_llm_lib",
srcs = [
"export_llm.py",
],
deps = [
"fbsource//third-party/pypi/hydra-core:hydra-core",
"fbsource//third-party/pypi/omegaconf:omegaconf",
"//executorch/examples/models/llama:export_library",
],
visibility = [
"//executorch/examples/...",
"//executorch/extension/llm/...",
],
)

fbcode_target(_kind = runtime.python_test,
name = "export_passes_test",
srcs = [
"test_export_passes.py",
],
preload_deps = [
"//executorch/extension/llm/custom_ops:custom_ops_aot_lib",
],
deps = [
":export_lib",
],
)
96 changes: 0 additions & 96 deletions extension/llm/export/TARGETS

This file was deleted.

6 changes: 6 additions & 0 deletions extension/llm/export/config/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

fbcode_target(_kind = define_common_targets,)
5 changes: 0 additions & 5 deletions extension/llm/export/config/TARGETS

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
Expand All @@ -8,7 +9,7 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

runtime.python_test(
fbcode_target(_kind = runtime.python_test,
name = "test_builder",
srcs = ["test_builder.py"],
deps = [
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")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "kv_cache",
srcs = [
"kv_cache.py",
Expand All @@ -13,7 +14,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "attention",
srcs = [
"attention.py",
Expand All @@ -26,7 +27,7 @@ runtime.python_library(
],
)

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

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "module_lib",
srcs = [
"__init__.py",
Expand Down
15 changes: 13 additions & 2 deletions extension/llm/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 fbcode-only targets.

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


non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/extension/llm/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")

oncall("executorch")

define_common_targets()
fbcode_target(_kind = define_common_targets,)
8 changes: 0 additions & 8 deletions extension/llm/runner/TARGETS

This file was deleted.

15 changes: 13 additions & 2 deletions extension/llm/runner/io_manager/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 fbcode-only targets.

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


non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/extension/llm/runner/io_manager/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")

oncall("executorch")

define_common_targets()
fbcode_target(_kind = define_common_targets,)
8 changes: 0 additions & 8 deletions extension/llm/runner/io_manager/TARGETS

This file was deleted.

Loading
Loading