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
12 changes: 6 additions & 6 deletions backends/native/examples/vision/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbsource//tools/target_determinator/macros:ci.bzl", "ci")
load("@fbsource//xplat/executorch/backends/native/runtime/engine:targets.bzl", "CPU_COMPAT")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "is_xplat", "runtime")

oncall("executorch")

Expand Down Expand Up @@ -42,20 +42,20 @@ runtime.cxx_binary(
**CPU_COMPAT
)

fbcode_target(
_kind = runtime.cxx_binary,
runtime.cxx_binary(
name = "run_classification",
srcs = ["run_classification.cpp"],
deps = [
":classification_runner",
"//executorch/backends/native/runtime/vulkan:vulkan_engine",
],
external_deps = ["gflags"],
# Android builds go through xplat.
labels = ci.labels(ci.linux(ci.mode("fbsource//arvr/mode/android/linux/opt"))) if is_xplat() else [],
visibility = ["PUBLIC"],
)

fbcode_target(
_kind = runtime.command_alias,
runtime.command_alias(
name = "run_classification_vulkan",
exe = ":run_classification",
visibility = ["PUBLIC"],
Expand Down
16 changes: 14 additions & 2 deletions backends/native/runtime/vulkan/BUCK
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

# Link the host engine against ET-VK configured for the selected Vulkan device,
# exposing optional features such as integer dot product.
# Link the engine against ET-VK configured for the selected Vulkan device,
# exposing optional features such as integer dot product. fbcode links the
# xplat ET-VK targets directly.
fbcode_target(
_kind = native.cxx_library,
name = "xplat_vulkan_runtime",
Expand All @@ -15,6 +17,16 @@ fbcode_target(
visibility = ["PUBLIC"],
)

non_fbcode_target(
_kind = runtime.cxx_library,
name = "xplat_vulkan_runtime",
exported_deps = [
"//executorch/backends/vulkan:vulkan_compute_api",
"//executorch/backends/vulkan:vulkan_graph_runtime",
],
visibility = ["PUBLIC"],
)

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

Expand Down
6 changes: 1 addition & 5 deletions backends/native/runtime/vulkan/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "is_xplat", "runtime")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

def define_common_targets():
runtime.cxx_library(
Expand All @@ -10,10 +10,6 @@ def define_common_targets():
visibility = ["//executorch/backends/native/..."],
)

# Host-only for now; Android integration is not wired up.
if is_xplat():
return

runtime.cxx_library(
name = "vulkan_passes",
srcs = [
Expand Down
44 changes: 22 additions & 22 deletions backends/native/test/runtime/vulkan/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ def define_common_targets():
],
)

runtime.cxx_test(
name = "vulkan_passes_test",
srcs = [
"test_fuse_quantized_embedding.cpp",
"test_fuse_quantized_linear.cpp",
"test_insert_prepack.cpp",
"test_lower_hf_attention.cpp",
"test_lower_rms_norm.cpp",
"test_materialize_view_copies.cpp",
],
deps = [
"//executorch/backends/native/runtime/vulkan:vulkan_passes",
"//executorch/backends/native/runtime/graph:argument",
"//executorch/backends/native/runtime/graph:graph",
"//executorch/backends/native/runtime/graph:graph_utils",
"//executorch/backends/native/runtime/graph:node",
"//executorch/backends/native/runtime/graph:scalar_type",
"//executorch/backends/native/runtime/graph:value",
"//executorch/backends/native/runtime/graph:tensor_meta",
],
)

if is_xplat():
return

Expand Down Expand Up @@ -48,25 +70,3 @@ def define_common_targets():
"fbsource//third-party/swiftshader/lib/linux-x64:libvk_swiftshader_fbcode",
],
)

runtime.cxx_test(
name = "vulkan_passes_test",
srcs = [
"test_fuse_quantized_embedding.cpp",
"test_fuse_quantized_linear.cpp",
"test_insert_prepack.cpp",
"test_lower_hf_attention.cpp",
"test_lower_rms_norm.cpp",
"test_materialize_view_copies.cpp",
],
deps = [
"//executorch/backends/native/runtime/vulkan:vulkan_passes",
"//executorch/backends/native/runtime/graph:argument",
"//executorch/backends/native/runtime/graph:graph",
"//executorch/backends/native/runtime/graph:graph_utils",
"//executorch/backends/native/runtime/graph:node",
"//executorch/backends/native/runtime/graph:scalar_type",
"//executorch/backends/native/runtime/graph:value",
"//executorch/backends/native/runtime/graph:tensor_meta",
],
)
Loading