Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNN padding support in tensorflow as MIopen already support RNN padding in rocm6.0 #2582

Open
Yihuki opened this issue Jul 14, 2024 · 0 comments
Labels
feature request New features yet supported by TF-ROCm stack

Comments

@Yihuki
Copy link

Yihuki commented Jul 14, 2024

Issue type

Feature Request

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

tf 2.17

Custom code

No

OS platform and distribution

Archlinux

Mobile device

No response

Python version

3.10

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

ROCm/MIOpen#2343 Already adds RNN padding into MIOpen, tensorflow need to add the padded io feature. As the RNN biLSTM or GRU still didn't allow padded input. It is easily to reproduce with keras ASR guide: https://keras.io/examples/audio/ctc_asr/ as it will report errors like
2 root error(s) found. (0) INVALID_ARGUMENT: ROCm MIOpen only supports packed input output. [[{{node DeepSpeech_2_1/bidirectional_1_1/forward_gru_1_1/CudnnRNNV3}}]] [[StatefulPartitionedCall/compile_loss/ctc_loss/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_int32_Squeeze_1/_114]] (1) INVALID_ARGUMENT: ROCm MIOpen only supports packed input output. [[{{node DeepSpeech_2_1/bidirectional_1_1/forward_gru_1_1/CudnnRNNV3}}]] 0 successful operations. 0 derived errors ignored. [Op:__inference_one_step_on_iterator_11812]

MIOpenSupport::CreateRnnDescriptor(
int num_layers, int hidden_size, int input_size, int cell_size,
int batch_size, dnn::RnnInputMode input_mode,
dnn::RnnDirectionMode direction_mode, dnn::RnnMode rnn_mode,
dnn::DataType data_type, const dnn::AlgorithmConfig& algorithm_config,
const NumericOptions& numeric_options, float dropout, uint64_t seed,
ScratchAllocator* state_allocator, bool use_padded_io) {
// ROCM TODO: batch_size is used in dynamic persistent RNN algorithm and is
// not supported by MIOpen now.
if (use_padded_io) {
return absl::InvalidArgumentError(
"ROCm MIOpen only supports packed input output.");
}

Standalone code to reproduce the issue

https://keras.io/examples/audio/ctc_asr/

Relevant log output

No response

@harkgill-amd harkgill-amd added the feature request New features yet supported by TF-ROCm stack label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New features yet supported by TF-ROCm stack
Projects
None yet
Development

No branches or pull requests

2 participants