|
def | __init__ (self, Accelerator accelerator, LayerNode layer, SpatialMappingInternal spatial_mapping, SpatialMappingInternal spatial_mapping_int, TemporalMapping temporal_mapping, bool access_same_data_considered_as_no_access=True) |
|
None | run (self) |
| Run the cost model evaluation. More...
|
|
def | collect_area_data (self) |
|
def | calc_mac_energy_cost (self) |
| Calculate the dynamic MAC energy Overrides superclass' method. More...
|
|
def | calc_latency (self) |
| The latency calculation is largely identical to that of the superclass, but with some modifications to fit the IMC requirement. More...
|
|
def | update_tclk (self) |
| This function calculate the Tclk for IMC (In-Memory-Computing) More...
|
|
def | __jsonrepr__ (self) |
| JSON representation used for saving this object to a json file. More...
|
|
def | __simplejsonrepr__ (self) |
| Simple JSON representation used for saving this object to a simple json file. More...
|
|
def | __init__ (self, *Accelerator accelerator, LayerNode layer, SpatialMappingInternal spatial_mapping, SpatialMappingInternal spatial_mapping_int, TemporalMapping temporal_mapping, bool access_same_data_considered_as_no_access=True, float cycles_per_op=1.0) |
| After initialization, the cost model evaluation is run. More...
|
|
None | calc_memory_utilization (self) |
|
None | calc_memory_word_access (self) |
|
None | calc_energy (self) |
| Calculates the energy cost of this cost model evaluation by calculating the memory reading/writing energy. More...
|
|
def | calc_memory_energy_cost (self) |
| Computes the memories reading/writing energy by converting the access patterns in self.mapping to energy breakdown using the memory hierarchy of the core on which the layer is mapped. More...
|
|
None | calc_double_buffer_flag (self) |
| This function checks the double-buffer possibility for each operand at each memory level (minimal memory BW requirement case) by comparing the physical memory size with the effective data size, taking into account the memory sharing between operands. More...
|
|
def | calc_allowed_and_real_data_transfer_cycle_per_data_transfer_link (self) |
| Construct a 4-way data transfer pattern for each unit mem, calculate {allowed_mem_updating_cycle, real_data_trans_cycle, DTL_SS_cycle} per period. More...
|
|
MemoryAccesses | calculate_real_data_transfer_cycles (self, LayerOperand layer_op, MemoryOperand mem_op, int mem_lvl_id) |
|
MemoryAccesses | calculate_allowed_transfer_cycles (self, LayerOperand layer_op, int mem_lv) |
|
None | combine_data_transfer_rate_per_physical_port (self) |
| Consider memory sharing and port sharing, combine the data transfer activity Step 1: collect port activity per memory instance per physical memory port Step 2: calculate SS combine and MUW union parameters per physical memory port. More...
|
|
list[PortBeginOrEndActivity] | calc_loading_single_port_period_count_1 (self, MemoryPort port, list[tuple[MemoryOperand, int, DataDirection]] mem_op_level_direction_combs, float total_req_bw_aver_computation) |
| Calculate the loading activities for the memory port movement directions with period count of 1. More...
|
|
list[PortBeginOrEndActivity] | calc_loading_single_port_period_count_greater_than_1 (self, MemoryPort port, list[tuple[MemoryOperand, int, DataDirection]] mem_op_level_direction_combs) |
| Calculate the loading and offloading activities with mem port movement directions period > 1. More...
|
|
def | calc_loading_single_port (self, MemoryPort port) |
| Calculate the loading and offloading activities for a single memory port. More...
|
|
def | calc_onloading_combined (self) |
|
def | calc_offloading_combined (self) |
|
tuple[float, float] | calc_borrowed_loading_cycles_and_bandwidth (self) |
| Calculate the amount of cycles and bandwidth that are borrowed from the computation phase. More...
|
|
def | calc_data_loading_latency (self) |
| Calculate the number of data onloading/offloading cycles. More...
|
|
None | calc_overall_latency (self) |
| This function integrates the previous calculated SScomb, data loading and off-loading cycle to get the overall latency. More...
|
|
FourWayDataMoving[int] | get_inst_bandwidth (self, MemoryLevel memory_level, MemoryOperand memory_operand, float scaling=1) |
| Given a memory level and a memory operand, compute the memory's instantaneous bandwidth required for the memory operand during computation. More...
|
|
FourWayDataMoving[int] | get_total_inst_bandwidth (self, MemoryLevel memory_level, float scaling=1) |
| Given a cost model evaluation and a memory level, compute the memory's total instantaneous bandwidth required throughout the execution of the layer that corresponds to this CME. More...
|
|
def | __str__ (self) |
|
def | __repr__ (self) |
|
None | __init__ (self) |
|
def | core (self) |
|
"CumulativeCME" | __add__ (self, "CostModelEvaluationABC" other) |
|
def | __mul__ (self, int number) |
|
Class that stores inputs and runs them through the zigzag cost model.
Initialize the cost model evaluation with the following inputs:
- accelerator: the accelerator that includes the core on which to run the layer
- layer: the layer to run
- spatial_mapping: the spatial mapping
- temporal_mapping: the temporal mapping
From these parameters, the following attributes are computed:
- core: The core on which the layer is ran. This should be specified in the LayerNode attributes.
- mapping: The combined spatial and temporal mapping object where access patterns are computed.
The following cost model attributes are also initialized:
- mem_energy_breakdown: The energy breakdown for all operands
- energy: The total energy
After initialization, the cost model evaluation is run.