-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
sims/AstraSim/frontend/Astra-Sim Parameters - INPUT FORMAT (1).csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Network,, | ||
Parameter,Range,SamePerDimension | ||
num-npus,"[8, 16, 32, 64, 128, 256, 512, 1024]",N/A | ||
num-dims,"(1, 4, 1)",N/A | ||
topology,"[{""Ring"", ""Switch"", ""FullyConnected""}]",TRUE | ||
npus_count,"[(1, num-npus, 1)]",FALSE | ||
bandwidth,"[5, 12.5, 25, 50, 100, 200]",FALSE | ||
latency,[{1}],TRUE | ||
,, | ||
System,, | ||
Parameter,Range,SamePerDimension | ||
scheduling-policy,"{""FIFO"", ""LIFO""}",N/A | ||
endpoint-delay,"(1, 1000, 1)",N/A | ||
active-chunks-per-dimension,"(1, 32, 1)",N/A | ||
preferred-dataset-splits,"(1, 1024, 1)",N/A | ||
all-reduce-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE | ||
all-gather-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE | ||
reduce-scatter-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE | ||
all-to-all-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE | ||
collective-optimization,"{""localBWAware"", ""baseline""}",N/A | ||
intra-dimension-scheduling,"{""FIFO"", ""SCF""}",N/A | ||
inter-dimension-scheduling,"{""baseline"", ""themis""}",N/A | ||
,, | ||
Workload,, | ||
Parameter,Range,SamePerDimension | ||
parallel-strategy,"{""dp"", ""fdsp"", ""mpdp""}",N/A | ||
data-parallel-degree,"[1, 2, 4, 8, 16, 32, 64, 128, 256, 512]",N/A | ||
model-parallel-degree,"[1, 2, 4, 8, 16, 32, 64, 128, 256, 512]",N/A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Network,,,, | ||
Parameter,Range,SamePerDimension,, | ||
num-npus,"[8, 16, 32, 64, 128, 256, 512, 1024]",N/A,, | ||
num-dims,"(1, 4, 1)",N/A,,"(min, max, step)" | ||
topology,"[{""Ring"", ""Switch"", ""FullyConnected""}]",TRUE,,"[ring, ring, ring]" | ||
npus_count,"[(1, num-npus, 1)]",FALSE,, | ||
bandwidth,"[5, 12.5, 25, 50, 100, 200]",FALSE,,"[5, 25, 50]" | ||
latency,[{1}],TRUE,, | ||
,,,, | ||
System,,,, | ||
Parameter,Range,SamePerDimension,, | ||
scheduling-policy,"{""FIFO"", ""LIFO""}",N/A,, | ||
endpoint-delay,"(1, 1000, 1)",N/A,, | ||
active-chunks-per-dimension,"(1, 32, 1)",N/A,, | ||
preferred-dataset-splits,"(1, 1024, 1)",N/A,, | ||
all-reduce-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE,, | ||
all-gather-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE,, | ||
reduce-scatter-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE,, | ||
all-to-all-implementation,"[{""ring"", ""direct"", ""oneRing"", ""oneDirect"", ""hierarchicalRing"", ""doubleBinaryTree""}]",FALSE,, | ||
collective-optimization,"{""localBWAware"", ""baseline""}",N/A,, | ||
intra-dimension-scheduling,"{""FIFO"", ""SCF""}",N/A,, | ||
inter-dimension-scheduling,"{""baseline"", ""themis""}",N/A,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import csv | ||
import os | ||
|
||
def parse_csv_to_knobs(input_csv): | ||
system_knobs = {} | ||
network_knobs = {} | ||
workload_knobs = {} | ||
|
||
current_knob_dict = None | ||
|
||
with open(input_csv, 'r') as csvfile: | ||
csvreader = csv.reader(csvfile) | ||
|
||
for row in csvreader: | ||
if row and row[0] == 'System': | ||
current_knob_dict = system_knobs | ||
elif row and row[0] == 'Network': | ||
current_knob_dict = network_knobs | ||
elif row and row[0] == 'Workload': | ||
current_knob_dict = workload_knobs | ||
elif row[0] == 'Parameter': | ||
next(csvreader) | ||
elif current_knob_dict is not None: | ||
parameter = row[0] | ||
# row[1] is a set or a tuple. Tuple is a range, and set is a set of possible values | ||
range = row[1] | ||
samePerDimension = row[2] | ||
current_knob_dict[parameter] = (eval(range), samePerDimension) | ||
|
||
return system_knobs, network_knobs | ||
|
||
# Example usage | ||
input_csv_file = 'parameter_specs.csv' | ||
|
||
settings_file_path = os.path.realpath(__file__) | ||
settings_dir_path = os.path.dirname(settings_file_path) | ||
proj_root_path = os.path.abspath(settings_dir_path) | ||
|
||
parameter_specs = os.path.join(proj_root_path, input_csv_file) | ||
|
||
|
||
SYSTEM_KNOBS, NETWORK_KNOBS = parse_csv_to_knobs(parameter_specs) | ||
|
||
print("SYSTEM_KNOBS:") | ||
print(SYSTEM_KNOBS) | ||
print("\nNETWORK_KNOBS:") | ||
print(NETWORK_KNOBS) |