#16305 adds checks for TensorImpl and Storage pointer equality when a function modifies its input tensors (via inplace or out-variants) in VariableType functions. However, _cudnn_rnn_flatten_weight doesn't currently pass this check because it does in-place update into weight_arr that changes its internal tensors' TensorImpl or Storage pointer. We should investigate whether it's possible to fix this and make it also pass the pointer equality check.
cc @csarofeen @ptrblck @xwang233