From 5ec3e9a0f03c3491f4e23e03ca0d996fd9c1725c Mon Sep 17 00:00:00 2001 From: Arne Symons Date: Mon, 18 Nov 2024 12:23:31 +0100 Subject: [PATCH] update energy and area field of operational_array --- zigzag/inputs/hardware/ascend_like.yaml | 4 ++-- zigzag/inputs/hardware/edge_tpu_like.yaml | 4 ++-- zigzag/inputs/hardware/eyeriss_like.yaml | 4 ++-- zigzag/inputs/hardware/generic_array_cacti.yaml | 4 ++-- zigzag/inputs/hardware/meta_prototype.yaml | 4 ++-- zigzag/inputs/hardware/tesla_npu_like.yaml | 4 ++-- zigzag/inputs/hardware/tpu_like.yaml | 4 ++-- zigzag/parser/accelerator_factory.py | 4 ++-- zigzag/parser/accelerator_validator.py | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/zigzag/inputs/hardware/ascend_like.yaml b/zigzag/inputs/hardware/ascend_like.yaml index 8a2f2378b..3af0fe651 100644 --- a/zigzag/inputs/hardware/ascend_like.yaml +++ b/zigzag/inputs/hardware/ascend_like.yaml @@ -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] diff --git a/zigzag/inputs/hardware/edge_tpu_like.yaml b/zigzag/inputs/hardware/edge_tpu_like.yaml index d387432e0..45c978ac8 100644 --- a/zigzag/inputs/hardware/edge_tpu_like.yaml +++ b/zigzag/inputs/hardware/edge_tpu_like.yaml @@ -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] diff --git a/zigzag/inputs/hardware/eyeriss_like.yaml b/zigzag/inputs/hardware/eyeriss_like.yaml index 1410ac061..41409078d 100644 --- a/zigzag/inputs/hardware/eyeriss_like.yaml +++ b/zigzag/inputs/hardware/eyeriss_like.yaml @@ -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] diff --git a/zigzag/inputs/hardware/generic_array_cacti.yaml b/zigzag/inputs/hardware/generic_array_cacti.yaml index 425fd438f..f9ff3c6f5 100644 --- a/zigzag/inputs/hardware/generic_array_cacti.yaml +++ b/zigzag/inputs/hardware/generic_array_cacti.yaml @@ -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] diff --git a/zigzag/inputs/hardware/meta_prototype.yaml b/zigzag/inputs/hardware/meta_prototype.yaml index f4d242afa..ec2010ced 100644 --- a/zigzag/inputs/hardware/meta_prototype.yaml +++ b/zigzag/inputs/hardware/meta_prototype.yaml @@ -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] diff --git a/zigzag/inputs/hardware/tesla_npu_like.yaml b/zigzag/inputs/hardware/tesla_npu_like.yaml index 60597c8bd..c15d22670 100644 --- a/zigzag/inputs/hardware/tesla_npu_like.yaml +++ b/zigzag/inputs/hardware/tesla_npu_like.yaml @@ -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] diff --git a/zigzag/inputs/hardware/tpu_like.yaml b/zigzag/inputs/hardware/tpu_like.yaml index 87a8a1f75..4181e8b2f 100644 --- a/zigzag/inputs/hardware/tpu_like.yaml +++ b/zigzag/inputs/hardware/tpu_like.yaml @@ -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] diff --git a/zigzag/parser/accelerator_factory.py b/zigzag/parser/accelerator_factory.py index ec40aeef7..6fc0f9064 100644 --- a/zigzag/parser/accelerator_factory.py +++ b/zigzag/parser/accelerator_factory.py @@ -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] = { diff --git a/zigzag/parser/accelerator_validator.py b/zigzag/parser/accelerator_validator.py index 215fd6b48..d52c4bc70 100644 --- a/zigzag/parser/accelerator_validator.py +++ b/zigzag/parser/accelerator_validator.py @@ -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",