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
98 changes: 96 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,96 @@ 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")


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",
"//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 = 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",
],
)
90 changes: 0 additions & 90 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")

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")

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.

59 changes: 56 additions & 3 deletions backends/vulkan/tools/gpuinfo/BUCK
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")
load("@fbcode_macros//build_defs:native_rules.bzl", "buck_filegroup")
load("@fbsource//tools/build_defs:fb_xplat_cxx_binary.bzl", "fb_xplat_cxx_binary")
load(
Expand All @@ -11,7 +12,7 @@ load(

oncall("executorch")

buck_filegroup(
non_fbcode_target(_kind = buck_filegroup,
name = "gpuinfo_shaders",
srcs = glob([
"glsl/*",
Expand All @@ -21,14 +22,14 @@ buck_filegroup(
],
)

vulkan_spv_shader_lib(
non_fbcode_target(_kind = vulkan_spv_shader_lib,
name = "gpuinfo_shader_lib",
spv_filegroups = {
":gpuinfo_shaders": "glsl",
},
)

fb_xplat_cxx_binary(
non_fbcode_target(_kind = fb_xplat_cxx_binary,
name = "vulkan_gpuinfo",
srcs = glob([
"**/*.cpp",
Expand Down Expand Up @@ -56,3 +57,55 @@ fb_xplat_cxx_binary(
"//xplat/folly:json",
],
)

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

load("@fbcode_macros//build_defs:native_rules.bzl", "buck_filegroup")
load("@fbsource//tools/build_defs:fb_xplat_cxx_binary.bzl", "fb_xplat_cxx_binary")
load(
"@fbsource//tools/build_defs:platform_defs.bzl",
"ANDROID",
)
load(
"@fbsource//xplat/executorch/backends/vulkan:targets.bzl",
"vulkan_spv_shader_lib",
)


fbcode_target(_kind = buck_filegroup,
name = "gpuinfo_shaders",
srcs = glob([
"glsl/*",
]),
visibility = [
"PUBLIC",
],
)

fbcode_target(_kind = vulkan_spv_shader_lib,
name = "gpuinfo_shader_lib",
is_fbcode = True,
spv_filegroups = {
":gpuinfo_shaders": "glsl",
},
)

fbcode_target(_kind = fb_xplat_cxx_binary,
name = "vulkan_gpuinfo",
srcs = glob([
"**/*.cpp",
]),
headers = glob([
"**/*.h",
]),
header_namespace = "/include",
include_directories = ["/include"],
platforms = ANDROID,
raw_headers = glob([
"**/*.h",
]),
deps = [
":gpuinfo_shader_lib",
"//executorch/backends/vulkan:vulkan_graph_runtime",
],
)
50 changes: 0 additions & 50 deletions backends/vulkan/tools/gpuinfo/TARGETS

This file was deleted.

Loading
Loading