Skip to content

Commit

Permalink
Do not define static target for vulkan_backend_lib (pytorch#2042)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#2042

## Context

Fixes an internal CI breakage. The problem was the following:

* the `runtime.cxx_library()` wrapper has an arg `define_static_target` which is default `True`
* This will define a static version of the target with the name `vulkan_backend_lib_static`
* The static target dependencies with the `_static` suffix depending on [this logic](https://fburl.com/code/wz7kn4i4)
* Since `//caffe2:torch_vulkan_graph` is begins with `//caffe2`, it will be patched. However, there is no `"//caffe2:torch_vulkan_graph_static"` defined.

For now, disable defining a static target for `vulkan_backend_lib` to fix CI. Will need to think about the best/cleanest way to handle this - ideally there can be more fine-grained control over what dependencies should be patched.

Reviewed By: larryliu0820

Differential Revision: D54073762

fbshipit-source-id: e85d212637773cf77cfa7ee6f5ff2d8c243ee02d
  • Loading branch information
SS-JIA authored and facebook-github-bot committed Feb 22, 2024
1 parent 7e43846 commit d98741c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backends/vulkan/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def define_common_targets():
"//caffe2:torch_vulkan_graph",
"//executorch/runtime/backend:interface",
],
define_static_target = False,
# VulkanBackend.cpp needs to compile with executor as whole
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
link_whole = True,
Expand Down

0 comments on commit d98741c

Please sign in to comment.