From 65fbac9696234231c67debb3d7ac63b68ce942d3 Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Fri, 30 Oct 2020 01:03:01 +0800 Subject: [PATCH 1/2] Add more Rome models --- src/graph/rome_models.h | 22 ++++++ tools/scripts/topo_val.sh | 2 +- tools/topo_expl/models/topo_4p3l_n2.xml | 87 +++++++++++++++++++++++ tools/topo_expl/models/topo_4p3l_n4.xml | 93 +++++++++++++++++++++++++ tools/topo_expl/topo_expl.cpp | 4 ++ 5 files changed, 207 insertions(+), 1 deletion(-) create mode 100644 tools/topo_expl/models/topo_4p3l_n2.xml create mode 100644 tools/topo_expl/models/topo_4p3l_n4.xml diff --git a/src/graph/rome_models.h b/src/graph/rome_models.h index 4b671b011..134ec46ab 100755 --- a/src/graph/rome_models.h +++ b/src/graph/rome_models.h @@ -166,6 +166,26 @@ static struct rcclRomeModel rome_model_28 = { .ringBase = "0 3 2 1 4 5 6 7|7 6 5 4 1 2 3 0|0 2 5 7 4 6 3 1|1 3 6 4 7 5 2 0", }; +static struct rcclRomeModel rome_model_40 = { + .nGpus = 8, .nCpus = 4, .nNics = 1, .nLinks = 3, + .gpuIds = { 0x43000, 0x23000, 0x26000, 0x3000, 0xc3000, 0xc6000, 0xa3000, 0x83000, }, + .gpuNuma = { 0, 1, 1, 1, 2, 2, 3, 3, }, + .nicNuma = { 2, }, + .connMatrix = { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, }, + .pattern = "10302120", + .ringBase = "6 7 1 4 0 5 3 2|7 6 4 1 0 2 3 5", +}; + +static struct rcclRomeModel rome_model_42 = { + .nGpus = 8, .nCpus = 7, .nNics = 1, .nLinks = 3, + .gpuIds = { 0x43000, 0x23000, 0x26000, 0x3000, 0xc3000, 0xc6000, 0xa3000, 0x83000, }, + .gpuNuma = { 1, 2, 2, 3, 5, 5, 6, 7, }, + .nicNuma = { 4, }, + .connMatrix = { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, }, + .pattern = "00102010012010", + .ringBase = "7 4 6 1 3 0 2 5|6 4 7 1 3 2 5 0", +}; + static struct rcclRomeModel romeTopoModels[] = { rome_model_22, rome_model_25, @@ -180,4 +200,6 @@ static struct rcclRomeModel romeTopoModels[] = { rome_model_23, rome_model_38, rome_model_28, + rome_model_40, + rome_model_42, }; diff --git a/tools/scripts/topo_val.sh b/tools/scripts/topo_val.sh index 556c0f60b..92cd4b0e0 100755 --- a/tools/scripts/topo_val.sh +++ b/tools/scripts/topo_val.sh @@ -21,7 +21,7 @@ DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -for i in {0..38} +for i in {0..42} do $DIR/../topo_expl/topo_expl -m $i > "topo_m$i.log" $DIR/../TopoVisual/topo_visual.sh -i "topo_m$i.log" diff --git a/tools/topo_expl/models/topo_4p3l_n2.xml b/tools/topo_expl/models/topo_4p3l_n2.xml new file mode 100644 index 000000000..656a271d2 --- /dev/null +++ b/tools/topo_expl/models/topo_4p3l_n2.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/topo_expl/models/topo_4p3l_n4.xml b/tools/topo_expl/models/topo_4p3l_n4.xml new file mode 100644 index 000000000..5faafa55e --- /dev/null +++ b/tools/topo_expl/models/topo_4p3l_n4.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/topo_expl/topo_expl.cpp b/tools/topo_expl/topo_expl.cpp index 338e63b57..3809ae200 100644 --- a/tools/topo_expl/topo_expl.cpp +++ b/tools/topo_expl/topo_expl.cpp @@ -108,6 +108,10 @@ NodeModelDesc model_descs[] = { {4, "topo_8p_rome_n2_2.xml", "4 nodes 8 VEGA20 Rome NPS=2 Alt. Model 2 NET/IF"}, {4, "topo_8p_ts1_n4_2.xml", "4 nodes 8 VEGA20 TS1 NPS=4 3 NET/IF"}, {1, "topo_8p_rome_n4.xml", "single node 8 VEGA20 Rome NPS=4"}, + {1, "topo_4p3l_n2.xml", "single node 8 gfx908 Rome"}, + {4, "topo_4p3l_n2.xml", "4 nodes 8 gfx908 Rome"}, + {1, "topo_4p3l_n4.xml", "single node 8 gfx908 Rome NPS=4"}, + {4, "topo_4p3l_n4.xml", "4 nodes 8 gfx908 Rome NPS=4"}, }; int main(int argc,char* argv[]) From 1a3def519829b8784b3a5758e4cba53b31cc5044 Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Fri, 30 Oct 2020 20:07:38 -0400 Subject: [PATCH 2/2] Add more models --- src/graph/rome_models.h | 11 +++ tools/scripts/topo_val.sh | 2 +- tools/topo_expl/models/topo_4p3l_n2_1.xml | 87 +++++++++++++++++++++++ tools/topo_expl/topo_expl.cpp | 2 + 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 tools/topo_expl/models/topo_4p3l_n2_1.xml diff --git a/src/graph/rome_models.h b/src/graph/rome_models.h index 134ec46ab..65a572c91 100755 --- a/src/graph/rome_models.h +++ b/src/graph/rome_models.h @@ -186,6 +186,16 @@ static struct rcclRomeModel rome_model_42 = { .ringBase = "7 4 6 1 3 0 2 5|6 4 7 1 3 2 5 0", }; +static struct rcclRomeModel rome_model_44 = { + .nGpus = 8, .nCpus = 4, .nNics = 1, .nLinks = 3, + .gpuIds = { 0x63000, 0x43000, 0x27000, 0x3000, 0xe3000, 0xc3000, 0xa3000, 0x83000, }, + .gpuNuma = { 0, 0, 1, 1, 2, 2, 3, 3, }, + .nicNuma = { 2, }, + .connMatrix = { 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, }, + .pattern = "20202120", + .ringBase = "4 5 7 6 2 1 3 0|7 4 5 6 2 0 1 3", +}; + static struct rcclRomeModel romeTopoModels[] = { rome_model_22, rome_model_25, @@ -202,4 +212,5 @@ static struct rcclRomeModel romeTopoModels[] = { rome_model_28, rome_model_40, rome_model_42, + rome_model_44, }; diff --git a/tools/scripts/topo_val.sh b/tools/scripts/topo_val.sh index 92cd4b0e0..fcc07c387 100755 --- a/tools/scripts/topo_val.sh +++ b/tools/scripts/topo_val.sh @@ -21,7 +21,7 @@ DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -for i in {0..42} +for i in {0..44} do $DIR/../topo_expl/topo_expl -m $i > "topo_m$i.log" $DIR/../TopoVisual/topo_visual.sh -i "topo_m$i.log" diff --git a/tools/topo_expl/models/topo_4p3l_n2_1.xml b/tools/topo_expl/models/topo_4p3l_n2_1.xml new file mode 100644 index 000000000..b1943a320 --- /dev/null +++ b/tools/topo_expl/models/topo_4p3l_n2_1.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/topo_expl/topo_expl.cpp b/tools/topo_expl/topo_expl.cpp index 3809ae200..ff283cc5a 100644 --- a/tools/topo_expl/topo_expl.cpp +++ b/tools/topo_expl/topo_expl.cpp @@ -112,6 +112,8 @@ NodeModelDesc model_descs[] = { {4, "topo_4p3l_n2.xml", "4 nodes 8 gfx908 Rome"}, {1, "topo_4p3l_n4.xml", "single node 8 gfx908 Rome NPS=4"}, {4, "topo_4p3l_n4.xml", "4 nodes 8 gfx908 Rome NPS=4"}, + {1, "topo_4p3l_n2_1.xml", "single node 8 gfx908 Rome"}, + {4, "topo_4p3l_n2_1.xml", "4 nodes 8 gfx908 Rome"}, }; int main(int argc,char* argv[])