From f4009f2cfa63cc3735704f29751bce9cd497ff2a Mon Sep 17 00:00:00 2001 From: Stephen Jia Date: Fri, 13 Jun 2025 13:05:46 -0700 Subject: [PATCH] [ET-VK][ez] Allow Vulkan operator tests to run on devserver and Mac Pull Request resolved: https://github.com/pytorch/executorch/pull/11648 ## 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. ghstack-source-id: 290331159 @exported-using-ghexport Differential Revision: [D76620647](https://our.internmc.facebook.com/intern/diff/D76620647/) --- backends/vulkan/test/op_tests/targets.bzl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backends/vulkan/test/op_tests/targets.bzl b/backends/vulkan/test/op_tests/targets.bzl index 9ea9611bb24..5c9afa40762 100644 --- a/backends/vulkan/test/op_tests/targets.bzl +++ b/backends/vulkan/test/op_tests/targets.bzl @@ -2,6 +2,10 @@ 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") +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(