From af6cdd63178d26a41ac0ead37f734285277a74b9 Mon Sep 17 00:00:00 2001 From: Chenyu Jiang <1155092088@link.cuhk.edu.hk> Date: Mon, 7 Dec 2020 11:33:29 +0800 Subject: [PATCH] Revert "Fix #41630: include max_seq_length in cudnn descriptor cache key" This reverts commit cc3e5a02d4f623a9ad23f0bc330a984ddabfa728. --- tensorflow/core/kernels/cudnn_rnn_ops.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tensorflow/core/kernels/cudnn_rnn_ops.cc b/tensorflow/core/kernels/cudnn_rnn_ops.cc index 1eeab78943033b..4a27394f289a29 100644 --- a/tensorflow/core/kernels/cudnn_rnn_ops.cc +++ b/tensorflow/core/kernels/cudnn_rnn_ops.cc @@ -500,9 +500,6 @@ struct CudnnRnnModelShapes { int max_seq_length; int batch_size; int cell_num_units = 0; - // If you add new field to this structure, please take care of - // updating IsCompatibleWith() below as well as the hash function in - // CudnnRnnConfigHasher. TensorShape input_shape; TensorShape output_shape; TensorShape hidden_state_shape; @@ -511,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 && max_seq_length == rhs.max_seq_length; + cell_num_units == rhs.cell_num_units; } string DebugString() const { return strings::Printf( @@ -533,7 +530,7 @@ struct CudnnRnnConfigHasher { uint64 hash = HashList({shapes.num_layers, shapes.input_size, shapes.num_units, - shapes.dir_count, shapes.max_seq_length, shapes.batch_size}); + shapes.dir_count, shapes.batch_size}); if (algo_desc.has_value()) { hash = Hash64Combine(hash, algo_desc->hash()); }