limbo018 / DREAMPlace

Deep learning toolkit-enabled VLSI placement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running `python dreamplace/Placer.py test/ispd2015/lefdef/mgc_des_perf_a.json` with `shapely >= 2.0`

wangzhen0518 opened this issue · comments

error info

Traceback (most recent call last):
  File "/home/wangzhen/Project/DREAMPlace/dreamplace/Placer.py", line 174, in <module>
    place(params)
  File "/home/wangzhen/Project/DREAMPlace/dreamplace/Placer.py", line 39, in place
    placedb(params)
  File "/home/wangzhen/Project/DREAMPlace/dreamplace/PlaceDB.py", line 625, in __call__
    self.initialize(params)
  File "/home/wangzhen/Project/DREAMPlace/dreamplace/PlaceDB.py", line 770, in initialize
    virtual_macro_for_fence_region = [
  File "/home/wangzhen/Project/DREAMPlace/dreamplace/PlaceDB.py", line 771, in <listcomp>
    fence_region.slice_non_fence_region(
  File "/home/wangzhen/Project/DREAMPlace/dreamplace/ops/fence_region/fence_region.py", line 172, in slice_non_fence_region
    slices.extend([j.bounds for j in intersect if (isinstance(j, Polygon) and len(j.bounds) == 4)])
TypeError: 'GeometryCollection' object is not iterable

It seems that line 172 in dreamplace/ops/fence_region/fence_region.py needs to be changed to slices.extend([j.bounds for j in **intersect.geoms** if (isinstance(j, Polygon) and len(j.bounds) == 4)]) with shapely >= 2.0.

commented

same error, how do you fixes it, thanks

I just modified the code as the end of my description.

It seems that line 172 in dreamplace/ops/fence_region/fence_region.py needs to be changed to slices.extend([j.bounds for j in **intersect.geoms** if (isinstance(j, Polygon) and len(j.bounds) == 4)]) with shapely >= 2.0.

Fixed at 5314f94