Skip to content

Commit aeef01a

Browse files
Zonglin Pengmeta-codesync[bot]
authored andcommitted
phase 1 linkage
Differential Revision: D84639743
1 parent 6d7c4b2 commit aeef01a

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

backends/cadence/aot/functions_hifi.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,12 @@
472472
- func: cadence::im2row.out(Tensor input, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride, Tensor in_zero_point, bool channel_last=False, *, Tensor(a!) out) -> Tensor(a!)
473473
kernels:
474474
- arg_meta: null
475-
kernel_name: cadence::impl::HiFi::im2row_out
475+
kernel_name: impl::HiFi::native::im2row_out
476+
477+
- func: cadence::im2row.per_tensor_out(Tensor input, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride, int in_zero_point, bool channel_last=False, *, Tensor(a!) out) -> Tensor(a!)
478+
kernels:
479+
- arg_meta: null
480+
kernel_name: impl::HiFi::native::im2row_per_tensor_out
476481

477482
- func: cadence::quantized_linear_asym8sxasym8s_asym8s.per_tensor_out(Tensor src, Tensor weight, Tensor bias, int src_zero_point, int weight_zero_point, int out_multiplier, int out_shift, int out_zero_point, Tensor? offset, *, Tensor(a!) out) -> Tensor(a!)
478483
kernels:

backends/cadence/hifi/operators/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include(${EXECUTORCH_ROOT}/tools/cmake/Codegen.cmake)
1616

1717
# ATen compliant ops that are needed to run this model.
1818
set(_aten_ops__srcs
19-
"${EXECUTORCH_ROOT}/backends/cadence/hifi/operators/im2row_out.cpp"
19+
"${EXECUTORCH_ROOT}/backends/cadence/hifi/operators/op_im2row_out.cpp"
2020
"${EXECUTORCH_ROOT}/backends/cadence/hifi/operators/op_add.cpp"
2121
"${EXECUTORCH_ROOT}/backends/cadence/hifi/operators/op_atan2.cpp"
2222
"${EXECUTORCH_ROOT}/backends/cadence/hifi/operators/op_bitwise_and.cpp"

backends/cadence/hifi/operators/im2row_out.cpp renamed to backends/cadence/hifi/operators/op_im2row_out.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ using ::executorch::aten::ScalarType;
1919
using ::executorch::aten::Tensor;
2020
using ::executorch::runtime::KernelRuntimeContext;
2121

22-
namespace cadence {
2322
namespace impl {
2423
namespace HiFi {
2524
namespace native {
@@ -172,7 +171,7 @@ void im2row_out(
172171
optimized = true;
173172

174173
if (!optimized) {
175-
WORD8* ptr1 = (WORD8*)kernels::allocate_temp_memory(
174+
WORD8* ptr1 = (WORD8*)::impl::HiFi::kernels::allocate_temp_memory(
176175
ctx, ((batch_size * in_c * in_h * in_w) + 8) * sizeof(WORD8));
177176

178177
WORD8* pin = (WORD8*)ALIGN_PTR(ptr1, 8);
@@ -325,7 +324,7 @@ void im2row_per_tensor_out(
325324
optimized = true;
326325

327326
if (!optimized) {
328-
WORD8* ptr1 = (WORD8*)kernels::allocate_temp_memory(
327+
WORD8* ptr1 = (WORD8*)::impl::HiFi::kernels::allocate_temp_memory(
329328
ctx, ((batch_size * in_c * in_h * in_w) + 8) * sizeof(WORD8));
330329

331330
WORD8* pin = (WORD8*)ALIGN_PTR(ptr1, 8);
@@ -428,4 +427,3 @@ void im2row_per_tensor_out(
428427
} // namespace native
429428
} // namespace HiFi
430429
} // namespace impl
431-
} // namespace cadence

backends/cadence/hifi/operators/targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ OPERATORS = [
5353
"ge",
5454
"gt",
5555
"hardtanh",
56+
"im2row_out",
5657
"le",
5758
"lt",
5859
"masked_fill",

0 commit comments

Comments
 (0)