Skip to content

Commit 4e98f5a

Browse files
committed
optimized/grid_sampler_2d: rename fp16_hw buck lib to avoid op_ prefix
Buck's op_registration_util._enforce_deps rejects any dep starting with `:op_` on the theory that op_targets should not depend on other op_targets. The previously-named `:op_grid_sampler_2d_fp16_hw` tripped that check when op_grid_sampler_2d (which is an op_target) declared it as a dep. Rename the internal helper library to `grid_sampler_2d_fp16_hw_impl`, matching the existing `add_sub_impl` / `binary_ops` naming for op-specific implementation helpers. No change to file contents, CMake, or the C++ dispatch — only the Buck target name and the corresponding dep reference.
1 parent 53697e9 commit 4e98f5a

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

kernels/optimized/cpu/targets.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ def define_common_targets():
8080
# must be a separate translation unit — op_grid_sampler_2d.cpp (the
8181
# runtime dispatcher) remains on plain ARMv8 and only calls into this
8282
# after cpuinfo_has_arm_neon_fp16() reports true. Scoped compile flag
83-
# stays local to this library.
83+
# stays local to this library. Named without the "op_" prefix so the
84+
# op_registration_util dependency check (which forbids op_target ->
85+
# op_target edges) still lets op_grid_sampler_2d depend on it.
8486
runtime.cxx_library(
85-
name = "op_grid_sampler_2d_fp16_hw",
87+
name = "grid_sampler_2d_fp16_hw_impl",
8688
srcs = ["op_grid_sampler_2d_fp16_hw.cpp"],
8789
visibility = ["PUBLIC"],
8890
compiler_flags = select({

shim_et/xplat/executorch/kernels/optimized/op_registration_util.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,10 @@ OPTIMIZED_ATEN_OPS = (
224224
# Hardware fp16 path lives in a separate translation unit so the
225225
# ARMv8.2-a+fp16 compile flag can be scoped locally. A runtime
226226
# cpuinfo_has_arm_neon_fp16() check in op_grid_sampler_2d.cpp
227-
# picks between it and the software-convert fp16 path.
228-
":op_grid_sampler_2d_fp16_hw",
227+
# picks between it and the software-convert fp16 path. Named
228+
# without the "op_" prefix so _enforce_deps doesn't reject it
229+
# as an op_target-to-op_target edge.
230+
":grid_sampler_2d_fp16_hw_impl",
229231
"fbsource//third-party/cpuinfo:cpuinfo",
230232
"//executorch/runtime/core/portable_type/c10/c10:aten_headers_for_executorch",
231233
],

0 commit comments

Comments
 (0)