10000 update script · srcarroll/FlexFlow@5a4d4ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a4d4ad

Browse files
committed
update script
1 parent 410effd commit 5a4d4ad

7 files changed

+18
-17
lines changed

cnn.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,19 @@ void top_level_task(const Task *task, const std::vector<PhysicalRegion> &regions
6565
printf("datasetPath(synthetic data)\n");
6666
else
6767
printf("datasetPath(%s)\n", datasetPath.c_str());
68-
if (strategy != "opt")
69-
printf("strategy(Default Data Parallelism)\n");
68+
printf("strategy(%s)\n", strategy.c_str());
69+
if (strategy.find("optimized") == std::string::npos)
70+
printf("Default Data Parallelism\n");
7071
else
71-
printf("strategy(FlexFlow Optimized Strategy)\n");
72+
printf("FlexFlow Optimized Strategy\n");
7273
if (workersPerNode == 0) {
7374
printf("Missing -ll:gpu (number of GPUs to use on each node)\n");
7475
return;
7576
}
7677
}
7778
num_par_n = workersPerNode * numNodes;
7879
fc_num_par_n = workersPerNode * numNodes;
79-
if (strategy == "opt")
80+
if (strategy.find("optimized") != std::string::npos)
8081
fc_num_par_n = 1;
8182
//assert(num_par_h * num_par_w * num_par_n == fc_num_par_c * fc_num_par_n);
8283
CnnModel model(batchSize, height, width, num_par_n, num_par_h, num_par_w,

ffcompile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# GPU_ARCH must be one of fermi, k20, pascal, volta
3+
# set GPU_ARCH to one of fermi, k20, k80, pascal, and volta
44
export GPU_ARCH=volta
55

66
# set CUDA_HOME to the directoy of cuda, which should have subdirectories bin/, include/, and lib/

run_experiments.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
# AlexNet experiments
44
./ffcompile.sh alexnet
55

6-
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy dp
7-
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy opt
8-
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy dp
9-
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy opt
10-
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy dp
11-
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy opt
6+
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_data_parallel.strategy
7+
./alexnet -b 64 -ll:gpu 1 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_optimized.strategy
8+
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_data_parallel.strategy
9+
./alexnet -b 128 -ll:gpu 2 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_optimized.strategy
10+
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_data_parallel.strategy
11+
./alexnet -b 256 -ll:gpu 4 -ll:fsize 5000 -ll:zsize 5000 --strategy strategies/alexnet_optimized.strategy
1212

1313
# ResNet experiments
1414
./ffcompile.sh resnet
15-
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy dp
16-
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy opt
17-
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy dp
18-
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy opt
19-
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy dp
20-
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy opt
15+
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_data_parallel.strategy
16+
./resnet -b 64 -ll:gpu 1 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_optimized.strategy
17+
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_data_parallel.strategy
18+
./resnet -b 128 -ll:gpu 2 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_optimized.strategy
19+
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_data_parallel.strategy
20+
./resnet -b 256 -ll:gpu 4 -ll:fsize 9000 -ll:zsize 5000 --strategy strategies/resnet121_optimized.strategy
2121

2222

292 Bytes
Binary file not shown.

strategies/alexnet_optimized.strategy

292 Bytes
Binary file not shown.
2.65 KB
Binary file not shown.
2.65 KB
Binary file not shown.

0 commit comments

Comments
 (0)
0