Skip to content

Commit 02817c0

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
link bmm, mm, view_copy, slice_copy, split_with_sizes_copy to jarvis
Summary: titled Differential Revision: D73514531
1 parent 2aea989 commit 02817c0

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

backends/cadence/hifi/operators/op_bmm.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ using exec_aten::ScalarType;
1616
using executorch::runtime::KernelRuntimeContext;
1717
using executorch::runtime::kTensorDimensionLimit;
1818
using executorch::runtime::resize_tensor;
19-
using executorch::runtime::tensors_have_same_dim_order;
2019
using executorch::runtime::tensor_is_default_dim_order;
20+
using executorch::runtime::tensors_have_same_dim_order;
2121
using torch::executor::check_bmm_args;
2222
using torch::executor::Error;
2323
using torch::executor::get_bmm_out_target_size;
@@ -78,16 +78,16 @@ Tensor& bmm_out(
7878
WORD32 out_stride = p;
7979

8080
WORD32* __restrict__ tmp =
81-
(WORD32* __restrict__)kernels::allocate_temp_memory(
82-
ctx, (batch_size * m * p) * sizeof(float));
81+
(WORD32* __restrict__)kernels::allocate_temp_memory(
82+
ctx, (batch_size * m * p) * sizeof(float));
8383

8484
ET_KERNEL_CHECK(ctx, tmp != nullptr, MemoryAllocationFailed, out);
8585

8686
tmp[batch_size * m * p] = {0};
8787

8888
WORD32* __restrict__ p_o =
89-
(WORD32* __restrict__)kernels::allocate_temp_memory(
90-
ctx, (batch_size * m * p) * sizeof(WORD32));
89+
(WORD32* __restrict__)kernels::allocate_temp_memory(
90+
ctx, (batch_size * m * p) * sizeof(WORD32));
9191

9292
ET_KERNEL_CHECK(ctx, p_o != nullptr, MemoryAllocationFailed, out);
9393

backends/cadence/hifi/operators/op_mm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ Tensor& mm_out(
7676
WORD32 out_stride = p;
7777

7878
WORD32* __restrict__ p_o =
79-
(WORD32* __restrict__)kernels::allocate_temp_memory(
80-
ctx, (n * p) * sizeof(WORD32));
79+
(WORD32* __restrict__)kernels::allocate_temp_memory(
80+
ctx, (n * p) * sizeof(WORD32));
8181

8282
WORD32 p_inp_shape[2];
8383
p_inp_shape[0] = n;

backends/cadence/hifi/operators/op_view_copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include <executorch/runtime/kernel/kernel_includes.h>
1414

1515
using executorch::runtime::resize_tensor;
16-
using executorch::runtime::tensors_have_same_dim_order;
1716
using executorch::runtime::tensor_is_default_dim_order;
17+
using executorch::runtime::tensors_have_same_dim_order;
1818
using torch::executor::check_view_copy_args;
1919
using torch::executor::Error;
2020
using torch::executor::get_view_copy_target_size;

backends/cadence/hifi/operators/targets.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ def define_operator(name: str, deps: list[str] | None = None) -> None:
3434
OPERATORS = [
3535
"add",
3636
"atan2",
37+
"bmm",
38+
"mm",
39+
"slice_copy",
40+
"split_with_sizes_copy",
41+
"view_copy",
3742
"cat",
3843
"clamp",
3944
"dequantize_per_tensor",

0 commit comments

Comments
 (0)