Skip to content

Commit

Permalink
Prevent check fail in FFT
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 372031044
Change-Id: I50994e3e8a5d1342d01bde80256f6bf2730ca299
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed May 5, 2021
1 parent 1c56f53 commit 31bd502
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorflow/core/kernels/fft_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ class FFTCPU : public FFTBase {
input_slice_sizes[i] = fft_shape[i - 1];
temp_shape.AddDim(fft_shape[i - 1]);
}
OP_REQUIRES(ctx, temp_shape.num_elements() > 0,
errors::InvalidArgument("Obtained a FFT shape of 0 elements: ",
temp_shape.DebugString()));

auto output = out->flat_inner_dims<ComplexT, FFTRank + 1>();
const Eigen::DSizes<Eigen::DenseIndex, FFTRank + 1> zero_start_indices;
Expand Down

0 comments on commit 31bd502

Please sign in to comment.