Skip to content

Commit 7a25939

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
resolve XT_KERNEL_CHECK header file and BUCK dep (#7529)
Summary: Pull Request resolved: #7529 - Apply buck fix to Cadence's diff. - resolved duplicate work internally - fixed naming of mean Reviewed By: hsharma35 Differential Revision: D67875050
1 parent c430cc2 commit 7a25939

File tree

4 files changed

+16
-35
lines changed

4 files changed

+16
-35
lines changed

backends/cadence/fusion_g3/operators/op_mean.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int prepare_data(
5555
return num_axis_dims;
5656
}
5757

58-
Tensor& mean_dim_out(
58+
Tensor& mean_out(
5959
KernelRuntimeContext& ctx,
6060
const Tensor& in,
6161
exec_aten::optional<exec_aten::ArrayRef<int64_t>> dim_list,
@@ -189,4 +189,4 @@ Tensor& mean_dim_out(
189189
} // namespace native
190190
} // namespace G3
191191
} // namespace impl
192-
} // namespace cadence
192+
} // namespace cadence

backends/cadence/fusion_g3/operators/targets.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def define_operator(name: str, deps: list[str] | None = None) -> None:
2727
deps = deps + common_deps,
2828
exported_deps = [
2929
":operators_header",
30-
":xt_macros",
30+
":tensor_util",
3131
],
3232
)
3333

@@ -69,8 +69,8 @@ def define_common_targets():
6969
)
7070

7171
runtime.cxx_library(
72-
name = "xt_macros",
73-
exported_headers = ["xt_macros.h"],
72+
name = "tensor_util",
73+
exported_headers = ["tensor_util.h"],
7474
visibility = [
7575
"//executorch/backends/cadence/...",
7676
],
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
/*
2-
* Copyright (c) Meta Platforms, Inc. and affiliates.
3-
* All rights reserved.
4-
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree.
7-
*/
8-
9-
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
109
#pragma once
11-
10+
11+
#include <executorch/runtime/core/exec_aten/util/tensor_util.h>
12+
1213
#define XT_KERNEL_CHECK(ctx, out, kernel, ...) \
1314
const auto ret = kernel(__VA_ARGS__); \
1415
ET_KERNEL_CHECK_MSG( \
1516
ctx, \
1617
ret == 0, \
1718
InvalidArgument, \
1819
out, \
19-
"Failed to run kernel: " #kernel "(" #__VA_ARGS__ ")");
20+
"Failed to run kernel: " #kernel "(" #__VA_ARGS__ ")");

backends/cadence/fusion_g3/operators/xt_macros.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)