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
remove gdspy dependency from gdsfactory #521
Comments
I'm in favor of switching to the KLayout backend |
I obviously support the klayout option but disclaimer is I don't use gdsfactory yet as I focus on zeropdk. That said, next 0.27 version will support static type checking with mypy and docstring inspection from vscode, which should be helpful for you guys. See KLayout/klayout#1125 |
I would be in favor of migrating to the gdstk backend. My experience working with both gdspy and gdstk is that the APIs are similar, give the same layout results within ~1nm (so folks existing silicon is back compatible) and the compile times are much faster in gdstk. |
I agree with @alexsludds . I think a migration to gdstk will be much more straightforward and there should be limited breaking changes because of the similarity between the two. i'm a big fan of klayout also and appreciative of the work from @thomaslima to make it easier to use the python API! but I'm not sure it makes sense to try and migrate gdsfactory over |
It's not straight forward to just swap phidl & gdspy for klayout. You have some fundamental differences in the design approach:
These can be partially addressed
I think long term it would make sense to step towards going with klayout, but I agree that gdstk is most likely the more sensible approach for now. The main reason I am mentioning long term klayout is that I believe the yaml placer uses klayout for placing cells (correct me if I'm wrong @joamatab ). If that's still the case, there is a problem when merging multiple (existing) partial gds. Without explicitly checking for duplicates, it silently merged them when usingklayout 0.26.9. Since 0.27.x you will get a quite cryptic error with a cell duplicate name. If you are aware, it's usually easy to fix, but not obvious when encountering it the first time. This beckmes even more fun when the application and python module have different versions. |
Hi @sebastian-goeldi I am curious about your comment about merging partial gds. I have to deal with this too and need to manually check for cell duplicates. Would you mind sharing an example and an expected behavior? I can try to implement a patch, or at least give a better error message. BTW Here's my code for loading a specific cell from a gds file: https://github.com/lightwave-lab/zeropdk/blob/master/zeropdk/klayout_extend/layout.py |
Hi @thomaslima . I don't have an example directly at hand. I will try to get a minimal working example running when I get back from vacation ;). But I think the proper solution would be to run either a full |
Hey folks, It's not bug free, but it does generate some basic geometry. I need folks help with handling dependencies on gds/oas generation. You will see it tries to create three waveguides of different shapes. However, in the layout all waveguides have the same shape, equal to the last waveguide that was placed. This is because of how I tried to implement the write_gds function: I spent a few hours trying different ways to implement phidl's write_gds and have it be compatible with gdstk, but I can't get the dependency handling correct. I'm hoping this might be really obvious to someone else. Best, |
thank you Alex, it looks good, I fixed some more tests Another alternative is to create an intermediate format (such as shapely) and use klayout to read and write gds files this is what Helge does in gdshelpers |
For example, the VLSIR project uses protocol buffers as an intermediate representation, and it has a rust package from converting to procol buffer to GDS |
After the gdstk segmentation issues Here is an MVP with klayout backend @growly is also looking into using VLSIR as a backend |
We were able to get rid of segmentation faults in gdstk by avoiding inheritance from gdstk.Polygon and gdstk.Label gdsfactory 6.0.0 will be released soon using gdstk backend 🎉 we also have an MVP of a |
gdsfactory is built on top of gdspy
The main issues are:
pip
We have some options
1. switch to klayout API
pip install klayout
. So no more need toconda install gdsfactory
for windows users.See @amccaugh work on the phidl klayout backed
@sebastian-goeldi
@thomaslima
See zeropdk
2. switch to gdstk
3. switch to rust
https://github.com/dan-fritchman/Layout21/
What do you think?
@thomasdorch
@tvt173
@flaport
@basnijholt
The text was updated successfully, but these errors were encountered: