diff --git a/tensorflow/core/kernels/cudnn_rnn_ops.cc b/tensorflow/core/kernels/cudnn_rnn_ops.cc index b9b96d3fc70fb2..a7a80e25f41036 100644 --- a/tensorflow/core/kernels/cudnn_rnn_ops.cc +++ b/tensorflow/core/kernels/cudnn_rnn_ops.cc @@ -508,7 +508,7 @@ struct CudnnRnnModelShapes { bool IsCompatibleWith(const CudnnRnnModelShapes& rhs) const { return num_layers == rhs.num_layers && input_size == rhs.input_size && num_units == rhs.num_units && dir_count == rhs.dir_count && - cell_num_units == rhs.cell_num_units; + cell_num_units == rhs.cell_num_units && max_seq_length == rhs.max_seq_length; } string DebugString() const { return strings::Printf( @@ -530,7 +530,7 @@ struct CudnnRnnConfigHasher { uint64 hash = HashList({shapes.num_layers, shapes.input_size, shapes.num_units, - shapes.dir_count, shapes.batch_size}); + shapes.dir_count, shapes.max_seq_length, shapes.batch_size}); if (algo_desc.has_value()) { hash = Hash64Combine(hash, algo_desc->hash()); }