Skip to content

Commit 097ec64

Browse files
hsharma35meta-codesync[bot]
authored andcommitted
Use xt macros to capture errors returned by nnlib calls (#15259)
Summary: Pull Request resolved: #15259 This diff implements the use of xt macros to capture errors returned by nnlib calls in the Cadence backend operators. Differential Revision: D83355891
1 parent 9152f0a commit 097ec64

27 files changed

+49
-31
lines changed

backends/cadence/fusion_g3/operators/op_add.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <xa_nnlib_kernels_api.h>
1212

13-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
13+
#include <executorch/backends/cadence/common/xt_macros.h>
1414
#include <executorch/kernels/portable/cpu/scalar_utils.h>
1515
#include <executorch/kernels/portable/cpu/util/elementwise_util.h>
1616
#include <executorch/kernels/portable/cpu/util/kernel_ops_util.h>

backends/cadence/fusion_g3/operators/op_cat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <xa_nnlib_kernels_api.h>
1515

16-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
16+
#include <executorch/backends/cadence/common/xt_macros.h>
1717
#include <executorch/kernels/portable/cpu/util/copy_ops_util.h>
1818
#include <executorch/runtime/kernel/kernel_includes.h>
1919

backends/cadence/fusion_g3/operators/op_clamp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include <xa_nnlib_kernels_api.h>
1717

18-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
18+
#include <executorch/backends/cadence/common/xt_macros.h>
1919
#include <executorch/kernels/portable/cpu/scalar_utils.h>
2020
#include <executorch/kernels/portable/cpu/util/elementwise_util.h>
2121
#include <executorch/kernels/portable/cpu/util/math_util.h>

backends/cadence/fusion_g3/operators/op_dequantize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <xa_nnlib_kernels_api.h>
1616

17-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
17+
#include <executorch/backends/cadence/common/xt_macros.h>
1818
#include <executorch/kernels/portable/cpu/util/reduce_util.h>
1919
#include <executorch/runtime/kernel/kernel_includes.h>
2020

backends/cadence/fusion_g3/operators/op_div.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <xa_nnlib_kernels_api.h>
1414

15-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
15+
#include <executorch/backends/cadence/common/xt_macros.h>
1616
#include <executorch/kernels/portable/cpu/scalar_utils.h>
1717
#include <executorch/kernels/portable/cpu/util/elementwise_util.h>
1818
#include <executorch/kernels/portable/cpu/util/math_util.h>

backends/cadence/fusion_g3/operators/op_exp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <xa_nnlib_kernels_api.h>
1414

15-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
15+
#include <executorch/backends/cadence/common/xt_macros.h>
1616
#include <executorch/kernels/portable/cpu/pattern/pattern.h>
1717
#include <executorch/runtime/kernel/kernel_includes.h>
1818

backends/cadence/fusion_g3/operators/op_hardtanh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <xa_nnlib_kernels_api.h>
1313

14-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
14+
#include <executorch/backends/cadence/common/xt_macros.h>
1515
#include <executorch/kernels/portable/cpu/scalar_utils.h>
1616
#include <executorch/kernels/portable/cpu/util/functional_util.h>
1717
#include <executorch/kernels/portable/cpu/util/math_util.h>

backends/cadence/fusion_g3/operators/op_lt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <xa_nnlib_kernels_api.h>
1212

13-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
13+
#include <executorch/backends/cadence/common/xt_macros.h>
1414
#include <executorch/kernels/portable/cpu/pattern/comparison_op.h>
1515

1616
using ::executorch::aten::Scalar;

backends/cadence/fusion_g3/operators/op_mean.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <xa_nnlib_kernels_api.h>
1212

13-
#include <executorch/backends/cadence/fusion_g3/operators/xt_macros.h>
13+
#include <executorch/backends/cadence/common/xt_macros.h>
1414
#include <executorch/kernels/portable/cpu/util/kernel_ops_util.h>
1515
#include <executorch/kernels/portable/cpu/util/reduce_util.h>
1616
#include <executorch/runtime/kernel/kernel_includes.h>

0 commit comments

Comments
 (0)