Skip to content

Commit 0131f33

Browse files
mcremon-metafacebook-github-bot
authored andcommitted
Rename reference to generic and unify namespaces
Summary: As titled, those operators are generic implementations of the custom ops we use, they're not reference implementations (in the numerical sense). Make the change to reflect that. Reviewed By: hsharma35 Differential Revision: D82231105
1 parent b23f883 commit 0131f33

File tree

132 files changed

+171
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+171
-380
lines changed

backends/cadence/aot/TARGETS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ executorch_generated_lib(
143143
platforms = CXX,
144144
visibility = ["PUBLIC"],
145145
deps = [
146-
"//executorch/backends/cadence/reference/kernels:cadence_kernels",
147-
"//executorch/backends/cadence/reference/operators:cadence_cpu_ops",
146+
"//executorch/backends/cadence/generic/kernels:cadence_kernels",
147+
"//executorch/backends/cadence/generic/operators:cadence_generic_ops",
148148
"//executorch/kernels/portable:executorch_all_ops",
149149
"//executorch/kernels/portable:operators",
150150
],

backends/cadence/aot/functions.yaml

Lines changed: 42 additions & 42 deletions
Large diffs are not rendered by default.

backends/cadence/fusion_g3/operators/op_add.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ using ::executorch::runtime::canCast;
2424
using ::executorch::runtime::Error;
2525
using ::executorch::runtime::KernelRuntimeContext;
2626

27-
namespace cadence {
2827
namespace impl {
2928
namespace G3 {
3029
namespace native {
@@ -368,4 +367,3 @@ Tensor& add_scalar_out(
368367
} // namespace native
369368
} // namespace G3
370369
} // namespace impl
371-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_cat.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ using ::executorch::runtime::KernelRuntimeContext;
2929
* operator need to be updated accordingly
3030
*/
3131

32-
namespace cadence {
3332
namespace impl {
3433
namespace G3 {
3534
namespace native {
@@ -170,4 +169,3 @@ Tensor& cat_out(
170169
} // namespace native
171170
} // namespace G3
172171
} // namespace impl
173-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_clamp.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ using ::executorch::runtime::Error;
2929
using ::executorch::runtime::KernelRuntimeContext;
3030
using std::optional;
3131

32-
namespace cadence {
3332
namespace impl {
3433
namespace G3 {
3534
namespace native {
@@ -663,4 +662,3 @@ Tensor& clamp_Tensor_out(
663662
} // namespace native
664663
} // namespace G3
665664
} // namespace impl
666-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_dequantize.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ enum datatype { Bits4u = 21, Bits4 = 22 };
3636
/**
3737
* For an input tensor, use the scale and zero_point arguments to quantize it.
3838
*/
39-
namespace cadence {
4039
namespace impl {
4140
namespace G3 {
4241
namespace native {
@@ -784,4 +783,3 @@ Tensor& dequantize_per_token_out(
784783
} // namespace native
785784
} // namespace G3
786785
} // namespace impl
787-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_div.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ using ::executorch::runtime::KernelRuntimeContext;
2828
using std::optional;
2929
using std::string_view;
3030

31-
namespace cadence {
3231
namespace impl {
3332
namespace G3 {
3433
namespace native {
@@ -686,4 +685,3 @@ Tensor& div_scalar_mode_out(
686685
} // namespace native
687686
} // namespace G3
688687
} // namespace impl
689-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_exp.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ using ::executorch::aten::Tensor;
2121
using ::executorch::runtime::Error;
2222
using ::executorch::runtime::KernelRuntimeContext;
2323

24-
namespace cadence {
2524
namespace impl {
2625
namespace G3 {
2726
namespace native {
@@ -67,4 +66,3 @@ Tensor& exp_out(KernelRuntimeContext& ctx, const Tensor& in, Tensor& out) {
6766
} // namespace native
6867
} // namespace G3
6968
} // namespace impl
70-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_hardtanh.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ using ::executorch::runtime::KernelRuntimeContext;
2525
using ::torch::executor::native::utils::extract_scalar;
2626
using ::torch::executor::native::utils::get_scalar_dtype;
2727

28-
namespace cadence {
2928
namespace impl {
3029
namespace G3 {
3130
namespace native {
@@ -113,4 +112,3 @@ Tensor& hardtanh_out(
113112
} // namespace native
114113
} // namespace G3
115114
} // namespace impl
116-
} // namespace cadence

backends/cadence/fusion_g3/operators/op_lt.cpp

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

22-
namespace cadence {
2322
namespace impl {
2423
namespace G3 {
2524
namespace native {
@@ -198,4 +197,3 @@ Tensor& lt_Scalar_out(
198197
} // namespace native
199198
} // namespace G3
200199
} // namespace impl
201-
} // namespace cadence

0 commit comments

Comments
 (0)