Skip to content

Improve performance for nested CompositeComponents #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2025
Merged

Conversation

gpeairs
Copy link
Member

@gpeairs gpeairs commented Apr 9, 2025

Implements #39 (proposal 4, composite components remember their hooks) and modifies transformation(::Schematic, ::ComponentNode) to avoid unnecessary searching. Deeply nested composite components should no longer show ~quadratic slowdown. Also takes a couple steps towards being more strict about coordinate type consistency in the Schematic.

@gpeairs gpeairs changed the title Improve node transformation calculation Improve performance for nested CompositeComponents Apr 9, 2025
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@gpeairs
Copy link
Member Author

gpeairs commented Apr 9, 2025

Cuts floorplanning time by 80% for DemoQPU17. Also junction rotation checking by 98%. Before:

Assembling schematic graph: 0.004190 seconds (39.59 k allocations: 3.764 MiB)
Floorplanning: 0.700999 seconds (5.49 M allocations: 371.339 MiB, 8.49% gc time, 0.79% compilation time)
Schematic design rule checking: 0.100096 seconds (908.97 k allocations: 43.558 MiB, 13.28% gc time)
Generating crossovers: 1.949626 seconds (2.18 M allocations: 161.057 MiB, 0.68% gc time)
Ground-plane hole fill: 0.607943 seconds (5.14 M allocations: 335.287 MiB, 4.62% gc time)
Rendering to polygons: 0.699862 seconds (5.78 M allocations: 299.489 MiB, 3.03% gc time)
Flattening cells: 0.054393 seconds (273.14 k allocations: 21.864 MiB)
Total: 4.122284 seconds (19.88 M allocations: 1.210 GiB, 3.28% gc time, 0.13% compilation time)
Saving: 0.412568 seconds (190.17 k allocations: 49.931 MiB)

After:

Assembling schematic graph: 0.005110 seconds (46.95 k allocations: 4.087 MiB)
Floorplanning: 0.128501 seconds (829.47 k allocations: 57.578 MiB, 10.84% gc time, 4.20% compilation time)
Schematic design rule checking: 0.002055 seconds (4.02 k allocations: 225.969 KiB)
Generating crossovers: 1.995282 seconds (482.94 k allocations: 76.544 MiB, 0.73% gc time)
Ground-plane hole fill: 0.605566 seconds (5.43 M allocations: 355.211 MiB, 4.71% gc time)
Rendering to polygons: 0.639860 seconds (5.79 M allocations: 299.579 MiB, 3.77% gc time)
Flattening cells: 0.052672 seconds (273.13 k allocations: 21.864 MiB)
Total: 3.437676 seconds (12.92 M allocations: 817.623 MiB, 2.46% gc time, 0.16% compilation time)
Saving: 0.422955 seconds (190.17 k allocations: 49.931 MiB, 1.11% gc time)

First-run compile time for plan is also down by 8 seconds but that's just because it was previously compiling some geometry which is now just compiled later.

@gpeairs gpeairs force-pushed the gp/composite-hooks branch from fc03151 to b03dbb1 Compare April 9, 2025 21:59
@gpeairs gpeairs force-pushed the gp/composite-hooks branch from 827244c to b4589e2 Compare April 10, 2025 15:06
@gpeairs gpeairs merged commit c5fa611 into main Apr 10, 2025
5 of 6 checks passed
@gpeairs gpeairs deleted the gp/composite-hooks branch April 11, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant