Skip to content

Commit

Permalink
update imc creator
Browse files Browse the repository at this point in the history
  • Loading branch information
JiacongSun committed May 18, 2024
1 parent 0f3098e commit 7986805
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zigzag/parser/accelerator_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ def create_imc_array(self) -> AimcArray or DimcArray:
# Imc settings
cells_size: int = self.data["memories"]["cells"]["size"]
imc_data: dict[str, Any] = self.data["operational_array"]
oa_dims: list[str] = imc_data["dimensions"]
dimension_sizes: dict[OADimension, int] = {
OADimension(oa_dim): imc_data["sizes"][i] for i, oa_dim in enumerate(oa_dims)
}
if imc_data["imc_type"] == "analog":
imc_array = AimcArray(cells_size, imc_data)
imc_array = AimcArray(cells_size, imc_data, dimension_sizes)
else:
imc_array = DimcArray(cells_size, imc_data)
imc_array = DimcArray(cells_size, imc_data, dimension_sizes)
return imc_array

def create_operational_array(self) -> OperationalArray:
Expand Down

0 comments on commit 7986805

Please sign in to comment.