Skip to content

Commit d7dc6c5

Browse files
larryliu0820facebook-github-bot
authored andcommitted
Print actual numel in et_view
Summary: As titled Differential Revision: D73267294
1 parent 605bfa6 commit d7dc6c5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kernels/prim_ops/et_view.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ void et_view(KernelRuntimeContext& context, EValue** stack) {
9393
"Failed to resize output tensor.");
9494

9595
// Do some checks
96-
ET_KERNEL_CHECK(context, self.numel() == out.numel(), InvalidArgument, );
96+
ET_KERNEL_CHECK_MSG(
97+
context,
98+
self.numel() == out.numel(),
99+
InvalidArgument,
100+
"self.numel(): %" PRId64 ", out.numel(): %" PRId64,
101+
self.numel(),
102+
out.numel());
97103

98104
// Update data ptr
99105
ET_KERNEL_CHECK_MSG(

0 commit comments

Comments
 (0)