tidy3d.plugins.klayout.BatchedDRCChecker#
- class BatchedDRCChecker[source]#
Bases:
objectCheck multiple designs with one KLayout invocation.
Starting a separate KLayout process for every design can dominate the cost of repeated DRC checks. This checker exports multiple designs, places each flattened layout in its own named subcell, and checks them together in one process. Each design may be generated from a different parameterization, making this useful for optimizer line searches as well as other workflows that need to check several related layouts.
A temporary runset copy enables KLayout’s
deepmode so result markers retain the design cell names and can be mapped back to one boolean per input design.Candidates are arranged in a near-square grid. Their separation in both axes is the largest shorter bounding-box dimension across the batch. If KLayout still reports a cross-candidate edge-pair or a violation outside a candidate cell, the checker raises instead of marking candidates invalid.
- Parameters:
export_fn (Callable[[Any, Path], None]) – Function that generates one design from an input value and writes it to the supplied GDS path.
drc_runset (Path) – KLayout
.drcor.lydrcrunset.drc_args (Mapping[str, object], optional) – Additional KLayout runtime definitions.
max_results_per_cell (int = 1) – Number of result markers retained per candidate cell.
verbose (bool = False) – Whether the KLayout runner logs progress.
debug_dir (Path, optional) – Root directory for failed-batch artifacts. When a candidate is invalid or checking raises, artifacts are copied into a unique child directory.
Attributes
Artifact directory written by the most recent call, if any.
Methods
check_candidates(candidates)Check an iterable of candidates in one KLayout invocation.
- property last_debug_dir#
Artifact directory written by the most recent call, if any.