diff options
author | James Qin <jamesqin@google.com> | 2018-04-06 11:56:08 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-06 12:00:45 -0700 |
commit | 4f7943f7358fc69af62dc280c6f6ba549ebe2167 (patch) | |
tree | 19bdd3dddebeb7d26f9685328d0598bb58347bc0 /tensorflow/stream_executor/stream.cc | |
parent | f15c117c4f4d51a6660bf14b6d6cf73c52692cfb (diff) |
Support RNN profiling in StreamExecutor for CUDA GPUs.
This change hasn't applied autotune on TF Cudnn kernels, only provides lower level support.
PiperOrigin-RevId: 191919566
Diffstat (limited to 'tensorflow/stream_executor/stream.cc')
-rw-r--r-- | tensorflow/stream_executor/stream.cc | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/tensorflow/stream_executor/stream.cc b/tensorflow/stream_executor/stream.cc index 1e3afde268..fe498507a8 100644 --- a/tensorflow/stream_executor/stream.cc +++ b/tensorflow/stream_executor/stream.cc @@ -4795,7 +4795,8 @@ Stream &Stream::ThenRnnForward( const dnn::RnnStateTensorDescriptor &output_c_desc, DeviceMemory<Eigen::half> *output_c_data, bool is_training, ScratchAllocator *reserve_space_allocator, - ScratchAllocator *workspace_allocator) { + ScratchAllocator *workspace_allocator, + dnn::ProfileResult *output_profile_result) { // TODO(zhengxq): add VLOG PARAM calls. if (ok()) { if (dnn::DnnSupport *dnn = parent_->AsDnn()) { @@ -4803,7 +4804,8 @@ Stream &Stream::ThenRnnForward( this, rnn_desc, input_desc, input_data, input_h_desc, input_h_data, input_c_desc, input_c_data, params, output_desc, output_data, output_h_desc, output_h_data, output_c_desc, output_c_data, - is_training, reserve_space_allocator, workspace_allocator)); + is_training, reserve_space_allocator, workspace_allocator, + output_profile_result)); } else { SetError(); LOG(WARNING) << "Attempting to call ThenRnnForward without DNN support"; @@ -4827,7 +4829,8 @@ Stream &Stream::ThenRnnForward( const dnn::RnnStateTensorDescriptor &output_c_desc, DeviceMemory<float> *output_c_data, bool is_training, ScratchAllocator *reserve_space_allocator, - ScratchAllocator *workspace_allocator) { + ScratchAllocator *workspace_allocator, + dnn::ProfileResult *output_profile_result) { // TODO(zhengxq): add VLOG PARAM calls. if (ok()) { if (dnn::DnnSupport *dnn = parent_->AsDnn()) { @@ -4835,7 +4838,8 @@ Stream &Stream::ThenRnnForward( this, rnn_desc, input_desc, input_data, input_h_desc, input_h_data, input_c_desc, input_c_data, params, output_desc, output_data, output_h_desc, output_h_data, output_c_desc, output_c_data, - is_training, reserve_space_allocator, workspace_allocator)); + is_training, reserve_space_allocator, workspace_allocator, + output_profile_result)); } else { SetError(); LOG(WARNING) << "Attempting to call ThenRnnForward without DNN support"; @@ -4860,7 +4864,8 @@ Stream &Stream::ThenRnnForward( const dnn::RnnStateTensorDescriptor &output_c_desc, DeviceMemory<double> *output_c_data, bool is_training, ScratchAllocator *reserve_space_allocator, - ScratchAllocator *workspace_allocator) { + ScratchAllocator *workspace_allocator, + dnn::ProfileResult *output_profile_result) { // TODO(zhengxq): add VLOG PARAM calls. if (ok()) { if (dnn::DnnSupport *dnn = parent_->AsDnn()) { @@ -4868,7 +4873,8 @@ Stream &Stream::ThenRnnForward( this, rnn_desc, input_desc, input_data, input_h_desc, input_h_data, input_c_desc, input_c_data, params, output_desc, output_data, output_h_desc, output_h_data, output_c_desc, output_c_data, - is_training, reserve_space_allocator, workspace_allocator)); + is_training, reserve_space_allocator, workspace_allocator, + output_profile_result)); } else { SetError(); LOG(WARNING) << "Attempting to call ThenRnnForward without DNN support"; @@ -4900,7 +4906,8 @@ Stream &Stream::ThenRnnBackward( DeviceMemory<Eigen::half> *input_c_backprop_data, DeviceMemory<Eigen::half> *params_backprop_data, DeviceMemory<uint8> *reserve_space_data, - ScratchAllocator *workspace_allocator) { + ScratchAllocator *workspace_allocator, + dnn::ProfileResult *output_profile_result) { // TODO(zhengxq): add VLOG PARAM calls. if (ok()) { if (dnn::DnnSupport *dnn = parent_->AsDnn()) { @@ -4910,7 +4917,8 @@ Stream &Stream::ThenRnnBackward( output_h_desc, output_h_data, output_c_desc, output_c_data, output_backprop_data, output_h_backprop_data, output_c_backprop_data, input_backprop_data, input_h_backprop_data, input_c_backprop_data, - params_backprop_data, reserve_space_data, workspace_allocator)); + params_backprop_data, reserve_space_data, workspace_allocator, + output_profile_result)); } else { SetError(); LOG(WARNING) << "Attempting to call ThenRnnBackward without DNN support"; @@ -4941,7 +4949,8 @@ Stream &Stream::ThenRnnBackward( DeviceMemory<float> *input_c_backprop_data, DeviceMemory<float> *params_backprop_data, DeviceMemory<uint8> *reserve_space_data, - ScratchAllocator *workspace_allocator) { + ScratchAllocator *workspace_allocator, + dnn::ProfileResult *output_profile_result) { // TODO(zhengxq): add VLOG PARAM calls. if (ok()) { if (dnn::DnnSupport *dnn = parent_->AsDnn()) { @@ -4951,7 +4960,8 @@ Stream &Stream::ThenRnnBackward( output_h_desc, output_h_data, output_c_desc, output_c_data, output_backprop_data, output_h_backprop_data, output_c_backprop_data, input_backprop_data, input_h_backprop_data, input_c_backprop_data, - params_backprop_data, reserve_space_data, workspace_allocator)); + params_backprop_data, reserve_space_data, workspace_allocator, + output_profile_result)); } else { SetError(); LOG(WARNING) << "Attempting to call ThenRnnBackward without DNN support"; @@ -4983,7 +4993,8 @@ Stream &Stream::ThenRnnBackward( DeviceMemory<double> *input_c_backprop_data, DeviceMemory<double> *params_backprop_data, DeviceMemory<uint8> *reserve_space_data, - ScratchAllocator *workspace_allocator) { + ScratchAllocator *workspace_allocator, + dnn::ProfileResult *output_profile_result) { // TODO(zhengxq): add VLOG PARAM calls. if (ok()) { if (dnn::DnnSupport *dnn = parent_->AsDnn()) { @@ -4993,7 +5004,8 @@ Stream &Stream::ThenRnnBackward( output_h_desc, output_h_data, output_c_desc, output_c_data, output_backprop_data, output_h_backprop_data, output_c_backprop_data, input_backprop_data, input_h_backprop_data, input_c_backprop_data, - params_backprop_data, reserve_space_data, workspace_allocator)); + params_backprop_data, reserve_space_data, workspace_allocator, + output_profile_result)); } else { SetError(); LOG(WARNING) << "Attempting to call ThenRnnBackward without DNN support"; |