Skip to content
Open
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
3 changes: 2 additions & 1 deletion .ci/scripts/unittest-buck2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ for op in "build" "test"; do
done

# Build only without testing
buck2 build //codegen/tools/... \
buck2 build //backends/mediatek/... \
//codegen/tools/... \
//extension/llm/runner/io_manager:io_manager \
//extension/llm/modules/... \
//extension/llm/runner:multimodal_runner_lib \
Expand Down
26 changes: 26 additions & 0 deletions backends/mediatek/TARGETS
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

runtime.python_library(
name = "preprocess",
srcs = [
"preprocess.py"
],
visibility = ["PUBLIC"],
deps = [
"//executorch/exir/_serialize:lib",
"//executorch/exir/backend:backend_api",
"//executorch/exir/passes:lib",
"fbsource//third-party/mediatek/neuropilot-express-sdk:sdk",
],
)

runtime.python_library(
name = "partitioner",
srcs = [
"partitioner.py"
],
visibility = ["PUBLIC"],
deps = [
":preprocess",
],
)
14 changes: 14 additions & 0 deletions backends/mediatek/_passes/TARGETS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

runtime.python_library(
name = "passes",
srcs = [
"__init__.py",
"decompose_scaled_dot_product_attention.py",
],
visibility = ["PUBLIC"],
deps = [
"//caffe2:torch",
"//executorch/exir:pass_base",
],
)
16 changes: 16 additions & 0 deletions backends/mediatek/quantizer/TARGETS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

runtime.python_library(
name = "quantizer",
srcs = [
"__init__.py",
"annotator.py",
"qconfig.py",
"quantizer.py",
],
visibility = ["PUBLIC"],
deps = [
"//pytorch/ao:torchao",
"//executorch/backends/mediatek/_passes:passes",
],
)
8 changes: 8 additions & 0 deletions backends/mediatek/runtime/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 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()
24 changes: 24 additions & 0 deletions backends/mediatek/runtime/targets.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

def define_common_targets():
runtime.cxx_library(
name = "neuron_backend",
srcs = [
"NeuronBackend.cpp",
"NeuronBufferAllocator.cpp",
"NeuronExecutor.cpp",
],
headers = glob([
"include/**/*.h",
]),
public_include_directories = ["include"],
deps = [
"fbsource//third-party/mediatek/neuropilot-express-sdk:runtime_api",
"//executorch/runtime/backend:interface",
"//executorch/runtime/core:memory_allocator",
"//executorch/runtime/executor:pte_data_map",
],
define_static_target = True,
link_whole = True,
visibility = ["PUBLIC"],
)
Loading