G-Contour is a GPU-accelerated contour tracing framework for converting large binary layout images into polygon contours. This repository contains the Python evaluation script, benchmark images, and a PyTorch C++/CUDA extension for single-GPU contour tracing.
python -u eval.py --GPU --device 0 --benchmark gcd_ng_polygonTo generate GDS outputs for all benchmarks into temp/:
./run_all.shrun_all.sh accepts one optional mode flag:
./run_all.sh CPU # run CPU benchmarks only
./run_all.sh GPU # run GPU benchmarks only
./run_all.sh ALL # run both CPU and GPU benchmarksIf no flag is provided, the script defaults to ALL.
CPU_metal layer visualization opened with KLayout:
If you use this work for academic research, please cite:
@inproceedings{g-contour,
title={G-Contour: GPU Accelerated Contour Tracing For Large-Scale Layouts},
author={Yin, Shuo and Xu, Jiahao and Jiang, Jiaxi and Li, Mingjun and Ma, Yuzhe and Ho, Tsung-Yi and Yu, Bei},
booktitle={2025 IEEE/ACM International Conference On Computer Aided Design (ICCAD)},
pages={1--9},
year={2025},
organization={IEEE}
}Note: the open-source implementation does not depend on the OpenCV package.
