From fdb297ca51527d26a161a8415a110797fdd8eeba Mon Sep 17 00:00:00 2001 From: Stephen Jia Date: Fri, 13 Jun 2025 12:50:18 -0700 Subject: [PATCH 1/2] [ET-VK][ez] Allow Vulkan operator tests to run on devserver and Mac ## Context https://github.com/pytorch/executorch/pull/11547 was landed recently which restricted vulkan operator tests to the `ANDROID` platform. Simply update to use the utility function `get_platforms()` so that the tests can run everywhere the vulkan delegate can be built. Differential Revision: [D76620647](https://our.internmc.facebook.com/intern/diff/D76620647/) [ghstack-poisoned] --- backends/vulkan/test/op_tests/targets.bzl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backends/vulkan/test/op_tests/targets.bzl b/backends/vulkan/test/op_tests/targets.bzl index 9ea9611bb24..413464a852f 100644 --- a/backends/vulkan/test/op_tests/targets.bzl +++ b/backends/vulkan/test/op_tests/targets.bzl @@ -1,7 +1,11 @@ -load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID") +load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "CXX") load("@fbsource//xplat/caffe2:pt_defs.bzl", "get_pt_ops_deps") load("@fbsource//xplat/caffe2:pt_ops.bzl", "pt_operator_library") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +load( + "@fbsource//xplat/executorch/backends/vulkan:targets.bzl", + "get_platforms", +) def define_test_targets(test_name, extra_deps = [], src_file = None, is_fbcode = False): deps_list = [ @@ -20,7 +24,7 @@ def define_test_targets(test_name, extra_deps = [], src_file = None, is_fbcode = compiler_flags = [ "-Wno-unused-variable", ], - platforms = [ANDROID], + platforms = get_platforms(), define_static_target = False, deps = deps_list, ) @@ -135,7 +139,7 @@ def define_common_targets(is_fbcode = False): "//executorch/backends/vulkan:vulkan_graph_runtime", runtime.external_dep_location("libtorch"), ], - platforms = [ANDROID], + platforms = get_platforms(), ) define_test_targets( From 135fe70cb22442f9c27027b26ebc027a522f5ff1 Mon Sep 17 00:00:00 2001 From: Stephen Jia Date: Fri, 13 Jun 2025 13:05:46 -0700 Subject: [PATCH 2/2] Update on "[ET-VK][ez] Allow Vulkan operator tests to run on devserver and Mac" ## Context https://github.com/pytorch/executorch/pull/11547 was landed recently which restricted vulkan operator tests to the `ANDROID` platform. Simply update to use the utility function `get_platforms()` so that the tests can run everywhere the vulkan delegate can be built. Differential Revision: [D76620647](https://our.internmc.facebook.com/intern/diff/D76620647/) cc manuelcandales cbilgin [ghstack-poisoned] --- backends/vulkan/test/op_tests/targets.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/vulkan/test/op_tests/targets.bzl b/backends/vulkan/test/op_tests/targets.bzl index 413464a852f..5c9afa40762 100644 --- a/backends/vulkan/test/op_tests/targets.bzl +++ b/backends/vulkan/test/op_tests/targets.bzl @@ -1,4 +1,4 @@ -load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "CXX") +load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID") load("@fbsource//xplat/caffe2:pt_defs.bzl", "get_pt_ops_deps") load("@fbsource//xplat/caffe2:pt_ops.bzl", "pt_operator_library") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")