Skip to content

Commit

Permalink
update energy and area field of operational_array
Browse files Browse the repository at this point in the history
  • Loading branch information
asyms committed Nov 18, 2024
1 parent 1c40bec commit 5ec3e9a
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/ascend_like.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ memories:

operational_array:
input_precision: [8, 8]
multiplier_energy: 0.04 # pJ
multiplier_area: 1 # unit
unit_energy: 0.04 # pJ
unit_area: 1 # unit
dimensions: [D1, D2, D3, D4]
sizes: [16, 16, 2, 2]
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/edge_tpu_like.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ memories:
served_dimensions: [D1, D2, D3, D4]

operational_array:
multiplier_energy: 0.04 # pJ
multiplier_area: 1 # unit
unit_energy: 0.04 # pJ
unit_area: 1 # unit
dimensions: [D1, D2, D3, D4]
sizes: [8, 8, 4, 4]
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/eyeriss_like.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ memories:
served_dimensions: [D1, D2]

operational_array:
multiplier_energy: 0.5 # pJ
multiplier_area: 0.1 # unit
unit_energy: 0.5 # pJ
unit_area: 0.1 # unit
dimensions: [D1, D2]
sizes: [14, 12]
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/generic_array_cacti.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ memories:
served_dimensions: [D1, D2]

operational_array:
multiplier_energy: 0.04 # pJ
multiplier_area: 1 # unit
unit_energy: 0.04 # pJ
unit_area: 1 # unit
dimensions: [D1, D2]
sizes: [256, 256]
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/meta_prototype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ memories:
served_dimensions: [D1, D2, D3, D4]

operational_array:
multiplier_energy: 0.04 # pJ
multiplier_area: 1 # unit
unit_energy: 0.04 # pJ
unit_area: 1 # unit
dimensions: [D1, D2, D3, D4]
sizes: [32, 2, 4, 4]
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/tesla_npu_like.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ memories:
served_dimensions: [D1, D2, D3]

operational_array:
multiplier_energy: 0.04 # pJ
multiplier_area: 1 # unit
unit_energy: 0.04 # pJ
unit_area: 1 # unit
dimensions: [D1, D2, D3]
sizes: [32, 32, 4]
4 changes: 2 additions & 2 deletions zigzag/inputs/hardware/tpu_like.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ memories:
served_dimensions: [D1, D2]

operational_array:
multiplier_energy: 0.04 # pJ
multiplier_area: 1 # unit
unit_energy: 0.04 # pJ
unit_area: 1 # unit
dimensions: [D1, D2]
sizes: [32, 32]
4 changes: 2 additions & 2 deletions zigzag/parser/accelerator_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def create_non_imc_array(self) -> MultiplierArray:
op_array_data: dict[str, Any] = self.data["operational_array"]

multiplier = Multiplier(
energy_cost=op_array_data["multiplier_energy"],
area=op_array_data["multiplier_area"],
energy_cost=op_array_data["unit_energy"],
area=op_array_data["unit_area"],
)
oa_dims: list[str] = op_array_data["dimensions"]
dimension_sizes: dict[OADimension, int] = {
Expand Down
4 changes: 2 additions & 2 deletions zigzag/parser/accelerator_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ class AcceleratorValidator:
"maxlength": 2,
},
# Non-IMC properties
"multiplier_energy": {"type": "float", "required": False},
"multiplier_area": {"type": "float", "required": False},
"unit_energy": {"type": "float", "required": False},
"unit_area": {"type": "float", "required": False},
# IMC properties
"imc_type": {
"type": "string",
Expand Down

0 comments on commit 5ec3e9a

Please sign in to comment.