Skip to content

Commit 7fa51a7

Browse files
authored
[ET-VK] Make libtorch optional in custom op test binaries
Differential Revision: D104456804 Pull Request resolved: #19402
1 parent c564936 commit 7fa51a7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

backends/vulkan/test/custom_ops/targets.bzl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ load(
66
"vulkan_spv_shader_lib",
77
)
88

9-
def define_custom_op_test_binary(custom_op_name, extra_deps = [], src_file = None):
9+
def define_custom_op_test_binary(custom_op_name, extra_deps = [], src_file = None, include_torch = False):
1010
deps_list = [
1111
":prototyping_utils",
1212
":operator_implementations",
1313
":custom_ops_shaderlib",
1414
"//executorch/backends/vulkan:vulkan_graph_runtime",
15-
runtime.external_dep_location("libtorch"),
16-
] + extra_deps
15+
] + ([runtime.external_dep_location("libtorch")] if include_torch else []) + extra_deps
1716

1817
src_file_str = src_file if src_file else "{}.cpp".format(custom_op_name)
1918

0 commit comments

Comments
 (0)