diff --git a/backends/cadence/fusion_g3/operators/op_mean.cpp b/backends/cadence/fusion_g3/operators/op_mean.cpp index 74dbb68924..873dee324b 100644 --- a/backends/cadence/fusion_g3/operators/op_mean.cpp +++ b/backends/cadence/fusion_g3/operators/op_mean.cpp @@ -55,7 +55,7 @@ int prepare_data( return num_axis_dims; } -Tensor& mean_dim_out( +Tensor& mean_out( KernelRuntimeContext& ctx, const Tensor& in, exec_aten::optional> dim_list, @@ -189,4 +189,4 @@ Tensor& mean_dim_out( } // namespace native } // namespace G3 } // namespace impl -} // namespace cadence \ No newline at end of file +} // namespace cadence diff --git a/backends/cadence/fusion_g3/operators/targets.bzl b/backends/cadence/fusion_g3/operators/targets.bzl index 1d8f96cf86..fb96a9ac87 100644 --- a/backends/cadence/fusion_g3/operators/targets.bzl +++ b/backends/cadence/fusion_g3/operators/targets.bzl @@ -27,7 +27,7 @@ def define_operator(name: str, deps: list[str] | None = None) -> None: deps = deps + common_deps, exported_deps = [ ":operators_header", - ":xt_macros", + ":tensor_util", ], ) @@ -69,8 +69,8 @@ def define_common_targets(): ) runtime.cxx_library( - name = "xt_macros", - exported_headers = ["xt_macros.h"], + name = "tensor_util", + exported_headers = ["tensor_util.h"], visibility = [ "//executorch/backends/cadence/...", ], diff --git a/backends/cadence/fusion_g3/operators/tensor_util.h b/backends/cadence/fusion_g3/operators/tensor_util.h index 42ccae9816..4ab99380a2 100644 --- a/backends/cadence/fusion_g3/operators/tensor_util.h +++ b/backends/cadence/fusion_g3/operators/tensor_util.h @@ -1,14 +1,15 @@ /* -* Copyright (c) Meta Platforms, Inc. and affiliates. -* All rights reserved. -* -* This source code is licensed under the BSD-style license found in the -* LICENSE file in the root directory of this source tree. -*/ - - + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + #pragma once - + +#include + #define XT_KERNEL_CHECK(ctx, out, kernel, ...) \ const auto ret = kernel(__VA_ARGS__); \ ET_KERNEL_CHECK_MSG( \ @@ -16,4 +17,4 @@ ret == 0, \ InvalidArgument, \ out, \ - "Failed to run kernel: " #kernel "(" #__VA_ARGS__ ")"); \ No newline at end of file + "Failed to run kernel: " #kernel "(" #__VA_ARGS__ ")"); diff --git a/backends/cadence/fusion_g3/operators/xt_macros.h b/backends/cadence/fusion_g3/operators/xt_macros.h deleted file mode 100644 index 4ab99380a2..0000000000 --- a/backends/cadence/fusion_g3/operators/xt_macros.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. - */ - -#pragma once - -#include - -#define XT_KERNEL_CHECK(ctx, out, kernel, ...) \ - const auto ret = kernel(__VA_ARGS__); \ - ET_KERNEL_CHECK_MSG( \ - ctx, \ - ret == 0, \ - InvalidArgument, \ - out, \ - "Failed to run kernel: " #kernel "(" #__VA_ARGS__ ")");