gdsdiff 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/.github/workflows/ci.yml +14 -4
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/.github/workflows/release.yml +29 -12
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/AGENTS.md +8 -4
- gdsdiff-0.2.0/CHANGELOG.md +41 -0
- gdsdiff-0.2.0/CONTRIBUTING.md +26 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/MANIFEST.in +1 -0
- gdsdiff-0.2.0/PKG-INFO +159 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/PROVENANCE.md +3 -3
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/QUALIFICATION.md +23 -3
- gdsdiff-0.2.0/README.md +112 -0
- gdsdiff-0.2.0/agents/gdsdiff.md +149 -0
- gdsdiff-0.2.0/benchmarks/gdsdiff/README.md +32 -0
- gdsdiff-0.2.0/docs/api.md +68 -0
- gdsdiff-0.2.0/docs/gdsdiff.md +195 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/docs/gdsdiff_debugging.md +28 -7
- gdsdiff-0.2.0/docs/gdsdiff_engine.md +114 -0
- gdsdiff-0.2.0/docs/gdsdiff_report.md +193 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/docs/gdsdiff_semantics.md +16 -7
- gdsdiff-0.2.0/docs/releasing.md +59 -0
- gdsdiff-0.1.0/provenance/scgds-commit-map.txt → gdsdiff-0.2.0/provenance/source-commit-map.txt +1 -1
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/pyproject.toml +4 -1
- gdsdiff-0.2.0/scripts/installed_smoke.py +166 -0
- gdsdiff-0.2.0/scripts/verify_release.py +122 -0
- gdsdiff-0.2.0/src/gdsdiff/_boolean_evidence.py +199 -0
- gdsdiff-0.2.0/src/gdsdiff/_filled_coverage_audit.py +62 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/_version.py +1 -1
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/api.py +970 -369
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/cuda_ctypes.py +133 -2
- gdsdiff-0.2.0/src/gdsdiff/backends/cuda_exact.py +314 -0
- gdsdiff-0.2.0/src/gdsdiff/backends/polygon_extract_ctypes.py +232 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/cache.py +7 -1
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/canonicalize.py +2 -2
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/cli.py +69 -3
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/config.py +9 -0
- gdsdiff-0.2.0/src/gdsdiff/cuda_diff.py +316 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/cuda_setup.py +25 -14
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/diagnostics.py +2 -2
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/diff_gds.py +10 -2
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/exact_diff_markdown.py +144 -50
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/exact_oracle.py +156 -30
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/inventory.py +19 -11
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_cache.py +1 -2
- gdsdiff-0.2.0/src/gdsdiff/native_src/gds_polygon_extract.cpp +971 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/BOOST_LICENSE_1_0.txt +23 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_clipper.cuh +3004 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_clipper_workspace.cuh +209 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_ctypes.cu +410 -97
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_exact.cu +1274 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_exact_artifacts.hpp +230 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_exact_context.cuh +195 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_exact_fracture.cuh +144 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_exact_geometry.cuh +318 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_exact_records.cuh +315 -0
- gdsdiff-0.2.0/src/gdsdiff/native_src/gdsdiff/cuda_orthogonal.cuh +573 -0
- gdsdiff-0.2.0/src/gdsdiff/orthogonal_coverage.py +267 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/policy.py +8 -6
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/polygon_components.py +105 -53
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/source_edge_diff.py +19 -26
- gdsdiff-0.2.0/src/gdsdiff/sparse_coverage.py +333 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/windowed_exact.py +45 -48
- gdsdiff-0.2.0/src/gdsdiff.egg-info/PKG-INFO +159 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff.egg-info/SOURCES.txt +27 -1
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff.egg-info/requires.txt +3 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_api.py +35 -1
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_backend_dispatch.py +7 -8
- gdsdiff-0.2.0/tests/test_boolean_evidence.py +343 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_canonicalize.py +11 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cli.py +53 -0
- gdsdiff-0.2.0/tests/test_cuda_exact_diff.py +274 -0
- gdsdiff-0.2.0/tests/test_cuda_exact_sweep.py +287 -0
- gdsdiff-0.2.0/tests/test_cuda_orthogonal_coverage.py +186 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cuda_polygon_record_delta.py +20 -1
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_exact_oracle.py +60 -2
- gdsdiff-0.2.0/tests/test_filled_coverage_audit.py +26 -0
- gdsdiff-0.2.0/tests/test_gpu_requirement.py +517 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_inventory.py +45 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_native_build.py +2 -9
- gdsdiff-0.2.0/tests/test_native_polygon_extract.py +269 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_policy.py +25 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_polygon_components.py +23 -1
- gdsdiff-0.2.0/tests/test_release_verification.py +110 -0
- gdsdiff-0.2.0/tests/test_sparse_coverage.py +176 -0
- gdsdiff-0.1.0/CHANGELOG.md +0 -17
- gdsdiff-0.1.0/CONTRIBUTING.md +0 -15
- gdsdiff-0.1.0/PKG-INFO +0 -135
- gdsdiff-0.1.0/README.md +0 -90
- gdsdiff-0.1.0/agents/gdsdiff.md +0 -86
- gdsdiff-0.1.0/benchmarks/gdsdiff/README.md +0 -14
- gdsdiff-0.1.0/docs/api.md +0 -19
- gdsdiff-0.1.0/docs/gdsdiff.md +0 -58
- gdsdiff-0.1.0/docs/gdsdiff_engine.md +0 -125
- gdsdiff-0.1.0/docs/gdsdiff_report.md +0 -64
- gdsdiff-0.1.0/docs/releasing.md +0 -31
- gdsdiff-0.1.0/src/gdsdiff/backends/polygon_extract_ctypes.py +0 -233
- gdsdiff-0.1.0/src/gdsdiff/native_src/gds_polygon_extract.cpp +0 -594
- gdsdiff-0.1.0/src/gdsdiff.egg-info/PKG-INFO +0 -135
- gdsdiff-0.1.0/tests/test_native_polygon_extract.py +0 -119
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/LICENSE +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/SECURITY.md +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/benchmarks/gdsdiff/run_benchmarks.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/setup.cfg +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/__init__.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/__main__.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/_environment.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/acceptance_evidence.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/__init__.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/base.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/boundary_loop_ctypes.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/cpu.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/cpu_ctypes.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/cuda.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/exact.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/geometry_ctypes.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/identity.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/metal.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/metal_ctypes.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/backends/structural_ctypes.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/boundary_loops.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/design_history.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/extract.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/gds_metadata.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/geometry.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/grid.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/hierarchy.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/hierarchy_extract.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/multiprocessing_support.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/cpu_prefilter.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gds_boundary_loops.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gds_geometry_scan.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gds_structural_scan.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/CMakeLists.txt +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/core.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/core.hpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_assignment.cu +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_assignment.cuh +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_candidates.cu +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_candidates.cuh +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_memory.cu +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/cuda_memory.cuh +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/metal_ctypes.mm +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/python_bindings.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/test_core.cpp +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/test_cuda_assignment.cu +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/test_cuda_candidates.cu +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/native_src/gdsdiff/test_cuda_memory.cu +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/profiles.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/py.typed +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/rect_coverage.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/report.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/schemas/gdsdiff_report-v1.schema.json +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/semantics.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/spatial.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/structural_guard.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/surplus_coverage.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/synthetic_suite.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/templates.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/tiling.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff/windows.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff.egg-info/dependency_links.txt +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff.egg-info/entry_points.txt +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/src/gdsdiff.egg-info/top_level.txt +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/__init__.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/fixtures.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/generate_fixtures.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/golden/.gitkeep +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_acceptance_evidence.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_benchmarks.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_boundary_loops.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_config.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cpp_core.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cpu_tiling.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cuda_assignment.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cuda_candidates.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cuda_memory.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_cuda_setup.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_diagnostics.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_extract.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_golden_corpus.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_grid_resolution.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_hierarchy_match.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_metal_polygon_record_delta.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_multiprocessing_support.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_native_cache.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_native_geometry_scan.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_outputs.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_profiles.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_property.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_rect_coverage.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_report_schema.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_semantics.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_spatial_index.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_structural_guard.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_surplus_coverage.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_synthetic_suite.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_template_workflow.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_windowed_exact.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_windowed_hierarchy_extract.py +0 -0
- {gdsdiff-0.1.0 → gdsdiff-0.2.0}/tests/test_windows.py +0 -0
|
@@ -54,10 +54,20 @@ jobs:
|
|
|
54
54
|
- name: Smoke-test installed wheel
|
|
55
55
|
shell: bash
|
|
56
56
|
run: |
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
wheels=("$GITHUB_WORKSPACE"/dist/*.whl)
|
|
58
|
+
for mode in base audit; do
|
|
59
|
+
target="${wheels[0]}"
|
|
60
|
+
args=()
|
|
61
|
+
if [[ "$mode" == audit ]]; then
|
|
62
|
+
target+="[cuda-audit]"
|
|
63
|
+
args+=(--cpu-audit)
|
|
64
|
+
fi
|
|
65
|
+
env_dir="$RUNNER_TEMP/gdsdiff-wheel-$mode"
|
|
66
|
+
uv venv --python 3.14 "$env_dir"
|
|
67
|
+
uv pip install --python "$env_dir/bin/python" --index-url https://pypi.org/simple "$target" jsonschema
|
|
68
|
+
cd "$RUNNER_TEMP"
|
|
69
|
+
"$env_dir/bin/python" "$GITHUB_WORKSPACE/scripts/installed_smoke.py" "${args[@]}"
|
|
70
|
+
done
|
|
61
71
|
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
|
62
72
|
with:
|
|
63
73
|
name: gdsdiff-distributions
|
|
@@ -18,6 +18,8 @@ jobs:
|
|
|
18
18
|
build:
|
|
19
19
|
timeout-minutes: 20
|
|
20
20
|
runs-on: ubuntu-latest
|
|
21
|
+
outputs:
|
|
22
|
+
channel: ${{ steps.release-version.outputs.channel }}
|
|
21
23
|
steps:
|
|
22
24
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
23
25
|
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
|
|
@@ -27,10 +29,10 @@ jobs:
|
|
|
27
29
|
with:
|
|
28
30
|
version: ${{ env.UV_VERSION }}
|
|
29
31
|
- name: Verify tag and package versions
|
|
32
|
+
id: release-version
|
|
30
33
|
shell: bash
|
|
31
34
|
run: |
|
|
32
|
-
|
|
33
|
-
test "v$package_version" = "$GITHUB_REF_NAME"
|
|
35
|
+
python scripts/verify_release.py tag "$GITHUB_REF_NAME" pyproject.toml >> "$GITHUB_OUTPUT"
|
|
34
36
|
- run: uv lock --check
|
|
35
37
|
- run: uv sync --locked --extra test
|
|
36
38
|
- run: uv run --locked --extra test python -m pytest
|
|
@@ -79,19 +81,33 @@ jobs:
|
|
|
79
81
|
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
80
82
|
with:
|
|
81
83
|
version: ${{ env.UV_VERSION }}
|
|
82
|
-
-
|
|
84
|
+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
|
|
85
|
+
with:
|
|
86
|
+
name: release-distributions
|
|
87
|
+
path: release
|
|
88
|
+
- name: Verify TestPyPI release bytes and smoke-test the installed wheel
|
|
83
89
|
shell: bash
|
|
84
90
|
run: |
|
|
85
91
|
version=${GITHUB_REF_NAME#v}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
verified="$RUNNER_TEMP/gdsdiff-verified"
|
|
93
|
+
python scripts/verify_release.py testpypi "$version" release/SHA256SUMS "$verified"
|
|
94
|
+
for mode in base audit; do
|
|
95
|
+
target="$verified/gdsdiff-$version-py3-none-any.whl"
|
|
96
|
+
args=()
|
|
97
|
+
if [[ "$mode" == audit ]]; then
|
|
98
|
+
target+="[cuda-audit]"
|
|
99
|
+
args+=(--cpu-audit)
|
|
100
|
+
fi
|
|
101
|
+
env_dir="$RUNNER_TEMP/gdsdiff-testpypi-$mode"
|
|
102
|
+
uv venv --python 3.14 "$env_dir"
|
|
103
|
+
uv pip install --python "$env_dir/bin/python" --index-url https://pypi.org/simple "$target" jsonschema
|
|
104
|
+
cd "$RUNNER_TEMP"
|
|
105
|
+
"$env_dir/bin/python" "$GITHUB_WORKSPACE/scripts/installed_smoke.py" "${args[@]}"
|
|
106
|
+
done
|
|
91
107
|
|
|
92
108
|
pypi:
|
|
93
|
-
if: ${{
|
|
94
|
-
needs: verify-testpypi
|
|
109
|
+
if: ${{ needs.build.outputs.channel == 'stable' }}
|
|
110
|
+
needs: [build, verify-testpypi]
|
|
95
111
|
timeout-minutes: 10
|
|
96
112
|
runs-on: ubuntu-latest
|
|
97
113
|
environment: pypi
|
|
@@ -107,7 +123,6 @@ jobs:
|
|
|
107
123
|
packages-dir: release/packages
|
|
108
124
|
|
|
109
125
|
github-release:
|
|
110
|
-
if: ${{ !contains(github.ref_name, 'rc') }}
|
|
111
126
|
needs: pypi
|
|
112
127
|
timeout-minutes: 10
|
|
113
128
|
runs-on: ubuntu-latest
|
|
@@ -121,4 +136,6 @@ jobs:
|
|
|
121
136
|
- name: Create GitHub release
|
|
122
137
|
env:
|
|
123
138
|
GH_TOKEN: ${{ github.token }}
|
|
124
|
-
run:
|
|
139
|
+
run: >-
|
|
140
|
+
gh release create "$GITHUB_REF_NAME" release/packages/* release/SHA256SUMS
|
|
141
|
+
--repo "$GITHUB_REPOSITORY" --verify-tag --generate-notes
|
|
@@ -4,17 +4,21 @@ This repository is the standalone `gdsdiff` GDSII comparison library. Durable
|
|
|
4
4
|
implementation belongs under `src/gdsdiff/`; tests belong under `tests/`.
|
|
5
5
|
Read `agents/gdsdiff.md` before changing comparator semantics, reports,
|
|
6
6
|
artifacts, acceleration, or agent-facing diff workflows.
|
|
7
|
+
Use `docs/gdsdiff.md` and `docs/gdsdiff_report.md` for command and report
|
|
8
|
+
behavior. Keep these docs and the agent workflow current when behavior changes.
|
|
7
9
|
|
|
8
10
|
## Environment
|
|
9
11
|
|
|
10
12
|
- Identify the host OS and architecture before environment-sensitive work.
|
|
11
|
-
- Use `.venv_wsl/bin/python`
|
|
12
|
-
|
|
13
|
+
- Use `.venv_wsl/bin/python` for normal imports and runtime development on
|
|
14
|
+
Windows 11 through WSL, and `.venv_wsl_test/bin/python` for every test run.
|
|
15
|
+
Use `.venv_mac/bin/python` on macOS, and `.venv/bin/python` on native Linux.
|
|
13
16
|
- Do not use the base system Python for imports, builds, or tests.
|
|
14
17
|
- CPU behavior must remain usable without CUDA, Metal, CMake, or a compiler.
|
|
15
18
|
- Use the exact `uv` version required by `pyproject.toml`. On WSL under
|
|
16
|
-
`/mnt/f`,
|
|
17
|
-
`
|
|
19
|
+
`/mnt/f`, keep `.venv_wsl` synchronized without test extras, target
|
|
20
|
+
`.venv_wsl_test` with development/test extras, set `UV_LINK_MODE=copy`, and
|
|
21
|
+
set `TMPDIR=/tmp` for pytest. Use `.venv_mac` on macOS and `.venv` on Linux.
|
|
18
22
|
|
|
19
23
|
## Development Rules
|
|
20
24
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
- Add `--require-gpu-diff` and `CompareConfig(require_gpu_diff=True)` to
|
|
6
|
+
require CUDA for source inventory, directional coverage including holes,
|
|
7
|
+
and allowance classification. Unverified comparisons return exit 2
|
|
8
|
+
without CPU fallback. Existing `--require-gpu` behavior is unchanged.
|
|
9
|
+
- In strict CUDA mode, the independent CPU audit checks exact filled coverage
|
|
10
|
+
and allowance classification even when path splits or hole bridges differ.
|
|
11
|
+
Source inventory still requires full vertex and multiplicity agreement.
|
|
12
|
+
The audit supports GDSTK 1.0.1 and 1.0.2; `gdsdiff[cuda-audit]` selects 1.0.2.
|
|
13
|
+
- Speed up CUDA comparisons with parallel input preparation and verified
|
|
14
|
+
sparse hole correction, even when polygon counts change. An independent
|
|
15
|
+
CPU audit can check full coverage vertices and source inventory.
|
|
16
|
+
- Support unit-scale GDS references rotated by multiples of 90 degrees on
|
|
17
|
+
CUDA and Metal.
|
|
18
|
+
- Keep GPU failures visible even when exact CPU fallback succeeds.
|
|
19
|
+
`--require-gpu` returns exit 2 if no GPU comparison ran.
|
|
20
|
+
- Reject partial GDSTK Boolean output. Record verified recoveries in the
|
|
21
|
+
report and keep failed recovery visible.
|
|
22
|
+
- Add `gdsdiff inspect` to list cells, layers, and stored records without
|
|
23
|
+
flattening.
|
|
24
|
+
- Use `GDSDIFF_NATIVE_CACHE_DIR` for cache overrides; the old alias is no
|
|
25
|
+
longer read.
|
|
26
|
+
|
|
27
|
+
## 0.1.0 - 2026-07-18
|
|
28
|
+
|
|
29
|
+
- Promote the independently verified `0.1.0rc1` package without behavior or
|
|
30
|
+
dependency changes.
|
|
31
|
+
- Record successful OIDC Trusted Publishing, signed attestations, exact
|
|
32
|
+
GitHub/TestPyPI artifact parity, clean indexed installation, and the complete
|
|
33
|
+
Python 3.10/3.14 Ubuntu, macOS, and Windows release-candidate matrix.
|
|
34
|
+
|
|
35
|
+
## 0.1.0rc1 - 2026-07-17
|
|
36
|
+
|
|
37
|
+
- Extract `gdsdiff` as an independently installable package while
|
|
38
|
+
preserving its comparator history and public behavior.
|
|
39
|
+
- Replaced executable pickle geometry caches with versioned JSON/NumPy caches.
|
|
40
|
+
- Added side-effect-free CUDA inspection, explicit preparation, stronger native
|
|
41
|
+
cache identity/permissions, packaged-schema validation, and release workflows.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Use Python 3.10 or newer and the pinned `uv` release. On WSL use:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
UV_PROJECT_ENVIRONMENT=.venv_wsl UV_LINK_MODE=copy uv sync --locked --no-dev
|
|
7
|
+
UV_PROJECT_ENVIRONMENT=.venv_wsl_test UV_LINK_MODE=copy uv sync --locked --extra dev
|
|
8
|
+
TMPDIR=/tmp .venv_wsl_test/bin/python -m pytest
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Keep WSL test dependencies in `.venv_wsl_test`; `.venv_wsl` remains the clean
|
|
12
|
+
runtime environment. Use `.venv_mac` on macOS and `.venv` on native Linux.
|
|
13
|
+
Ordinary `pip` installs remain a required distribution-compatibility gate.
|
|
14
|
+
|
|
15
|
+
Changes to comparison semantics, report fields, exit codes, root exports, or
|
|
16
|
+
native acceleration must include focused tests and compatibility notes. Keep
|
|
17
|
+
CPU-only operation fully supported.
|
|
18
|
+
|
|
19
|
+
For acceleration changes, qualify the full geometry and inventory evidence
|
|
20
|
+
against the independent CPU oracle before reporting timings. For release
|
|
21
|
+
compatibility, compare verified revisions in separate pinned environments.
|
|
22
|
+
Record deliberate changes separately from regressions. Use synthetic GDS
|
|
23
|
+
fixtures in durable tests; keep external layouts out of the repository. See the
|
|
24
|
+
[benchmark instructions](benchmarks/gdsdiff/README.md) and keep the
|
|
25
|
+
[user guide](docs/gdsdiff.md), [report guide](docs/gdsdiff_report.md), and
|
|
26
|
+
[agent workflow](agents/gdsdiff.md) aligned with the shipped behavior.
|
gdsdiff-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gdsdiff
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Exact, evidence-oriented comparison of GDSII layout geometry
|
|
5
|
+
Author-email: Sandbo Chang <sandbochang@outlook.com>
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/SandboChang/gdsdiff
|
|
8
|
+
Project-URL: Issues, https://github.com/SandboChang/gdsdiff/issues
|
|
9
|
+
Project-URL: Repository, https://github.com/SandboChang/gdsdiff
|
|
10
|
+
Keywords: GDSII,CAD,layout,geometry,verification
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: gdstk>=1.0.0
|
|
30
|
+
Requires-Dist: numpy>=1.26
|
|
31
|
+
Provides-Extra: test
|
|
32
|
+
Requires-Dist: jsonschema>=4.23; extra == "test"
|
|
33
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
34
|
+
Requires-Dist: tomli; python_version < "3.11" and extra == "test"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
37
|
+
Requires-Dist: jsonschema>=4.23; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
39
|
+
Requires-Dist: tomli; python_version < "3.11" and extra == "dev"
|
|
40
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
41
|
+
Provides-Extra: native-dev
|
|
42
|
+
Requires-Dist: cmake>=3.24; extra == "native-dev"
|
|
43
|
+
Requires-Dist: pybind11>=2.12; extra == "native-dev"
|
|
44
|
+
Provides-Extra: cuda-audit
|
|
45
|
+
Requires-Dist: gdstk==1.0.2; extra == "cuda-audit"
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
|
|
48
|
+
# gdsdiff
|
|
49
|
+
|
|
50
|
+
`gdsdiff` compares the geometry and hierarchy of two GDSII layouts and emits
|
|
51
|
+
neutral, machine-readable evidence. The CLI automatically uses a prepared CUDA
|
|
52
|
+
or Metal backend when available, with exact CPU `gdstk` as the reference and
|
|
53
|
+
fallback.
|
|
54
|
+
|
|
55
|
+
The package is usable on CPU-only machines. CUDA, Metal, CMake, and compiler
|
|
56
|
+
toolchains are runtime capabilities, not mandatory Python dependencies.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
python -m pip install gdsdiff
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Command line
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
python -m gdsdiff before.gds after.gds --output-dir comparison
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`--output-dir` writes `report.json`, `exact_diff.md`, and the lossless
|
|
71
|
+
`diff_vertices.jsonl` sidecar. Coverage and source-polygon inventory are
|
|
72
|
+
separate, so a split or merge can be reported even if coverage is unchanged.
|
|
73
|
+
The default neutral comparison returns `0` for identical evidence, `1` for
|
|
74
|
+
differences to review, and `2` when the requested comparison cannot be verified.
|
|
75
|
+
|
|
76
|
+
To check a single file's units, cells, and geometry layers before comparing:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
python -m gdsdiff inspect layout.gds
|
|
80
|
+
python -m gdsdiff inspect layout.gds --top TOP --json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Inspection counts stored records without expanding reference arrays. Use `--top`
|
|
84
|
+
when the file has more than one top-level cell.
|
|
85
|
+
|
|
86
|
+
## GPU acceleration
|
|
87
|
+
|
|
88
|
+
CUDA on Linux or WSL requires an NVIDIA GPU, a compatible driver, the CUDA
|
|
89
|
+
toolkit (`nvcc`), and a host compiler. Metal on Apple Silicon requires the
|
|
90
|
+
Xcode command-line tools. Installing or importing `gdsdiff` does not compile
|
|
91
|
+
either backend.
|
|
92
|
+
|
|
93
|
+
Prepare the CUDA backend once, then run an exact GPU diff:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python -m gdsdiff.cuda_setup --exact-diff
|
|
97
|
+
python -m gdsdiff before.gds after.gds \
|
|
98
|
+
--backend cuda --require-gpu-diff --output-dir cuda_diff
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`--require-gpu-diff` computes coverage (including holes), source-polygon
|
|
102
|
+
inventory, and allowance clipping on CUDA. Input preparation and report writing
|
|
103
|
+
stay on the host. A completed GPU diff sets `backend.gpu_diff_complete` to `true`
|
|
104
|
+
in `report.json`. If CUDA cannot complete the comparison, the command exits `2`
|
|
105
|
+
instead of falling back to a CPU diff.
|
|
106
|
+
|
|
107
|
+
Use `--backend cuda --require-gpu` when GPU work is required but CPU coverage or
|
|
108
|
+
correction is acceptable. The [backend guide][backends] covers supported inputs
|
|
109
|
+
and optional independent CPU verification.
|
|
110
|
+
|
|
111
|
+
## Python API
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from gdsdiff import CompareConfig, compare_gds_files
|
|
115
|
+
|
|
116
|
+
result = compare_gds_files(
|
|
117
|
+
CompareConfig("before.gds", "after.gds", backend="cpu")
|
|
118
|
+
)
|
|
119
|
+
print(result.status, result.exit_code)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Polygon extraction is public so downstream tools such as `ebeamtime` can share
|
|
123
|
+
the same zero-copy `PolygonBuffer` representation:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
from gdsdiff import extract_gds_polygons
|
|
127
|
+
|
|
128
|
+
extraction = extract_gds_polygons("layout.gds", layers="1:0,2:0")
|
|
129
|
+
print(extraction.buffer.polygon_count)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
See the [command guide][commands], [Python API][api], [report guide][reports],
|
|
133
|
+
and [agent instructions][agents].
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
For local development from this checkout, use the `uv` version pinned in
|
|
138
|
+
`pyproject.toml`. On WSL:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
UV_PROJECT_ENVIRONMENT=.venv_wsl UV_LINK_MODE=copy uv sync --locked --no-dev
|
|
142
|
+
UV_PROJECT_ENVIRONMENT=.venv_wsl_test UV_LINK_MODE=copy uv sync --locked --extra dev
|
|
143
|
+
TMPDIR=/tmp .venv_wsl_test/bin/python -m pytest
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
On WSL, `.venv_wsl` is the clean runtime environment and `.venv_wsl_test` owns
|
|
147
|
+
all test tooling. On native Linux, run `uv sync --locked --extra dev` and
|
|
148
|
+
`.venv/bin/python -m pytest`. On macOS, set `UV_PROJECT_ENVIRONMENT=.venv_mac`
|
|
149
|
+
for the sync and run tests with `.venv_mac/bin/python -m pytest`.
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
GPL-3.0-only. See `LICENSE`.
|
|
154
|
+
|
|
155
|
+
[commands]: https://github.com/SandboChang/gdsdiff/blob/main/docs/gdsdiff.md
|
|
156
|
+
[backends]: https://github.com/SandboChang/gdsdiff/blob/main/docs/gdsdiff.md#backend-selection
|
|
157
|
+
[api]: https://github.com/SandboChang/gdsdiff/blob/main/docs/api.md
|
|
158
|
+
[reports]: https://github.com/SandboChang/gdsdiff/blob/main/docs/gdsdiff_report.md
|
|
159
|
+
[agents]: https://github.com/SandboChang/gdsdiff/blob/main/agents/gdsdiff.md
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Extraction Provenance
|
|
2
2
|
|
|
3
|
-
This repository was filtered from
|
|
3
|
+
This repository was filtered from the original consuming project at source commit
|
|
4
4
|
`368d62988251bc29076008609cc0f29ba4f44128` with `git-filter-repo` 2.47.0.
|
|
5
5
|
|
|
6
6
|
Preserved history covers the original `gds_tools_tk/gpu_compare`, renamed
|
|
7
|
-
`gds_tools_tk/gdsdiff`, and final
|
|
7
|
+
`gds_tools_tk/gdsdiff`, and final embedded comparator implementation and focused
|
|
8
8
|
tests. The source and test paths were normalized to `src/gdsdiff` and `tests`.
|
|
9
9
|
The retained non-empty mappings are recorded in
|
|
10
|
-
`provenance/
|
|
10
|
+
`provenance/source-commit-map.txt`; the complete generated map also remains in
|
|
11
11
|
`.git/filter-repo/commit-map` in the original extraction checkout.
|
|
@@ -4,11 +4,11 @@ Qualified on 2026-07-17 under WSL2 Linux x86_64 with Python 3.14.4.
|
|
|
4
4
|
|
|
5
5
|
- History: 15 relevant source commits retained with original authors, dates,
|
|
6
6
|
and messages, followed by two standalone migration commits.
|
|
7
|
-
- Independence:
|
|
7
|
+
- Independence: shipping code and tests do not import the original consuming project.
|
|
8
8
|
- API: all 112 generic baseline root exports and signatures were preserved
|
|
9
9
|
after normalizing package and version names. The standalone root has 118
|
|
10
10
|
exports after adding the documented extraction types/parsers, version, and
|
|
11
|
-
diagnostics; the
|
|
11
|
+
diagnostics; the project-specific profile factory stayed with the consumer.
|
|
12
12
|
- Correctness: normalized report JSON, semantic diff GDS, and CLI help exactly
|
|
13
13
|
match the embedded baseline.
|
|
14
14
|
- Tests: the extraction baseline CPU-only suite produced 266 passes and 62
|
|
@@ -37,7 +37,7 @@ Qualified on 2026-07-17 under WSL2 Linux x86_64 with Python 3.14.4.
|
|
|
37
37
|
Python's unrelated metadata/email/ZIP modules into every comparison process.
|
|
38
38
|
- Packaging: wheel and sdist built successfully, passed `twine check`, and the
|
|
39
39
|
wheel contains the report schema, `py.typed`, CUDA/Metal/native sources, and
|
|
40
|
-
no tests or
|
|
40
|
+
no tests or consumer package. A clean wheel-only environment passed
|
|
41
41
|
`pip check`, imports, module CLI, and diagnostics outside the source tree.
|
|
42
42
|
- RC1 publication rehearsal: clean `/tmp` snapshots produced wheel and sdist;
|
|
43
43
|
both rebuilt and installed outside the source tree with `uv`, and the wheels
|
|
@@ -54,3 +54,23 @@ Qualified on 2026-07-17 under WSL2 Linux x86_64 with Python 3.14.4.
|
|
|
54
54
|
disappeared between probes; real Apple Silicon evidence is non-blocking.
|
|
55
55
|
|
|
56
56
|
No TestPyPI or PyPI upload, Git tag, or release was created.
|
|
57
|
+
|
|
58
|
+
## 0.2.x Compatibility
|
|
59
|
+
|
|
60
|
+
Compatibility checks used separate locked environments for the released
|
|
61
|
+
`v0.1.0` (`6bdc0c7`), the 0.2.0 source revision (`753a352`), and the
|
|
62
|
+
optimized follow-up (`441498f`). Check the imported source path and revision
|
|
63
|
+
as well as the distribution version when reproducing these comparisons.
|
|
64
|
+
|
|
65
|
+
On the synthetic matrix, previously supported cases kept the same selection,
|
|
66
|
+
directional vertex evidence, inventory multiplicity, and exit meaning.
|
|
67
|
+
Orthogonal references newly complete on the native route. When native input
|
|
68
|
+
is rejected, optional GPU now reports the failure and returns exact CPU
|
|
69
|
+
evidence when possible. Required GPU still exits 2 if no device work ran.
|
|
70
|
+
An unrecovered Boolean warning is not exact evidence. The old consumer-specific
|
|
71
|
+
native-cache alias has been retired; use `GDSDIFF_NATIVE_CACHE_DIR`.
|
|
72
|
+
|
|
73
|
+
The verified-context correction compares full vertices and inventory against
|
|
74
|
+
an independent `gdstk` read. The older, unaudited source-edge route is not a
|
|
75
|
+
substitute for that check on complex contours: in qualification, an annular
|
|
76
|
+
fixture needed `--audit-cpu-oracle` to obtain the CPU reference fragments.
|
gdsdiff-0.2.0/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# gdsdiff
|
|
2
|
+
|
|
3
|
+
`gdsdiff` compares the geometry and hierarchy of two GDSII layouts and emits
|
|
4
|
+
neutral, machine-readable evidence. The CLI automatically uses a prepared CUDA
|
|
5
|
+
or Metal backend when available, with exact CPU `gdstk` as the reference and
|
|
6
|
+
fallback.
|
|
7
|
+
|
|
8
|
+
The package is usable on CPU-only machines. CUDA, Metal, CMake, and compiler
|
|
9
|
+
toolchains are runtime capabilities, not mandatory Python dependencies.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m pip install gdsdiff
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Command line
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python -m gdsdiff before.gds after.gds --output-dir comparison
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`--output-dir` writes `report.json`, `exact_diff.md`, and the lossless
|
|
24
|
+
`diff_vertices.jsonl` sidecar. Coverage and source-polygon inventory are
|
|
25
|
+
separate, so a split or merge can be reported even if coverage is unchanged.
|
|
26
|
+
The default neutral comparison returns `0` for identical evidence, `1` for
|
|
27
|
+
differences to review, and `2` when the requested comparison cannot be verified.
|
|
28
|
+
|
|
29
|
+
To check a single file's units, cells, and geometry layers before comparing:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python -m gdsdiff inspect layout.gds
|
|
33
|
+
python -m gdsdiff inspect layout.gds --top TOP --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Inspection counts stored records without expanding reference arrays. Use `--top`
|
|
37
|
+
when the file has more than one top-level cell.
|
|
38
|
+
|
|
39
|
+
## GPU acceleration
|
|
40
|
+
|
|
41
|
+
CUDA on Linux or WSL requires an NVIDIA GPU, a compatible driver, the CUDA
|
|
42
|
+
toolkit (`nvcc`), and a host compiler. Metal on Apple Silicon requires the
|
|
43
|
+
Xcode command-line tools. Installing or importing `gdsdiff` does not compile
|
|
44
|
+
either backend.
|
|
45
|
+
|
|
46
|
+
Prepare the CUDA backend once, then run an exact GPU diff:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python -m gdsdiff.cuda_setup --exact-diff
|
|
50
|
+
python -m gdsdiff before.gds after.gds \
|
|
51
|
+
--backend cuda --require-gpu-diff --output-dir cuda_diff
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`--require-gpu-diff` computes coverage (including holes), source-polygon
|
|
55
|
+
inventory, and allowance clipping on CUDA. Input preparation and report writing
|
|
56
|
+
stay on the host. A completed GPU diff sets `backend.gpu_diff_complete` to `true`
|
|
57
|
+
in `report.json`. If CUDA cannot complete the comparison, the command exits `2`
|
|
58
|
+
instead of falling back to a CPU diff.
|
|
59
|
+
|
|
60
|
+
Use `--backend cuda --require-gpu` when GPU work is required but CPU coverage or
|
|
61
|
+
correction is acceptable. The [backend guide][backends] covers supported inputs
|
|
62
|
+
and optional independent CPU verification.
|
|
63
|
+
|
|
64
|
+
## Python API
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from gdsdiff import CompareConfig, compare_gds_files
|
|
68
|
+
|
|
69
|
+
result = compare_gds_files(
|
|
70
|
+
CompareConfig("before.gds", "after.gds", backend="cpu")
|
|
71
|
+
)
|
|
72
|
+
print(result.status, result.exit_code)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Polygon extraction is public so downstream tools such as `ebeamtime` can share
|
|
76
|
+
the same zero-copy `PolygonBuffer` representation:
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from gdsdiff import extract_gds_polygons
|
|
80
|
+
|
|
81
|
+
extraction = extract_gds_polygons("layout.gds", layers="1:0,2:0")
|
|
82
|
+
print(extraction.buffer.polygon_count)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
See the [command guide][commands], [Python API][api], [report guide][reports],
|
|
86
|
+
and [agent instructions][agents].
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
For local development from this checkout, use the `uv` version pinned in
|
|
91
|
+
`pyproject.toml`. On WSL:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
UV_PROJECT_ENVIRONMENT=.venv_wsl UV_LINK_MODE=copy uv sync --locked --no-dev
|
|
95
|
+
UV_PROJECT_ENVIRONMENT=.venv_wsl_test UV_LINK_MODE=copy uv sync --locked --extra dev
|
|
96
|
+
TMPDIR=/tmp .venv_wsl_test/bin/python -m pytest
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
On WSL, `.venv_wsl` is the clean runtime environment and `.venv_wsl_test` owns
|
|
100
|
+
all test tooling. On native Linux, run `uv sync --locked --extra dev` and
|
|
101
|
+
`.venv/bin/python -m pytest`. On macOS, set `UV_PROJECT_ENVIRONMENT=.venv_mac`
|
|
102
|
+
for the sync and run tests with `.venv_mac/bin/python -m pytest`.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
GPL-3.0-only. See `LICENSE`.
|
|
107
|
+
|
|
108
|
+
[commands]: https://github.com/SandboChang/gdsdiff/blob/main/docs/gdsdiff.md
|
|
109
|
+
[backends]: https://github.com/SandboChang/gdsdiff/blob/main/docs/gdsdiff.md#backend-selection
|
|
110
|
+
[api]: https://github.com/SandboChang/gdsdiff/blob/main/docs/api.md
|
|
111
|
+
[reports]: https://github.com/SandboChang/gdsdiff/blob/main/docs/gdsdiff_report.md
|
|
112
|
+
[agents]: https://github.com/SandboChang/gdsdiff/blob/main/agents/gdsdiff.md
|