Skip to content

Commit a71965b

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
use short lib path, XT libs, lint (#7898)
Summary: Pull Request resolved: #7898 titled, will combine with stacked resolve build-jarvis-xtensa-dsp error in previous diff https://www.internalfb.com/sandcastle/workflow/2612087783880687743 Reviewed By: hsharma35 Differential Revision: D68457025
1 parent 5bebc81 commit a71965b

File tree

8 files changed

+239
-303
lines changed

8 files changed

+239
-303
lines changed

backends/cadence/hifi/kernels/targets.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ load("@fbsource//tools/build_defs:platform_defs.bzl", "CXX")
22
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
33

44
def define_common_targets():
5+
common_deps = [
6+
"//executorch/runtime/kernel:kernel_includes",
7+
]
8+
59
runtime.cxx_library(
610
name = "kernels",
711
srcs = ["kernels.cpp"],
812
exported_headers = [
913
"kernels.h",
1014
],
15+
deps = common_deps,
1116
visibility = [
1217
"//executorch/backends/cadence/...",
1318
],

backends/cadence/hifi/operators/op_atan2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9-
#include <cmath>
109
#include <executorch/backends/cadence/hifi/kernels/kernels.h>
1110
#include <executorch/kernels/portable/cpu/util/broadcast_util.h>
1211
#include <executorch/kernels/portable/cpu/util/elementwise_util.h>
1312
#include <executorch/runtime/kernel/kernel_includes.h>
14-
13+
#include <cmath>
1514

1615
using executorch::aten::ScalarType;
1716
using executorch::aten::Tensor;

backends/cadence/hifi/operators/op_permute_copy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ Tensor& permute_copy_out(
9393
WORD32 p_permute_vec[kNnlibMaxDim];
9494

9595
for (int i = 0; i < num_inp_dims; i++) {
96-
p_inp_shape[i] = in.size(i);
97-
p_out_shape[i] = in.size(dims[i]);
98-
p_permute_vec[i] = dims[i];
96+
p_inp_shape[i] = in.size(i);
97+
p_out_shape[i] = in.size(dims[i]);
98+
p_permute_vec[i] = dims[i];
9999
}
100100

101101
if (in_type == ScalarType::Float) {

backends/cadence/hifi/operators/op_where.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace impl {
2828
namespace HiFi {
2929
namespace native {
3030

31-
Tensor& where_out(
31+
Tensor& where_self_out(
3232
RuntimeContext& ctx,
3333
const Tensor& cond,
3434
const Tensor& a,

backends/cadence/hifi/third-party/nnlib/xa_nn_elm_clamp_f32_broadcast.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@
1919
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2020
2121
******************************************************************************/
22-
#include "nnlib-hifi4/xa_nnlib/include/xa_type_def.h"
23-
#include "nnlib-hifi4/xa_nnlib/algo/common/include/xa_nnlib_common_fpu.h"
24-
#include "nnlib-hifi4/xa_nnlib/algo/common/include/xa_nn_common.h"
25-
#include "nnlib-hifi4/xa_nnlib/algo/common/include/xa_nnlib_err_chk.h"
26-
#include "nnlib-hifi4/xa_nnlib/algo/kernels/basic/hifi4/xa_nn_basic_state.h"
27-
#include "nnlib-hifi4/xa_nnlib/include/nnlib/xa_nnlib_kernels_api.h"
22+
#include "xa_type_def.h"
23+
#include "xa_nnlib_common_fpu.h"
24+
#include "xa_nn_common.h"
25+
#include "xa_nnlib_err_chk.h"
26+
#include "xa_nnlib_kernels_api.h"
2827

2928

3029
#if !HAVE_VFPU

backends/cadence/hifi/third-party/nnlib/xa_nn_elm_minimum_maximum_f32.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,4 +843,3 @@ WORD32 xa_nn_elm_minimum_broadcast_4D_f32xf32_f32(FLOAT32 * __restrict__ p_out,
843843
}
844844

845845
#endif
846-

0 commit comments

Comments
 (0)