Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
jiazhihao committed Feb 11, 2019
1 parent 410effd commit 5a4d4ad
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
9 changes: 5 additions & 4 deletions cnn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,19 @@ void top_level_task(const Task *task, const std::vector<PhysicalRegion> &regions
printf("datasetPath(synthetic data)\n");
else
printf("datasetPath(%s)\n", datasetPath.c_str());
if (strategy != "opt")
printf("strategy(Default Data Parallelism)\n");
printf("strategy(%s)\n", strategy.c_str());
if (strategy.find("optimized") == std::string::npos)
printf("Default Data Parallelism\n");
else
printf("strategy(FlexFlow Optimized Strategy)\n");
printf("FlexFlow Optimized Strategy\n");
if (workersPerNode == 0) {
printf("Missing -ll:gpu (number of GPUs to use on each node)\n");
return;
}
}
num_par_n = workersPerNode * numNodes;
fc_num_par_n = workersPerNode * numNodes;
if (strategy == "opt")
if (strategy.find("optimized") != std::string::npos)
fc_num_par_n = 1;
//assert(num_par_h * num_par_w * num_par_n == fc_num_par_c * fc_num_par_n);
CnnModel model(batchSize, height, width, num_par_n, num_par_h, num_par_w,
Expand Down
2 changes: 1 addition & 1 deletion ffcompile.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# GPU_ARCH must be one of fermi, k20, pascal, volta
# set GPU_ARCH to one of fermi, k20, k80, pascal, and volta
export GPU_ARCH=volta

# set CUDA_HOME to the directoy of cuda, which should have subdirectories bin/, include/, and lib/
Expand Down
24 changes: 12 additions & 12 deletions run_experiments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# AlexNet experiments
./ffcompile.sh alexnet

./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy dp
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy opt
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy dp
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy opt
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy dp
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy opt
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_data_parallel.strategy
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_optimized.strategy
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_data_parallel.strategy
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_optimized.strategy
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_data_parallel.strategy
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_optimized.strategy

# ResNet experiments
./ffcompile.sh resnet
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy dp
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy opt
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy dp
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy opt
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy dp
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy opt
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_data_parallel.strategy
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_optimized.strategy
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_data_parallel.strategy
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_optimized.strategy
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_data_parallel.strategy
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_optimized.strategy


Binary file added strategies/alexnet_data_parallel.strategy
Binary file not shown.
Binary file added strategies/alexnet_optimized.strategy
Binary file not shown.
Binary file added strategies/resnet121_data_parallel.strategy
Binary file not shown.
Binary file added strategies/resnet121_optimized.strategy
Binary file not shown.

0 comments on commit 5a4d4ad

Please sign in to comment.