We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f41d81a commit 6014129Copy full SHA for 6014129
kernels/portable/cpu/op_view_as_real_copy.cpp
@@ -41,6 +41,14 @@ Tensor& view_as_real_copy_out(
41
42
// Get the output shape
43
Tensor::SizesType expected_output_size[kTensorDimensionLimit];
44
+ ET_KERNEL_CHECK_MSG(
45
+ ctx,
46
+ static_cast<size_t>(self.dim()) < kTensorDimensionLimit,
47
+ InvalidArgument,
48
+ out,
49
+ "Output size buffer is too small. Expected at least %zu, got %zu",
50
+ self.dim() + 1,
51
+ kTensorDimensionLimit);
52
get_view_as_real_copy_out_target_size(self, expected_output_size);
53
54
// Resize for dynamic shape
0 commit comments