Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#58 from sneaxiy/refine_padding_rnn_mem
Browse files Browse the repository at this point in the history
Refine padding rnn mem
  • Loading branch information
sneaxiy authored May 9, 2019
2 parents 6188a6e + fb3307f commit 672fa7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions PaddingRNN/lstm_paddle/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ task=$1
model_type=$2
base_batchsize=$3

if [ ${model_type} == "large" ]; then
export FLAGS_memory_fraction_of_eager_deletion=1.0
fi

devices_str=${CUDA_VISIBLE_DEVICES//,/ }
gpu_devices=($devices_str)
num_gpu_devices=${#gpu_devices[*]}
Expand Down
2 changes: 1 addition & 1 deletion PaddingRNN/lstm_paddle/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def main():

build_strategy = fluid.BuildStrategy()
build_strategy.enable_inplace = True
build_strategy.memory_optimize = True
build_strategy.memory_optimize = False

build_strategy.remove_unnecessary_lock = True
build_strategy.enable_sequential_execution = False
Expand Down

0 comments on commit 672fa7f

Please sign in to comment.