Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions backends/cadence/common/xt_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@

#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__ ")"); \
#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__ \
"). Returned code %d", \
static_cast<int>(ret)); \
}
Loading