Skip to content

Commit c68f5f1

Browse files
committed
Update on "[ET-VK] Dynamic shape support in Vulkan Backend"
## Context This changeset exposes API functions to the `ComputeGraph` class that allow inputs to be resized, and for the resizing to propagate through the graph via re-calculation of output shapes. Differential Revision: [D54754546](https://our.internmc.facebook.com/intern/diff/D54754546/) [ghstack-poisoned]
2 parents e6f395c + 027ee81 commit c68f5f1

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

backends/vulkan/targets.bzl

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def vulkan_spv_shader_lib(name, spv_filegroups, is_fbcode = False):
3737
srcs = [
3838
":{}[{}.cpp]".format(genrule_name, name),
3939
],
40+
define_static_target = False,
4041
# Static initialization is used to register shaders to the global shader registry,
4142
# therefore link_whole must be True to make sure unused symbols are not discarded.
4243
# @lint-ignore BUCKLINT: Avoid `link_whole=True`

examples/models/llama2/runner/targets.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def _get_operator_lib(aten = False):
66
elif runtime.is_oss:
77
return ["//executorch/kernels/portable:generated_lib"]
88
else:
9-
return ["//executorch/kernels/portable:generated_lib", "//executorch/examples/models/llama2/custom_ops:custom_ops", "//executorch/examples/models/llama2/ops:generated_lib"]
9+
return ["//executorch/configurations:optimized_native_cpu_ops", "//executorch/examples/models/llama2/custom_ops:custom_ops", "//executorch/examples/models/llama2/ops:generated_lib"]
1010

1111
def define_common_targets():
1212
for aten in (True, False):

kernels/portable/test/targets.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def define_common_targets():
88
"""
99
define_supported_features_lib()
1010

11-
op_test(name = "op_allclose_test", aten_compatible = False)
11+
op_test(name = "op_allclose_test")
1212
op_test(name = "op_div_test")
1313
op_test(name = "op_gelu_test")
1414
op_test(name = "op_mul_test")

kernels/test/targets.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22
load("@fbsource//xplat/executorch/kernels/test:util.bzl", "codegen_function_header_wrapper", "generated_op_test", "op_test")
33

4-
def _common_op_test(name, kernels, aten_compatible = True):
4+
def _common_op_test(name, kernels):
55
"""
66
Defines test targets in format of <kernel>_op_<op-name>_test
77
For ATen kernel testing, let's use portable functions.yaml for tested ops.
88
"""
99
for kernel in kernels:
1010
deps = [":function_header_wrapper_{}".format(kernel)]
11-
op_test(name, aten_compatible = aten_compatible, kernel_name = kernel, use_kernel_prefix = True, deps = deps)
11+
op_test(name, kernel_name = kernel, use_kernel_prefix = True, deps = deps)
1212

1313
def make_example_generated_op_test_target():
1414
"""

kernels/test/util.bzl

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_xplat")
22
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
33

4-
def op_test(name, deps = [], aten_compatible = True, kernel_name = "portable", use_kernel_prefix = False):
4+
def op_test(name, deps = [], kernel_name = "portable", use_kernel_prefix = False):
55
"""Defines a cxx_test() for an "op_*_test.cpp" file.
66
77
Args:
@@ -11,8 +11,6 @@ def op_test(name, deps = [], aten_compatible = True, kernel_name = "portable", u
1111
under //kernels/<kernel>/...; e.g., "op_add_test" will depend on
1212
"//kernels/portable/cpu:op_add".
1313
deps: Optional extra deps to add to the cxx_test().
14-
aten_compatible: If True, the operator under test is ATen-compatible
15-
(i.e., appears in `functions.yaml`).
1614
kernel_name: The name string as in //executorch/kernels/<kernel_name>.
1715
use_kernel_prefix: If True, the target name is
1816
<kernel>_op_<operator-group-name>_test. Used by common kernel testing.

0 commit comments

Comments
 (0)