Skip to content

Commit

Permalink
resolve XT_KERNEL_CHECK header file and BUCK dep (#7529)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #7529

Apply buck fix to Cadence's diff. Also resolved duplicate work internally

Differential Revision: D67875050
  • Loading branch information
zonglinpeng authored and facebook-github-bot committed Jan 6, 2025
1 parent 200c48a commit 3f24db5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
6 changes: 3 additions & 3 deletions backends/cadence/fusion_g3/operators/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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/...",
],
Expand Down
21 changes: 11 additions & 10 deletions backends/cadence/fusion_g3/operators/tensor_util.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
/*
* 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 <executorch/runtime/core/exec_aten/util/tensor_util.h>

#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__ ")");
"Failed to run kernel: " #kernel "(" #__VA_ARGS__ ")");
20 changes: 0 additions & 20 deletions backends/cadence/fusion_g3/operators/xt_macros.h

This file was deleted.

0 comments on commit 3f24db5

Please sign in to comment.