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
21 changes: 11 additions & 10 deletions backends/vulkan/_passes/TARGETS → backends/vulkan/_passes/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:python_unittest.bzl", "python_unittest")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

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

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "insert_prepack_nodes",
srcs = ["insert_prepack_nodes.py"],
visibility = [
Expand All @@ -34,7 +35,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "squeeze_unsqueeze_inputs",
srcs = [
"squeeze_unsqueeze_inputs.py",
Expand All @@ -50,7 +51,7 @@ runtime.python_library(
]
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "remove_asserts",
srcs = ["remove_asserts.py"],
visibility = [
Expand All @@ -63,7 +64,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "remove_redundant_ops",
srcs = ["remove_redundant_ops.py"],
visibility = [
Expand All @@ -76,7 +77,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "tag_memory_meta_pass",
srcs = ["tag_memory_meta_pass.py"],
visibility = [
Expand All @@ -91,7 +92,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "fold_qdq",
srcs = ["fold_qdq.py"],
visibility = [
Expand All @@ -104,7 +105,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "insert_dtype_promotion",
srcs = ["insert_dtype_promotion.py"],
visibility = [
Expand All @@ -117,7 +118,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "fuse_patterns",
srcs = ["fuse_patterns.py"],
visibility = [
Expand All @@ -133,7 +134,7 @@ runtime.python_library(
typing = True,
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "vulkan_passes",
srcs = [
"__init__.py",
Expand Down
110 changes: 108 additions & 2 deletions backends/vulkan/test/BUCK
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load(":compute_api_tests.bzl", "define_compute_api_test_targets")

fb_native.filegroup(
oncall("executorch")
non_fbcode_target(_kind = fb_native.filegroup,
name = "test_shaders",
srcs = glob([
"glsl/*",
Expand All @@ -11,4 +13,108 @@ fb_native.filegroup(
],
)

define_compute_api_test_targets()
non_fbcode_target(_kind = define_compute_api_test_targets,)

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

load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

Comment on lines +18 to +22

fbcode_target(_kind = python_unittest,
name = "test_vulkan_delegate",
srcs = [
"test_vulkan_delegate.py",
],
preload_deps = [
"fbsource//third-party/swiftshader/lib/linux-x64:libvk_swiftshader_fbcode",
"//executorch/backends/vulkan:vulkan_backend_lib",
"//executorch/kernels/portable:custom_ops_generated_lib",
],
deps = [
":test_utils",
"//caffe2:torch",
"//executorch/backends/transforms:convert_dtype_pass",
"//executorch/backends/vulkan:vulkan_preprocess",
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
"//executorch/exir:lib",
"//executorch/extension/pybindings:portable_lib", # @manual
"//executorch/extension/pytree:pylib",
"//executorch/kernels/portable:custom_ops_generated_lib",
],
)

fbcode_target(_kind = python_unittest,
name = "test_vulkan_passes",
srcs = [
"test_vulkan_passes.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/vulkan/_passes:vulkan_passes",
"//executorch/backends/vulkan:vulkan_preprocess",
"//executorch/backends/xnnpack/quantizer:xnnpack_quantizer",
"//pytorch/ao:torchao", # @manual
]
)

fbcode_target(_kind = python_unittest,
name = "test_vulkan_delegate_header",
srcs = [
"test_vulkan_delegate_header.py",
],
deps = [
"//executorch/backends/vulkan:vulkan_preprocess",
],
)

fbcode_target(_kind = python_unittest,
name = "test_serialization",
srcs = [
"test_serialization.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/vulkan:vulkan_preprocess",
],
)

fbcode_target(_kind = python_unittest,
name = "test_vulkan_tensor_repr",
srcs = [
"test_vulkan_tensor_repr.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/vulkan:vulkan_preprocess",
],
)

fbcode_target(_kind = runtime.python_library,
name = "tester",
srcs = ["tester.py"],
deps = [
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
"//executorch/backends/vulkan:vulkan_preprocess",
]
)

fbcode_target(_kind = runtime.python_library,
name = "test_utils",
srcs = [
"utils.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/vulkan:vulkan_preprocess",
"//executorch/backends/vulkan/partitioner:vulkan_partitioner",
"//executorch/backends/xnnpack:xnnpack_preprocess",
"//executorch/backends/xnnpack/quantizer:xnnpack_quantizer",
"//executorch/backends/xnnpack/partition:xnnpack_partitioner",
"//executorch/devtools:lib",
"//executorch/devtools/bundled_program/serialize:lib",
"//executorch/exir:lib",
"//executorch/extension/pybindings:portable_lib", # @manual
"//executorch/extension/pytree:pylib",
],
)
102 changes: 0 additions & 102 deletions backends/vulkan/test/TARGETS

This file was deleted.

12 changes: 10 additions & 2 deletions backends/vulkan/test/custom_ops/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")
Comment on lines +2 to 6

oncall("executorch")

define_common_targets()
non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/backends/vulkan/test/custom_ops/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,is_fbcode = True)
5 changes: 0 additions & 5 deletions backends/vulkan/test/custom_ops/TARGETS

This file was deleted.

12 changes: 10 additions & 2 deletions backends/vulkan/test/op_tests/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")
Comment on lines +2 to 6

oncall("executorch")

define_common_targets()
non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/backends/vulkan/test/op_tests/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,is_fbcode = True)
5 changes: 0 additions & 5 deletions backends/vulkan/test/op_tests/TARGETS

This file was deleted.

Loading