Skip to content

[Cherry-pick] Support memory eager deletion on recurrent OP#19411

Merged
zhhsplendid merged 2 commits intoPaddlePaddle:release/1.5from
zhhsplendid:cherry_pick_rnn_op
Aug 30, 2019
Merged

[Cherry-pick] Support memory eager deletion on recurrent OP#19411
zhhsplendid merged 2 commits intoPaddlePaddle:release/1.5from
zhhsplendid:cherry_pick_rnn_op

Conversation

@zhhsplendid
Copy link
Copy Markdown
Member

This is pull request (#17710) on develop branch. It supports memory eager deletion on recurrent OP.

Test PaddingRNN on V100 GPU device.

Test configuration: large model, padding mode (which is the mode using recurrentOp), one GPU.

GPU memory (MiB): 6414 (this PR) vs 6837 (without this PR)
Speed (steps/s): 10.28 (this PR) vs 9.89 (without this PR)

Test PaddingRNN on V100 GPU device.

Test configuration: large model, padding mode (which is the mode using recurrentOp), one GPU.
                   
GPU memory (MiB):   6414 (this PR)     vs   6837 (without this PR)
Speed (steps/s):         10.28 (this PR)    vs    9.89 (without this PR)
@zhhsplendid zhhsplendid requested a review from sneaxiy August 26, 2019 03:03
sneaxiy
sneaxiy previously approved these changes Aug 26, 2019
Copy link
Copy Markdown
Collaborator

@sneaxiy sneaxiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The change includes 3 things:

1. Set CPU_NUM to 1 in the tests because the ParallelExecutor will print warning that CPU_NUM is not set and use default 1.

2. Old tests compare two RNNs, hand written simple RNN and same RNN built by Paddle, but initialized RNN weights in numpy random and Paddle random separately. Fixed it by setting weights and bias values.

3. Also set numpy random seed in the tests. Now the two RNNs diff can be smaller (rtol from 0.1, 0.2 to. 0.01) in the tests.

test=develop
Copy link
Copy Markdown
Collaborator

@sneaxiy sneaxiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@zhhsplendid zhhsplendid merged commit cb74dac into PaddlePaddle:release/1.5 Aug 30, 2019
@zhhsplendid zhhsplendid deleted the cherry_pick_rnn_op branch October 15, 2019 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants