[BREAKING] prevent multi-gpu usage (#4749)

* prevent multi-gpu usage

* fix distributed test

* combine gpu predictor tests

* set upper bound on n_gpus
This commit is contained in:
Rong Ou
2019-08-12 14:11:35 -07:00
committed by Rory Mitchell
parent 198f3a6c4a
commit c5b229632d
14 changed files with 59 additions and 298 deletions

View File

@@ -66,27 +66,6 @@ def params_basic_1x4(rank):
}), 20
def params_basic_2x2(rank):
return dict(base_params, **{
'n_gpus': 2,
'gpu_id': 2*rank,
}), 20
def params_basic_4x1(rank):
return dict(base_params, **{
'n_gpus': 4,
'gpu_id': rank,
}), 20
def params_basic_asym(rank):
return dict(base_params, **{
'n_gpus': 1 if rank == 0 else 3,
'gpu_id': rank,
}), 20
rf_update_params = {
'subsample': 0.5,
'colsample_bynode': 0.5
@@ -103,11 +82,6 @@ def wrap_rf(params_fun):
params_rf_1x4 = wrap_rf(params_basic_1x4)
params_rf_2x2 = wrap_rf(params_basic_2x2)
params_rf_4x1 = wrap_rf(params_basic_4x1)
params_rf_asym = wrap_rf(params_basic_asym)
test_name = sys.argv[1]

View File

@@ -8,23 +8,5 @@ submit="timeout 30 python ../../dmlc-core/tracker/dmlc-submit"
echo -e "\n ====== 1. Basic distributed-gpu test with Python: 4 workers; 1 GPU per worker ====== \n"
$submit --num-workers=4 python distributed_gpu.py basic_1x4 || exit 1
echo -e "\n ====== 2. Basic distributed-gpu test with Python: 2 workers; 2 GPUs per worker ====== \n"
$submit --num-workers=2 python distributed_gpu.py basic_2x2 || exit 1
echo -e "\n ====== 3. Basic distributed-gpu test with Python: 2 workers; Rank 0: 1 GPU, Rank 1: 3 GPUs ====== \n"
$submit --num-workers=2 python distributed_gpu.py basic_asym || exit 1
echo -e "\n ====== 4. Basic distributed-gpu test with Python: 1 worker; 4 GPUs per worker ====== \n"
$submit --num-workers=1 python distributed_gpu.py basic_4x1 || exit 1
echo -e "\n ====== 5. RF distributed-gpu test with Python: 4 workers; 1 GPU per worker ====== \n"
echo -e "\n ====== 2. RF distributed-gpu test with Python: 4 workers; 1 GPU per worker ====== \n"
$submit --num-workers=4 python distributed_gpu.py rf_1x4 || exit 1
echo -e "\n ====== 6. RF distributed-gpu test with Python: 2 workers; 2 GPUs per worker ====== \n"
$submit --num-workers=2 python distributed_gpu.py rf_2x2 || exit 1
echo -e "\n ====== 7. RF distributed-gpu test with Python: 2 workers; Rank 0: 1 GPU, Rank 1: 3 GPUs ====== \n"
$submit --num-workers=2 python distributed_gpu.py rf_asym || exit 1
echo -e "\n ====== 8. RF distributed-gpu test with Python: 1 worker; 4 GPUs per worker ====== \n"
$submit --num-workers=1 python distributed_gpu.py rf_4x1 || exit 1