Skip to content

Commit

Permalink
fix(optimizer): calculation of transfer costs
Browse files Browse the repository at this point in the history
formatting
  • Loading branch information
lukasrothenberger committed Jan 5, 2024
1 parent 3a355a0 commit a30b583
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def get_transfer_costs(context: ContextObject, environment: Experiment) -> CostM
if symbolic_memory_region_sizes:
symbol_value_suggestions[cast(Symbol, transfer_size)] = value_suggestion

# transfer_costs [us] = [1000000 * s]
# transfer_size [B]
# transfer_speed [MB/s] = [1000000 * B/s]
# * 1000000 gets removed due to mathematics
transfer_costs = transfer_size / transfer_speed

total_transfer_costs += transfer_costs
Expand Down
20 changes: 10 additions & 10 deletions discopop_library/discopop_optimizer/classes/system/system_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ def generate_default_system_configuration(file_path: str):
"compute_init_delays": {"target_teams_distribute_parallel_for": 0.01},
"device_id": 1,
"device_type": DeviceTypeEnum.GPU,
"frequency": 128000000,
"frequency": 256000000,
"processors": 128,
"teams": 3200,
"threads": 3200,
"transfer_init_delays[us]": {
"target_data_update": 35,
"target_enter_data": 90,
"target_exit_data": 4,
"average": 73,
"target_data_update": 350,
"target_enter_data": 900,
"target_exit_data": 40,
"average": 730,
},
"transfer_speeds": {"D2H_MB/s": 1800, "H2D_MB/s": 3600}, # MB/s
}
Expand All @@ -54,15 +54,15 @@ def generate_default_system_configuration(file_path: str):
"compute_init_delays": {"target_teams_distribute_parallel_for": 0.005},
"device_id": 2,
"device_type": DeviceTypeEnum.GPU,
"frequency": 128000000,
"frequency": 256000000,
"processors": 128,
"teams": 3200,
"threads": 3200,
"transfer_init_delays[us]": {
"target_data_update": 71,
"target_enter_data": 90,
"target_exit_data": 5,
"average": 81,
"target_data_update": 710,
"target_enter_data": 900,
"target_exit_data": 50,
"average": 810,
},
"transfer_speeds": {"D2H_MB/s": 1900, "H2D_MB/s": 4200}, # MB/s
}
Expand Down

0 comments on commit a30b583

Please sign in to comment.