diff --git a/PaddleCV/PaddleDetection/tools/eval.py b/PaddleCV/PaddleDetection/tools/eval.py index 4c941863decf7ce23383d5de03b179aae523769a..6e15044884ad94503283683beae3c93e7fa1cec7 100644 --- a/PaddleCV/PaddleDetection/tools/eval.py +++ b/PaddleCV/PaddleDetection/tools/eval.py @@ -18,19 +18,6 @@ from __future__ import print_function import os - -def set_paddle_flags(**kwargs): - for key, value in kwargs.items(): - if os.environ.get(key, None) is None: - os.environ[key] = str(value) - - -# NOTE(paddle-dev): All of these flags should be set before -# `import paddle`. Otherwise, it would not take any effect. -set_paddle_flags( - FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory -) - import paddle.fluid as fluid from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results, json_eval_results diff --git a/PaddleCV/PaddleDetection/tools/infer.py b/PaddleCV/PaddleDetection/tools/infer.py index 64049e3fc2b513d6e1e8946edc4bb33518ea8f40..8097a9cae6191d32daadd17bfea779a20fe91ee8 100644 --- a/PaddleCV/PaddleDetection/tools/infer.py +++ b/PaddleCV/PaddleDetection/tools/infer.py @@ -22,19 +22,6 @@ import glob import numpy as np from PIL import Image - -def set_paddle_flags(**kwargs): - for key, value in kwargs.items(): - if os.environ.get(key, None) is None: - os.environ[key] = str(value) - - -# NOTE(paddle-dev): All of these flags should be set before -# `import paddle`. Otherwise, it would not take any effect. -set_paddle_flags( - FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory -) - from paddle import fluid from ppdet.utils.cli import print_total_cfg diff --git a/PaddleCV/PaddleDetection/tools/train.py b/PaddleCV/PaddleDetection/tools/train.py index b9099210edecf41f4ff548166ae36c043dfc59b5..a96d50f4a4eb189762f994fe363ba5c9dbdb400d 100644 --- a/PaddleCV/PaddleDetection/tools/train.py +++ b/PaddleCV/PaddleDetection/tools/train.py @@ -22,19 +22,6 @@ import numpy as np import datetime from collections import deque - -def set_paddle_flags(**kwargs): - for key, value in kwargs.items(): - if os.environ.get(key, None) is None: - os.environ[key] = str(value) - - -# NOTE(paddle-dev): All of these flags should be set before -# `import paddle`. Otherwise, it would not take any effect. -set_paddle_flags( - FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory -) - from paddle import fluid from ppdet.experimental import mixed_precision_context diff --git a/PaddleCV/PaddleGAN/cycle_gan/train.py b/PaddleCV/PaddleGAN/cycle_gan/train.py index a85da0ae2c97e95aa7d8de5a6ef5661988c84971..5b2b4e40a9b834d8a7d440cf1a390f43ee3edba3 100644 --- a/PaddleCV/PaddleGAN/cycle_gan/train.py +++ b/PaddleCV/PaddleGAN/cycle_gan/train.py @@ -35,13 +35,7 @@ else: # not take any effect. set_paddle_flags({ 'FLAGS_cudnn_exhaustive_search': use_cudnn_exhaustive_search, - 'FLAGS_conv_workspace_size_limit': 256, - 'FLAGS_eager_delete_tensor_gb': 0, # enable gc - # You can omit the following settings, because the default - # value of FLAGS_memory_fraction_of_eager_deletion is 1, - # and default value of FLAGS_fast_eager_deletion_mode is 1 - 'FLAGS_memory_fraction_of_eager_deletion': 1, - 'FLAGS_fast_eager_deletion_mode': 1 + 'FLAGS_conv_workspace_size_limit': 256 }) import random diff --git a/PaddleCV/PaddleGAN/scripts/run_SPADE.sh b/PaddleCV/PaddleGAN/scripts/run_SPADE.sh index 3833dc7db480a8a5428abec19f35f96fe8b96ba9..312f48fd21452b6a835fbc4cb5b63579d88a3e81 100644 --- a/PaddleCV/PaddleGAN/scripts/run_SPADE.sh +++ b/PaddleCV/PaddleGAN/scripts/run_SPADE.sh @@ -1,4 +1,2 @@ -export FLAGS_eager_delete_tensor_gb=0.0 -export FLAGS_fast_eager_deletion_mode=1 export FLAGS_fraction_of_gpu_memory_to_use=0.01 CUDA_VISIBLE_DEVICES=0 python train.py --model_net SPADE --dataset cityscapes --train_list train_list --test_list val_list --crop_type Random --batch_size 1 --epoch 200 --load_height 612 --load_width 1124 --crop_height 512 --crop_width 1024 --label_nc 36 diff --git a/PaddleCV/PaddleVideo/models/bmn/README.md b/PaddleCV/PaddleVideo/models/bmn/README.md index 36f0857dbf611741d5d58c3fe4d1fac99d2112a4..c146e650e3b9b624ecaa7c37a3d652eae799679a 100644 --- a/PaddleCV/PaddleVideo/models/bmn/README.md +++ b/PaddleCV/PaddleVideo/models/bmn/README.md @@ -29,9 +29,7 @@ BMN的训练数据采用ActivityNet1.3提供的数据集,数据下载及准备 数据准备完毕后,可以通过如下两种方式启动训练: export CUDA_VISIBLE_DEVICES=0,1,2,3 - export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 - export FLAGS_fast_eager_deletion_mode=1 python train.py --model_name=BMN \ --config=./configs/bmn.yaml \ --log_interval=10 \ diff --git a/PaddleCV/PaddleVideo/models/bsn/README.md b/PaddleCV/PaddleVideo/models/bsn/README.md index a4d0374b29c6691fc03722a0300471177d7e5ee0..7e9572d4e56fa80b228077a987075b18deb111fc 100644 --- a/PaddleCV/PaddleVideo/models/bsn/README.md +++ b/PaddleCV/PaddleVideo/models/bsn/README.md @@ -30,9 +30,7 @@ TEM模块以snippet-level的特征序列作为输入,预测每一个时序位 数据准备完毕后,可以通过如下两种方式启动训练: export CUDA_VISIBLE_DEVICES=0 - export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 - export FLAGS_fast_eager_deletion_mode=1 python train.py --model_name=BsnTem \ --config=./configs/bsn_tem.yaml \ --log_interval=10 \ @@ -60,9 +58,7 @@ PEM模块以PGM模块输出的BSP特征作为输入,输出proposal包含动作 数据准备完毕后,可以通过如下两种方式启动训练: export CUDA_VISIBLE_DEVICES=0 - export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 - export FLAGS_fast_eager_deletion_mode=1 python train.py --model_name=BsnPem \ --config=./configs/bsn_pem.yaml \ --log_interval=10 \ diff --git a/PaddleCV/PaddleVideo/models/ctcn/README.md b/PaddleCV/PaddleVideo/models/ctcn/README.md index bded28629ebfe5f5ffabcf461c020bf23901560a..b33e902b13e5256c4d36bae553f2c353b09398db 100644 --- a/PaddleCV/PaddleVideo/models/ctcn/README.md +++ b/PaddleCV/PaddleVideo/models/ctcn/README.md @@ -25,8 +25,6 @@ C-TCN的训练数据采用ActivityNet1.3提供的数据集,数据下载及准 数据准备完毕后,可以通过如下两种方式启动训练: export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 - export FLAGS_fast_eager_deletion_mode=1 - export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py --model_name=CTCN \ --config=./configs/ctcn.yaml \ diff --git a/PaddleCV/PaddleVideo/models/tsm/README.md b/PaddleCV/PaddleVideo/models/tsm/README.md index 0364799e6180db3ad28e7ac85b3deb6fe38f024e..3526b9bdf3395941cb9c557c275dc7faf291bb49 100644 --- a/PaddleCV/PaddleVideo/models/tsm/README.md +++ b/PaddleCV/PaddleVideo/models/tsm/README.md @@ -35,8 +35,6 @@ TSM的训练数据采用由DeepMind公布的Kinetics-400动作识别数据集。 数据准备完毕后,可以通过如下两种方式启动训练: export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 - export FLAGS_fast_eager_deletion_mode=1 - export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py --model_name=TSM \ --config=./configs/tsm.yaml \ diff --git a/PaddleCV/PaddleVideo/models/tsn/README.md b/PaddleCV/PaddleVideo/models/tsn/README.md index 80ca3268886b98a225f194bed5e8b6e88ea37b69..52bc4ff01977402f3d4cbf723f8a76a194b5754b 100644 --- a/PaddleCV/PaddleVideo/models/tsn/README.md +++ b/PaddleCV/PaddleVideo/models/tsn/README.md @@ -26,8 +26,6 @@ TSN的训练数据采用由DeepMind公布的Kinetics-400动作识别数据集。 数据准备完毕后,可以通过如下两种方式启动训练: export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 - export FLAGS_fast_eager_deletion_mode=1 - export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py --model_name=TSN \ --config=./configs/tsn.yaml \ diff --git a/PaddleCV/PaddleVideo/run.sh b/PaddleCV/PaddleVideo/run.sh index 635e3a38439706f21adb877625bbb8a61b99dc58..66698277ec6e03e648f880b983df6a8ecd878101 100644 --- a/PaddleCV/PaddleVideo/run.sh +++ b/PaddleCV/PaddleVideo/run.sh @@ -25,8 +25,6 @@ weights="" #set the path of weights to enable eval and predicut, just ignore thi export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 #export CUDA_VISIBLE_DEVICES=0,1,2,3 #export CUDA_VISIBLE_DEVICES=0 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 if [ "$mode"x == "train"x ]; then diff --git a/PaddleCV/PaddleVideo/run_ce.sh b/PaddleCV/PaddleVideo/run_ce.sh index e848755d432c91e125061e11506cecd61e20c15b..548562e9ab4333b3b7b881ade83f953e55d8cd7d 100755 --- a/PaddleCV/PaddleVideo/run_ce.sh +++ b/PaddleCV/PaddleVideo/run_ce.sh @@ -1,7 +1,5 @@ #!/bin/bash -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 export CUDA_VISIBLE_DEVICES=0 diff --git a/PaddleCV/deeplabv3+/train.py b/PaddleCV/deeplabv3+/train.py index e0a1f10b8d3caecf504b95230d4fa8ac9e2e9fd9..be46915fdaa38ce8c89edfcdb895d69b1df9bc1e 100755 --- a/PaddleCV/deeplabv3+/train.py +++ b/PaddleCV/deeplabv3+/train.py @@ -27,12 +27,6 @@ def set_paddle_flags(flags): # set before `import paddle`. Otherwise, it would # not take any effect. set_paddle_flags({ - 'FLAGS_eager_delete_tensor_gb': 0, # enable GC - # You can omit the following settings, because the default - # value of FLAGS_memory_fraction_of_eager_deletion is 1, - # and default value of FLAGS_fast_eager_deletion_mode is 1 - 'FLAGS_memory_fraction_of_eager_deletion': 1, - 'FLAGS_fast_eager_deletion_mode': 1, # Setting the default used gpu memory 'FLAGS_fraction_of_gpu_memory_to_use': 0.98 }) diff --git a/PaddleCV/face_detection/train.py b/PaddleCV/face_detection/train.py index c74cc8c62c63a0aca7c831f05e4b5cfaca1f7b92..4eecabe07ab7a5f29e310ee11e69baacb5ed4329 100644 --- a/PaddleCV/face_detection/train.py +++ b/PaddleCV/face_detection/train.py @@ -21,21 +21,6 @@ import numpy as np import time import argparse import functools - - -def set_paddle_flags(**kwargs): - for key, value in kwargs.items(): - if os.environ.get(key, None) is None: - os.environ[key] = str(value) - - -# NOTE(paddle-dev): All of these flags should be -# set before `import paddle`. Otherwise, it would -# not take any effect. -set_paddle_flags( - FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory -) - import paddle import paddle.fluid as fluid from pyramidbox import PyramidBox diff --git a/PaddleCV/image_classification/scripts/train/AlexNet.sh b/PaddleCV/image_classification/scripts/train/AlexNet.sh index 6919f2b969f8f67f7de666a8f133cc7b4b779dbe..ac950db66986e7206a1253f51a0dca9a24f6d13c 100644 --- a/PaddleCV/image_classification/scripts/train/AlexNet.sh +++ b/PaddleCV/image_classification/scripts/train/AlexNet.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® P40 8cards 120epochs 55h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #AlexNet: diff --git a/PaddleCV/image_classification/scripts/train/EfficientNetB0.sh b/PaddleCV/image_classification/scripts/train/EfficientNetB0.sh index 37a5d9a4524e06e4dfa77c1527d2dc5d7be6a222..18dce3ac10fdde5ce496150b641f3544ba5a04ed 100644 --- a/PaddleCV/image_classification/scripts/train/EfficientNetB0.sh +++ b/PaddleCV/image_classification/scripts/train/EfficientNetB0.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.96 diff --git a/PaddleCV/image_classification/scripts/train/GoogLeNet.sh b/PaddleCV/image_classification/scripts/train/GoogLeNet.sh index 63171b31691466bcf6c66a7153faf3dc2f80d203..d7c8c445906d4a31df2dfa25a74f3c7ccd1c0153 100644 --- a/PaddleCV/image_classification/scripts/train/GoogLeNet.sh +++ b/PaddleCV/image_classification/scripts/train/GoogLeNet.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 200epochs 132h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #GoogLeNet: diff --git a/PaddleCV/image_classification/scripts/train/InceptionV4.sh b/PaddleCV/image_classification/scripts/train/InceptionV4.sh index ba3c4954c62cd494dba3822eb0a41429023ce33a..17bf5ed9f14568bcccb370bad8129f004e746f7e 100644 --- a/PaddleCV/image_classification/scripts/train/InceptionV4.sh +++ b/PaddleCV/image_classification/scripts/train/InceptionV4.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 8cards 200epochs 367h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #InceptionV4 diff --git a/PaddleCV/image_classification/scripts/train/MobileNetV1.sh b/PaddleCV/image_classification/scripts/train/MobileNetV1.sh index 8d00ce7c8c073fdbbdc220d8c8bf4289ff4ba659..02167a855d55568ccfbce34358e344701a5ab163 100644 --- a/PaddleCV/image_classification/scripts/train/MobileNetV1.sh +++ b/PaddleCV/image_classification/scripts/train/MobileNetV1.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 120epochs 55h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_25.sh b/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_25.sh index aa7f74ba8eb394f28a296fff7b26b13972e49afe..d3e61d656ef86df72e19e84601a48ec378667668 100644 --- a/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_25.sh +++ b/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_25.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_5.sh b/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_5.sh index 85fdbfdc255b618ad000063931f62f42ae43c380..56f8418b75298ce12bbe4a2a3c39d2160c502697 100644 --- a/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_5.sh +++ b/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_5.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_75.sh b/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_75.sh index ceeba7449b09a8b87ebb4d6d829907d641f698c0..14a36158041b2d02842b43024c995ae7e9ca1eb1 100644 --- a/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_75.sh +++ b/PaddleCV/image_classification/scripts/train/MobileNetV1_x0_75.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/MobileNetV2.sh b/PaddleCV/image_classification/scripts/train/MobileNetV2.sh index 7a0ce41cadb54030f06534ea5f64cffc1b171bf0..cd116ac7b118ba3fcd0f58f954fc2f1890c39382 100644 --- a/PaddleCV/image_classification/scripts/train/MobileNetV2.sh +++ b/PaddleCV/image_classification/scripts/train/MobileNetV2.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 240epochs 135h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/MobileNetV2_x0_75.sh b/PaddleCV/image_classification/scripts/train/MobileNetV2_x0_75.sh index 511cfa71e5189e2dc0b34e7606e216e5fc97a1d3..092adf10fe2e705b16e3a0ed73a7068f472ce9a1 100644 --- a/PaddleCV/image_classification/scripts/train/MobileNetV2_x0_75.sh +++ b/PaddleCV/image_classification/scripts/train/MobileNetV2_x0_75.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/ResNeXt101_32x4d.sh b/PaddleCV/image_classification/scripts/train/ResNeXt101_32x4d.sh index 91d8b5bbae3cb6a580d2bdc9c808c8386a4bb4a5..192157c9f4096f959b0378892ef1e2dac455fdaf 100644 --- a/PaddleCV/image_classification/scripts/train/ResNeXt101_32x4d.sh +++ b/PaddleCV/image_classification/scripts/train/ResNeXt101_32x4d.sh @@ -1,8 +1,6 @@ #Training details #Missed export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNeXt101_32x4d diff --git a/PaddleCV/image_classification/scripts/train/ResNeXt101_64x4d.sh b/PaddleCV/image_classification/scripts/train/ResNeXt101_64x4d.sh index f5aeb3a308719bad13f83f930a8d9c0e12d8daad..0c35add3067886959b09dab5d10d5e509216e7c9 100644 --- a/PaddleCV/image_classification/scripts/train/ResNeXt101_64x4d.sh +++ b/PaddleCV/image_classification/scripts/train/ResNeXt101_64x4d.sh @@ -1,8 +1,6 @@ #Training details #Missed export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNeXt101_64x4d diff --git a/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_32x4d.sh b/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_32x4d.sh index 5e9344808d2e4e826805ea2c2ff7793f554c59db..6db60b84fee7a571941ff58b2fec96add6e3b625 100644 --- a/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_32x4d.sh +++ b/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_32x4d.sh @@ -1,8 +1,6 @@ #Training details #Missed export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNeXt101_vd_32x4d diff --git a/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_64x4d.sh b/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_64x4d.sh index f3d117798edf33acd9f4d9b8e29bdd987a9ece9c..eff719517c1cff6f88478f5b1a839ee324fda101 100644 --- a/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_64x4d.sh +++ b/PaddleCV/image_classification/scripts/train/ResNeXt101_vd_64x4d.sh @@ -1,8 +1,6 @@ #Training details #Missed export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNeXt101_vd_64x4d diff --git a/PaddleCV/image_classification/scripts/train/ResNeXt152_64x4d.sh b/PaddleCV/image_classification/scripts/train/ResNeXt152_64x4d.sh index 0a1bd5180de93f702b29b80072c2e00425bb90fc..39e8a39e62d068d851e68337a314e835cc98cbae 100644 --- a/PaddleCV/image_classification/scripts/train/ResNeXt152_64x4d.sh +++ b/PaddleCV/image_classification/scripts/train/ResNeXt152_64x4d.sh @@ -1,7 +1,5 @@ #Training details export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNeXt152_64x4d diff --git a/PaddleCV/image_classification/scripts/train/ResNet101.sh b/PaddleCV/image_classification/scripts/train/ResNet101.sh index a2af43854b4464da1b2c7077d89e8b155d207e9f..28b8ccfa0de3caa3fe73e6dbd638cd5b96f2f42f 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet101.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet101.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® V100 4cards 120epochs 100h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet101: diff --git a/PaddleCV/image_classification/scripts/train/ResNet101_vd.sh b/PaddleCV/image_classification/scripts/train/ResNet101_vd.sh index b9bdf778481b6fe1b6bace474bab31053f87c6c2..a7dc7983eeeaf180049c5417c6bb04e7420e7732 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet101_vd.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet101_vd.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 200epochs 182h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet101_vd diff --git a/PaddleCV/image_classification/scripts/train/ResNet152.sh b/PaddleCV/image_classification/scripts/train/ResNet152.sh index 44275753a3eab22f78bfc02305c98dff59d55508..373cecb84f63b44128a1c3b2dcddb8a7a22d9061 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet152.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet152.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® P40 8cards 120epochs 200h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet152: diff --git a/PaddleCV/image_classification/scripts/train/ResNet152_vd.sh b/PaddleCV/image_classification/scripts/train/ResNet152_vd.sh index b4cb84ad191ee57749fdfad08428fa5e328bbdf0..500b4628db420297359f6184b1e38b5a5456ce87 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet152_vd.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet152_vd.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® P40 8cards 200epochs 346h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/ResNet18.sh b/PaddleCV/image_classification/scripts/train/ResNet18.sh index b3d1018ce0daa0f4f3871e0109bdc293f5d6f81d..e6cfe9a7696d850c67356f6e21c31251f990a3da 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet18.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet18.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® V100 4cards 120epochs 67h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet18: diff --git a/PaddleCV/image_classification/scripts/train/ResNet18_vd.sh b/PaddleCV/image_classification/scripts/train/ResNet18_vd.sh index c95b9325ead9ff30b8f61d9f247f5abc56c6bd3e..4bc122d2b3fb9a160474c2698303974ac2063fa2 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet18_vd.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet18_vd.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/ResNet200_vd.sh b/PaddleCV/image_classification/scripts/train/ResNet200_vd.sh index 464db8ac77cc80d6fd441d638d5ee74e2ed3cdf0..cb9f14da066e9e45b2f5c16947b286548d303e19 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet200_vd.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet200_vd.sh @@ -1,8 +1,6 @@ #Training details #Machine: Missed export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet200_vd diff --git a/PaddleCV/image_classification/scripts/train/ResNet34.sh b/PaddleCV/image_classification/scripts/train/ResNet34.sh index 5ce4689be4c2c67a9d20c3187ba93064fb536b26..f4f2b0d6499da35b9bff4a6fb90dfb25e0d1c641 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet34.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet34.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 120epochs 73h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet34: python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/ResNet34_vd.sh b/PaddleCV/image_classification/scripts/train/ResNet34_vd.sh index 56a31b699d19f39987f6f4be79a5e0b8e9c4e07d..14df38da0416ce808936bf12d2052d3d55b7b5f8 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet34_vd.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet34_vd.sh @@ -1,6 +1,4 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/ResNet50.sh b/PaddleCV/image_classification/scripts/train/ResNet50.sh index 470630757aa4446fecd42bd45e11a77d89c453fa..1c68daec344c4e70b90796704ae1c0ffaeebe76e 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet50.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet50.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® V100 4cards 120epochs 67h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet50: diff --git a/PaddleCV/image_classification/scripts/train/ResNet50_vc.sh b/PaddleCV/image_classification/scripts/train/ResNet50_vc.sh index d5d0cc5e5df1e5eb130bc73d9358c343b140abed..b12c0dbe0acb5c74a0e4509923470f50595dbecd 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet50_vc.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet50_vc.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® V100 4cards 200epochs 141h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #ResNet50_vc diff --git a/PaddleCV/image_classification/scripts/train/ResNet50_vd.sh b/PaddleCV/image_classification/scripts/train/ResNet50_vd.sh index 968e3dd02e96c5c5ade62c4df59cd0194787ea89..83df74731f978742a31bd1f59991fbe3811cd169 100644 --- a/PaddleCV/image_classification/scripts/train/ResNet50_vd.sh +++ b/PaddleCV/image_classification/scripts/train/ResNet50_vd.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 200epochs 120h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/SENet154_vd.sh b/PaddleCV/image_classification/scripts/train/SENet154_vd.sh index a363a108e57b940f0c1dea2ec0a69fabf608110a..7ad2b502248cfd63cd6ad6475c6489a7ef505208 100644 --- a/PaddleCV/image_classification/scripts/train/SENet154_vd.sh +++ b/PaddleCV/image_classification/scripts/train/SENet154_vd.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® P40 8cards 200epochs 916h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #SE_154 diff --git a/PaddleCV/image_classification/scripts/train/SE_ResNeXt101_32x4d.sh b/PaddleCV/image_classification/scripts/train/SE_ResNeXt101_32x4d.sh index a385814a55a527d4e1f268a2b974df9fa8cc8f2b..387011209f7c78b6ed2667dedfcc60eab7ecb1fb 100644 --- a/PaddleCV/image_classification/scripts/train/SE_ResNeXt101_32x4d.sh +++ b/PaddleCV/image_classification/scripts/train/SE_ResNeXt101_32x4d.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® P40 8cards 120epochs 566h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #SE_ResNeXt101_32x4d: diff --git a/PaddleCV/image_classification/scripts/train/SE_ResNeXt50_32x4d.sh b/PaddleCV/image_classification/scripts/train/SE_ResNeXt50_32x4d.sh index acfadb80d983f9571cf93e825958cbbd7864b711..f0d3b61b5b5891763cfe4becdba4abafee36c138 100644 --- a/PaddleCV/image_classification/scripts/train/SE_ResNeXt50_32x4d.sh +++ b/PaddleCV/image_classification/scripts/train/SE_ResNeXt50_32x4d.sh @@ -1,8 +1,6 @@ #Training details #Machine:V100 4cards 200epochs 282h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 diff --git a/PaddleCV/image_classification/scripts/train/ShuffleNetV2.sh b/PaddleCV/image_classification/scripts/train/ShuffleNetV2.sh index 369e58791e410a82431dfb2413a8b911f7e1e48b..91a95ab213fdef55ba640b68cb4bcc7517bb15e6 100644 --- a/PaddleCV/image_classification/scripts/train/ShuffleNetV2.sh +++ b/PaddleCV/image_classification/scripts/train/ShuffleNetV2.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® K40 4cards 240epochs 156h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/ShuffleNetV2_swish.sh b/PaddleCV/image_classification/scripts/train/ShuffleNetV2_swish.sh index b3e29dd31bcdabda41ec8a18e8f6316813d37c1b..c2f13db1a072418e916cd1389dc4b6aaa145f62b 100644 --- a/PaddleCV/image_classification/scripts/train/ShuffleNetV2_swish.sh +++ b/PaddleCV/image_classification/scripts/train/ShuffleNetV2_swish.sh @@ -1,8 +1,6 @@ ##Training details #GPU: NVIDIA® Tesla® K40 4cards 240epochs 156h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py \ diff --git a/PaddleCV/image_classification/scripts/train/VGG11.sh b/PaddleCV/image_classification/scripts/train/VGG11.sh index ad8934e4b0b6687f0839bb325537ad815dc263db..f4b79a3d56bddedd4589f839865a9f0ef04efe29 100644 --- a/PaddleCV/image_classification/scripts/train/VGG11.sh +++ b/PaddleCV/image_classification/scripts/train/VGG11.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® P40 8cards 90epochs 52h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #VGG11: diff --git a/PaddleCV/image_classification/scripts/train/VGG13.sh b/PaddleCV/image_classification/scripts/train/VGG13.sh index 24960f888d46d3761dbb2712a740f1f3be71581c..17784de7e5c4665389d47e26b39a4bb2b41399c1 100644 --- a/PaddleCV/image_classification/scripts/train/VGG13.sh +++ b/PaddleCV/image_classification/scripts/train/VGG13.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 90epochs 58h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #VGG13: diff --git a/PaddleCV/image_classification/scripts/train/VGG16.sh b/PaddleCV/image_classification/scripts/train/VGG16.sh index ebf5a35627049f10c4afc1a24d7e9f2a9f6f425a..4f12a7e46f214cfbe64c3ba41d39ad9215295011 100644 --- a/PaddleCV/image_classification/scripts/train/VGG16.sh +++ b/PaddleCV/image_classification/scripts/train/VGG16.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® P40 8cards 90epochs 72h export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #VGG16: diff --git a/PaddleCV/image_classification/scripts/train/VGG19.sh b/PaddleCV/image_classification/scripts/train/VGG19.sh index bca6a002f1eb3acc196f024834117155deeb6191..6bbacc1f4edf0fc29af233091e3feddcc51cf6fa 100644 --- a/PaddleCV/image_classification/scripts/train/VGG19.sh +++ b/PaddleCV/image_classification/scripts/train/VGG19.sh @@ -1,8 +1,6 @@ #Training details #GPU: NVIDIA® Tesla® V100 4cards 150epochs 173h export CUDA_VISIBLE_DEVICES=0,1,2,3 -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export FLAGS_fraction_of_gpu_memory_to_use=0.98 #VGG19: diff --git a/PaddleCV/image_classification/train.py b/PaddleCV/image_classification/train.py index dfd0f591986ef53e46b438897828097b0dbfba0b..ec002ff27ca5545bf68cac5addedfec3f5694cc7 100755 --- a/PaddleCV/image_classification/train.py +++ b/PaddleCV/image_classification/train.py @@ -31,7 +31,6 @@ def set_paddle_flags(flags): # set before `import paddle`. Otherwise, it would # not take any effect. set_paddle_flags({ - 'FLAGS_eager_delete_tensor_gb': 0, # enable gc 'FLAGS_fraction_of_gpu_memory_to_use': 0.98 }) diff --git a/PaddleCV/rcnn/train.py b/PaddleCV/rcnn/train.py index 705ad33a0eeaa1e645d4e943ad2584de7c9dcd38..f2d62062d1f0a705683c2bdcafea90910810d319 100644 --- a/PaddleCV/rcnn/train.py +++ b/PaddleCV/rcnn/train.py @@ -26,8 +26,6 @@ def set_paddle_flags(flags): set_paddle_flags({ 'FLAGS_conv_workspace_size_limit': 500, - 'FLAGS_eager_delete_tensor_gb': 0, # enable gc - 'FLAGS_memory_fraction_of_eager_deletion': 1, 'FLAGS_fraction_of_gpu_memory_to_use': 0.98 }) diff --git a/PaddleCV/ssd/train.py b/PaddleCV/ssd/train.py index 7bbb0fdaf6c80dbc5902690fdac916c622903c0e..0e7c79580f516b177388f6963cd2eec77a58a2aa 100644 --- a/PaddleCV/ssd/train.py +++ b/PaddleCV/ssd/train.py @@ -20,20 +20,6 @@ import shutil import math import multiprocessing - -def set_paddle_flags(**kwargs): - for key, value in kwargs.items(): - if os.environ.get(key, None) is None: - os.environ[key] = str(value) - - -# NOTE(paddle-dev): All of these flags should be -# set before `import paddle`. Otherwise, it would -# not take any effect. -set_paddle_flags( - FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory -) - import paddle import paddle.fluid as fluid import reader diff --git a/PaddleCV/yolov3/train.py b/PaddleCV/yolov3/train.py index 5f2284cf0c264e261c1cd6cab1a675c59b1981a7..9bb9c062ec12a36f8537794e0bed43cd2d395ccf 100644 --- a/PaddleCV/yolov3/train.py +++ b/PaddleCV/yolov3/train.py @@ -25,8 +25,6 @@ def set_paddle_flags(flags): set_paddle_flags({ - 'FLAGS_eager_delete_tensor_gb': 0, # enable gc - 'FLAGS_memory_fraction_of_eager_deletion': 1, 'FLAGS_fraction_of_gpu_memory_to_use': 0.98 }) diff --git a/PaddleNLP/Research/ACL2018-DAM/run.sh b/PaddleNLP/Research/ACL2018-DAM/run.sh index 47395cb7dd55743ccac55bc173550f0762d478f6..4c42b0475b7517844d923119de916ac0aa1dc125 100755 --- a/PaddleNLP/Research/ACL2018-DAM/run.sh +++ b/PaddleNLP/Research/ACL2018-DAM/run.sh @@ -1,5 +1,4 @@ export CUDA_VISIBLE_DEVICES=3 -export FLAGS_eager_delete_tensor_gb=0.0 #train on ubuntu python -u main.py \ diff --git a/PaddleNLP/Research/ACL2018-DAM/run_CPU.sh b/PaddleNLP/Research/ACL2018-DAM/run_CPU.sh index 091eda1f2b0e41c2d767ba5fae0930baeab6ee78..220ec6a1a71cfae075224e80bd618433278d33d0 100755 --- a/PaddleNLP/Research/ACL2018-DAM/run_CPU.sh +++ b/PaddleNLP/Research/ACL2018-DAM/run_CPU.sh @@ -1,5 +1,4 @@ export CPU_NUM=1 -export FLAGS_eager_delete_tensor_gb=0.0 #train on ubuntu python -u main.py \ diff --git a/PaddleNLP/Research/MRQA2019-BASELINE/run_finetuning.sh b/PaddleNLP/Research/MRQA2019-BASELINE/run_finetuning.sh index bbe9bfe1fa65507dd17320c25743b944b9c33295..71e191f5d6ef3a951c02157659abf6f7d2d17792 100644 --- a/PaddleNLP/Research/MRQA2019-BASELINE/run_finetuning.sh +++ b/PaddleNLP/Research/MRQA2019-BASELINE/run_finetuning.sh @@ -18,7 +18,6 @@ set -xe export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 # set CUDA_VISIBLE_DEVICES export CUDA_VISIBLE_DEVICES=0 diff --git a/PaddleNLP/Research/MRQA2019-BASELINE/run_predict.sh b/PaddleNLP/Research/MRQA2019-BASELINE/run_predict.sh index df5e86b5ea7f086ffbe24f1f588882f283e4fee0..6c11820e8e771921d1d57a644af12befb62e88b4 100644 --- a/PaddleNLP/Research/MRQA2019-BASELINE/run_predict.sh +++ b/PaddleNLP/Research/MRQA2019-BASELINE/run_predict.sh @@ -18,7 +18,6 @@ set -xe export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 # set CUDA_VISIBLE_DEVICES export CUDA_VISIBLE_DEVICES=0 diff --git a/PaddleNLP/Research/MRQA2019-D-NET/knowledge_distillation/run_distill.sh b/PaddleNLP/Research/MRQA2019-D-NET/knowledge_distillation/run_distill.sh index 9042506c4d5c4a30f7618d92e10d4467b9ddd5b9..8b040392386bfcca7268c1c5ead2e64bdce1e9c7 100755 --- a/PaddleNLP/Research/MRQA2019-D-NET/knowledge_distillation/run_distill.sh +++ b/PaddleNLP/Research/MRQA2019-D-NET/knowledge_distillation/run_distill.sh @@ -1,7 +1,6 @@ #!/bin/bash export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 if [ ! "$CUDA_VISIBLE_DEVICES" ] diff --git a/PaddleNLP/Research/MRQA2019-D-NET/multi_task_learning/run_multi_task.sh b/PaddleNLP/Research/MRQA2019-D-NET/multi_task_learning/run_multi_task.sh index e65d4cc2dd15c7e05b16ca9e4feabb4d7f26bfdf..fe9d9023ed294895edd435173ef2ac30fb4162bb 100755 --- a/PaddleNLP/Research/MRQA2019-D-NET/multi_task_learning/run_multi_task.sh +++ b/PaddleNLP/Research/MRQA2019-D-NET/multi_task_learning/run_multi_task.sh @@ -2,7 +2,6 @@ # for gpu memory optimization export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 diff --git a/PaddleNLP/Research/MRQA2019-D-NET/server/xlnet_server/serve.sh b/PaddleNLP/Research/MRQA2019-D-NET/server/xlnet_server/serve.sh index ff56192b5237ba1f3a08f046c3598b2fa679a782..f9beecea2c60d65e07708eceb367e995e302f8fe 100755 --- a/PaddleNLP/Research/MRQA2019-D-NET/server/xlnet_server/serve.sh +++ b/PaddleNLP/Research/MRQA2019-D-NET/server/xlnet_server/serve.sh @@ -1,5 +1,4 @@ export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export FLAGS_fraction_of_gpu_memory_to_use=0.1 python serve.py ./infer_model_800_bs128 5001 & diff --git a/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/.run_ce.sh b/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/.run_ce.sh index fea71c7a316a0a85c231a7dbea5a11bf1ddcfe80..5b4881ce07b96ffe71ef00efb5cc62202b44853c 100644 --- a/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/.run_ce.sh +++ b/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/.run_ce.sh @@ -1,7 +1,6 @@ #!/bin/bash export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1.0 export CUDA_VISIBLE_DEVICES=0 diff --git a/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/README.md b/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/README.md index 88e4eb64f218b8dc8c9eabca2fb2911f1c5c69d6..bd3fbcd47a4f2e023dbde49daf7d921f7f5a74e5 100644 --- a/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/README.md +++ b/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/README.md @@ -156,7 +156,6 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 ``` export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 #开启显存优化 export CUDA_VISIBLE_DEVICES=0 #GPU单卡训练 #export CUDA_VISIBLE_DEVICES=0,1,2,3 #GPU多卡训练 @@ -222,7 +221,6 @@ task_type: train、predict、evaluate、inference, 选择4个参数选项中任 ``` export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 #开启显存优化 export CUDA_VISIBLE_DEVICES=0 #GPU单卡训练 #export CUDA_VISIBLE_DEVICES=0,1,2,3 #GPU多卡训练 @@ -298,7 +296,6 @@ export CUDA_VISIBLE_DEVICES=0 #用户可自行指定空闲的卡 ``` export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 #开启显存优化 export CUDA_VISIBLE_DEVICES=0 #单卡预测 #export CUDA_VISIBLE_DEVICES= #CPU预测 @@ -346,7 +343,6 @@ task_type: train、predict、evaluate、inference, 选择4个参数选项中任 ``` export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 #开启显存优化 export CUDA_VISIBLE_DEVICES=0 #单卡预测 #export CUDA_VISIBLE_DEVICES= #CPU预测 diff --git a/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/run.sh b/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/run.sh index 78f8da406ebe670a5b7a04077b2479c523cebc4e..52c30b7b7a1be355114a591ce73c3ec622abb9e5 100755 --- a/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/run.sh +++ b/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation/run.sh @@ -1,7 +1,6 @@ #!/bin/bash export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1.0 export CUDA_VISIBLE_DEVICES=0 diff --git a/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/.run_ce.sh b/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/.run_ce.sh index 8ce98ff79af297f621612ad37887eec25c930cac..4feb95607607e6863ca61936b3ae683bb61f2497 100644 --- a/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/.run_ce.sh +++ b/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/.run_ce.sh @@ -52,12 +52,6 @@ train_mrda(){ --enable_ce=store_true } -# FIXME(zjl): this model would fail when GC is enabled, -# but it seems that this error is from the model itself. -# See issue here: https://github.com/PaddlePaddle/Paddle/issues/18994#event-2532039900 -# To fix ce, disable gc in this model temporarily. -export FLAGS_eager_delete_tensor_gb=1 - cudaid=${multi:=0,1,2,3} export CUDA_VISIBLE_DEVICES=$cudaid train_atis_slot | python _ce.py diff --git a/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/README.md b/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/README.md index 77783058744e5b34d4b212df9d4be60b2e70a9f7..68f4b8e7601e4453dce26611270baea4f917f1c5 100644 --- a/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/README.md +++ b/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/README.md @@ -177,7 +177,6 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3 ``` export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 #开启显存优化 export CUDA_VISIBLE_DEVICES=0 #GPU单卡训练 #export CUDA_VISIBLE_DEVICES=0,1,2,3 #GPU多卡训练 @@ -259,7 +258,6 @@ export CUDA_VISIBLE_DEVICES=0 ``` export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 #开启显存优化 export CUDA_VISIBLE_DEVICES=0 #单卡预测 #export CUDA_VISIBLE_DEVICES= #CPU预测 diff --git a/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/run.sh b/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/run.sh index 1cf3aa3fcbbdf83e707a337854dbe09fa391c9f1..824674770c0bb2e00db6f15a6a23dc42cb8c544b 100644 --- a/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/run.sh +++ b/PaddleNLP/dialogue_model_toolkit/dialogue_general_understanding/run.sh @@ -1,7 +1,6 @@ #!/bin/bash export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export CUDA_VISIBLE_DEVICES=0 if [ ! "$CUDA_VISIBLE_DEVICES" ] diff --git a/PaddleNLP/language_representations_kit/BERT/README.md b/PaddleNLP/language_representations_kit/BERT/README.md index b7eb9d8c3182555dccca0f7312851a7e325e0e59..64df088258bc2ed7b7c3d7d27154613e00cdce7c 100644 --- a/PaddleNLP/language_representations_kit/BERT/README.md +++ b/PaddleNLP/language_representations_kit/BERT/README.md @@ -147,7 +147,6 @@ export current_endpoint=192.168.0.17:9185 ```shell export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 BERT_BASE_PATH="chinese_L-12_H-768_A-12" @@ -209,7 +208,6 @@ SQuAD v1.1 ```shell export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export CUDA_VISIBLE_DEVICES=0,1,2,3 BERT_BASE_PATH="uncased_L-12_H-768_A-12" @@ -255,7 +253,6 @@ python ${SQUAD_PATH}/evaluate-v1.1.py ${SQUAD_PATH}/dev-v1.1.json ${CHECKPOINT_P ```shell export FLAGS_sync_nccl_allreduce=0 -export FLAGS_eager_delete_tensor_gb=1 export CUDA_VISIBLE_DEVICES=0,1,2,3 BERT_BASE_PATH="uncased_L-12_H-768_A-12" CHECKPOINT_PATH=/path/to/save/checkpoints/ diff --git a/PaddleNLP/language_representations_kit/ELMo/LAC_demo/run.sh b/PaddleNLP/language_representations_kit/ELMo/LAC_demo/run.sh index 4d71d0c6ba426c007402e94ab4a538504c62f7d8..6e3cb62916320ee43b7f80b3ead0f070e37aa3cb 100755 --- a/PaddleNLP/language_representations_kit/ELMo/LAC_demo/run.sh +++ b/PaddleNLP/language_representations_kit/ELMo/LAC_demo/run.sh @@ -1,6 +1,4 @@ export FLAGS_fraction_of_gpu_memory_to_use=0.5 -export FLAGS_eager_delete_tensor_gb=0.0 -export FLAGS_fast_eager_deletion_mode=1 export CUDA_VISIBLE_DEVICES=0 python train.py \ diff --git a/PaddleNLP/lexical_analysis/.run_ce.sh b/PaddleNLP/lexical_analysis/.run_ce.sh index 73f0005aff4aee71e4f2cee3e957c185952a0791..cbf7a03ae07d7fd8072997ecc016e30bde42b83c 100644 --- a/PaddleNLP/lexical_analysis/.run_ce.sh +++ b/PaddleNLP/lexical_analysis/.run_ce.sh @@ -1,7 +1,5 @@ #!/bin/bash export FLAGS_fraction_of_gpu_memory_to_use=0.5 -export FLAGS_eager_delete_tensor_gb=0.0 -export FLAGS_fast_eager_deletion_mode=1 train() diff --git a/PaddleNLP/lexical_analysis/run.sh b/PaddleNLP/lexical_analysis/run.sh index 614b8ce68166c8dda67507a98b390c21663d1be2..99bf7b637a7c9d08403587938a704372e61f5ce9 100644 --- a/PaddleNLP/lexical_analysis/run.sh +++ b/PaddleNLP/lexical_analysis/run.sh @@ -1,7 +1,5 @@ #!/bin/bash export FLAGS_fraction_of_gpu_memory_to_use=0.02 -export FLAGS_eager_delete_tensor_gb=0.0 -export FLAGS_fast_eager_deletion_mode=1 export CUDA_VISIBLE_DEVICES=0,1,2,3 # which GPU to use function run_train() { diff --git a/PaddleNLP/lexical_analysis/run_ernie.sh b/PaddleNLP/lexical_analysis/run_ernie.sh index 61a8e8e9f6f85df2c4704ad5bf83cf2994b3569d..2203f4d66282bf55f66b95fde950ce7495ec8ac8 100644 --- a/PaddleNLP/lexical_analysis/run_ernie.sh +++ b/PaddleNLP/lexical_analysis/run_ernie.sh @@ -1,7 +1,5 @@ #set -eux export FLAGS_fraction_of_gpu_memory_to_use=0.02 -export FLAGS_eager_delete_tensor_gb=0.0 -export FLAGS_fast_eager_deletion_mode=1 # export FLAGS_sync_nccl_allreduce=1 # export NCCL_DEBUG=INFO # export NCCL_IB_GID_INDEX=3 diff --git a/PaddleNLP/neural_machine_translation/transformer/README.md b/PaddleNLP/neural_machine_translation/transformer/README.md index 27c59a9705ede5903358b4f7eb5bbcacd96bf9ba..e541305928e9c9bcbf01c2017000ad005abee9ed 100644 --- a/PaddleNLP/neural_machine_translation/transformer/README.md +++ b/PaddleNLP/neural_machine_translation/transformer/README.md @@ -68,8 +68,6 @@ 以提供的英德翻译数据为例,可以执行以下命令进行模型训练: ```sh -# open garbage collection to save memory -export FLAGS_eager_delete_tensor_gb=0.0 # setting visible devices for training export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 @@ -86,8 +84,6 @@ python -u main.py \ 以上命令中传入了执行训练(`do_train`)、训练轮数(`epoch`)和训练数据文件路径(注意请正确设置,支持通配符)等参数,更多参数的使用以及支持的模型超参数可以参见 `transformer.yaml` 配置文件,其中默认提供了 Transformer base model 的配置,如需调整可以在配置文件中更改或通过命令行传入(命令行传入内容将覆盖配置文件中的设置)。可以通过以下命令来训练 Transformer 论文中的 big model: ```sh -# open garbage collection to save memory -export FLAGS_eager_delete_tensor_gb=0.0 # setting visible devices for training export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 @@ -124,8 +120,6 @@ python -u main.py \ 以英德翻译数据为例,模型训练完成后可以执行以下命令对指定文件中的文本进行翻译: ```sh -# open garbage collection to save memory -export FLAGS_eager_delete_tensor_gb=0.0 # setting visible devices for prediction export CUDA_VISIBLE_DEVICES=0 @@ -145,8 +139,6 @@ python -u main.py \ 由 `predict_file` 指定的文件中文本的翻译结果会输出到 `output_file` 指定的文件。执行预测时需要设置 `init_from_params` 来给出模型所在目录,更多参数的使用可以在 `transformer.yaml` 文件中查阅注释说明并进行更改设置。注意若在执行预测时设置了模型超参数,应与模型训练时的设置一致,如若训练时使用 big model 的参数设置,则预测时对应类似如下命令: ```sh -# open garbage collection to save memory -export FLAGS_eager_delete_tensor_gb=0.0 # setting visible devices for prediction export CUDA_VISIBLE_DEVICES=0 diff --git a/PaddleNLP/neural_machine_translation/transformer/train.py b/PaddleNLP/neural_machine_translation/transformer/train.py index 57fa3b91db165d88720b629ecd3e963266e27c60..74f825043d4e8b54a07764f816cbc278f914b580 100644 --- a/PaddleNLP/neural_machine_translation/transformer/train.py +++ b/PaddleNLP/neural_machine_translation/transformer/train.py @@ -32,8 +32,6 @@ import dist_utils import reader from transformer import create_net, position_encoding_init -if os.environ.get('FLAGS_eager_delete_tensor_gb', None) is None: - os.environ['FLAGS_eager_delete_tensor_gb'] = '0' # num_trainers is used for multi-process gpu training num_trainers = int(os.environ.get('PADDLE_TRAINERS_NUM', 1)) diff --git a/PaddleNLP/unarchived/deep_attention_matching_net/.run_ce.sh b/PaddleNLP/unarchived/deep_attention_matching_net/.run_ce.sh index 6c1c0a344dd84b2d252b77b8d0f5de94bb0da13c..0b927bdb9c4c43564e833b468d82c1328d42f6af 100755 --- a/PaddleNLP/unarchived/deep_attention_matching_net/.run_ce.sh +++ b/PaddleNLP/unarchived/deep_attention_matching_net/.run_ce.sh @@ -3,7 +3,6 @@ export CE_MODE_X=1 export CUDA_VISIBLE_DEVICES=0 -export FLAGS_eager_delete_tensor_gb=0.0 if [ ! -e data_small.pkl ]; then wget -c http://dam-data.bj.bcebos.com/data_small.pkl fi diff --git a/PaddleNLP/unarchived/deep_attention_matching_net/douban/train.sh b/PaddleNLP/unarchived/deep_attention_matching_net/douban/train.sh index 6ed91319a7880f00a1f8b202ebe057ca1145f615..eb8a7d3a8b9446cc1c66cd9183dc83f874a22903 100644 --- a/PaddleNLP/unarchived/deep_attention_matching_net/douban/train.sh +++ b/PaddleNLP/unarchived/deep_attention_matching_net/douban/train.sh @@ -1,5 +1,4 @@ export CUDA_VISIBLE_DEVICES=0 -export FLAGS_eager_delete_tensor_gb=0.0 python -u ../train_and_evaluate.py --use_cuda \ --data_path ./data/data.pkl \ --ext_eval \ diff --git a/PaddleNLP/unarchived/deep_attention_matching_net/ubuntu/train.sh b/PaddleNLP/unarchived/deep_attention_matching_net/ubuntu/train.sh index 66ebc2e62f66276f808ac36dfad31470950fd9b9..4d8b54b93feccdddc3ed1b9d3efecbf31db173ae 100644 --- a/PaddleNLP/unarchived/deep_attention_matching_net/ubuntu/train.sh +++ b/PaddleNLP/unarchived/deep_attention_matching_net/ubuntu/train.sh @@ -1,5 +1,4 @@ export CUDA_VISIBLE_DEVICES=0 -export FLAGS_eager_delete_tensor_gb=0.0 python -u ../train_and_evaluate.py --use_cuda \ --data_path ./data/data.pkl \ --word_emb_init ./data/word_embedding.pkl \ diff --git a/PaddleNLP/unarchived/neural_machine_translation/transformer/README_cn.md b/PaddleNLP/unarchived/neural_machine_translation/transformer/README_cn.md index bdac7cb0b7c4f9d51bbc281b351232c6edc75a36..8db20d95bc6d6dba3cb4a55377d6aacd5b0d3c6b 100644 --- a/PaddleNLP/unarchived/neural_machine_translation/transformer/README_cn.md +++ b/PaddleNLP/unarchived/neural_machine_translation/transformer/README_cn.md @@ -98,8 +98,6 @@ python train.py --help ```sh # 显存使用的比例,显存不足可适当增大,最大为1 export FLAGS_fraction_of_gpu_memory_to_use=1.0 -# 显存清理的阈值,显存不足可适当减小,最小为0,为负数时不启用 -export FLAGS_eager_delete_tensor_gb=0.8 python -u train.py \ --src_vocab_fpath gen_data/wmt16_ende_data_bpe/vocab_all.bpe.32000 \ --trg_vocab_fpath gen_data/wmt16_ende_data_bpe/vocab_all.bpe.32000 \ diff --git a/PaddleSlim/.run_ce.sh b/PaddleSlim/.run_ce.sh index 3e20348057d61996ef7044aad753a26ac9eecaf2..b45fbaf6c6046a524288a4e4d9b1b57c1f47c6f7 100755 --- a/PaddleSlim/.run_ce.sh +++ b/PaddleSlim/.run_ce.sh @@ -1,7 +1,6 @@ #!/bin/bash # This file is only used for continuous evaluation. -export FLAGS_eager_delete_tensor_gb=0.0 export CUDA_VISIBLE_DEVICES=3 if [ ! -d 'pretrain' ]; then diff --git a/PaddleSlim/classification/distillation/run.sh b/PaddleSlim/classification/distillation/run.sh index e9d88f501932a302390c9344b0bf0cbab183d6de..dc899cccf063039e9f7af3cda23754642e44f160 100644 --- a/PaddleSlim/classification/distillation/run.sh +++ b/PaddleSlim/classification/distillation/run.sh @@ -18,10 +18,6 @@ fi cd - -# enable GC strategy -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 - # for distillation #----------------- export CUDA_VISIBLE_DEVICES=0,1,2,3 diff --git a/PaddleSlim/classification/quantization/run.sh b/PaddleSlim/classification/quantization/run.sh index adf67f382b19ca314b4413b353c6396716ae8db6..bbe24e6267377189bec1ad511d3ecd9ba6c9180f 100644 --- a/PaddleSlim/classification/quantization/run.sh +++ b/PaddleSlim/classification/quantization/run.sh @@ -30,10 +30,6 @@ fi cd - -# enable GC strategy -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 - export CUDA_VISIBLE_DEVICES=0 ## for quantization for mobilenet_v1 diff --git a/PaddleSlim/light_nas/run.sh b/PaddleSlim/light_nas/run.sh index 396247cfe26bb2139a64eb2cd10b39d639349824..5b4b425740426f10311192fd33bde0dd572b2ddc 100644 --- a/PaddleSlim/light_nas/run.sh +++ b/PaddleSlim/light_nas/run.sh @@ -1,5 +1,2 @@ -# enable GC strategy -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 export CUDA_VISIBLE_DEVICES=0,1,2,3 python search.py diff --git a/PaddleSlim/run.sh b/PaddleSlim/run.sh index 89bffa4d0ec26cecd67c04ccf92b01683d4630ad..fa909323dae04c844e059cf2d0f4d873950c0886 100644 --- a/PaddleSlim/run.sh +++ b/PaddleSlim/run.sh @@ -24,10 +24,6 @@ fi cd - -# enable GC strategy -export FLAGS_fast_eager_deletion_mode=1 -export FLAGS_eager_delete_tensor_gb=0.0 - # for distillation #----------------- export CUDA_VISIBLE_DEVICES=0,1,2,3 diff --git a/PaddleSlim/ssd/train.py b/PaddleSlim/ssd/train.py index 96810ae04bb08bb63da6668434121aeaf412c116..c4494b5c3f37199f9e39b2f70b5c4f413302ed97 100644 --- a/PaddleSlim/ssd/train.py +++ b/PaddleSlim/ssd/train.py @@ -21,20 +21,6 @@ import math import multiprocessing from paddle.fluid.contrib.slim import Compressor - -def set_paddle_flags(**kwargs): - for key, value in kwargs.items(): - if os.environ.get(key, None) is None: - os.environ[key] = str(value) - - -# NOTE(paddle-dev): All of these flags should be -# set before `import paddle`. Otherwise, it would -# not take any effect. -set_paddle_flags( - FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory -) - import paddle import paddle.fluid as fluid import reader