| 397 | } |
| 398 | |
| 399 | port::StatusOr<std::unique_ptr<dnn::RnnDescriptor>> |
| 400 | StreamExecutor::createRnnDescriptor( |
| 401 | int num_layers, int hidden_size, int input_size, int cell_size, |
| 402 | int batch_size, dnn::RnnInputMode input_mode, |
| 403 | dnn::RnnDirectionMode direction_mode, dnn::RnnMode rnn_mode, |
| 404 | dnn::DataType data_type, const dnn::AlgorithmConfig &algorithm_config, |
| 405 | float dropout, uint64 seed, ScratchAllocator *state_allocator, |
| 406 | bool use_padded_io) { |
| 407 | dnn::DnnSupport *dnn_support = AsDnn(); |
| 408 | if (!dnn_support) { |
| 409 | return port::Status(port::error::UNKNOWN, |
| 410 | "Fail to find the dnn implementation."); |
| 411 | } |
| 412 | return dnn_support->createRnnDescriptor( |
| 413 | num_layers, hidden_size, input_size, cell_size, batch_size, input_mode, |
| 414 | direction_mode, rnn_mode, data_type, algorithm_config, dropout, seed, |
| 415 | state_allocator, use_padded_io); |
| 416 | } |
| 417 | |
| 418 | port::StatusOr<std::unique_ptr<dnn::CtcLossDescriptor>> |
| 419 | StreamExecutor::createCtcLossDescriptor(dnn::DataType data_type) { |