The developing framework is beased on pytorch + hydra configuring template. FRAMEWORK README
Differentiable Edge-based OPC Guojin Chen¹ (work done during internship at NVIDIA Research), Haoyu Yang², Haoxing Mark Ren², Bei Yu¹, David Z. Pan³. ¹The Chinese University of Hong Kong · ²NVIDIA Research, Austin, USA · ³ECE, The University of Texas at Austin. Proc. 43rd IEEE/ACM International Conference on Computer-Aided Design (ICCAD '24), pp. 1–9, ACM, 2024. DOI: 10.1145/3676536.3676764
If you use this code, please cite:
@inproceedings{chen2024diffopc,
author = {Chen, Guojin and Yang, Haoyu and Ren, Haoxing Mark and Yu, Bei and Pan, David Z.},
title = {Differentiable Edge-based {OPC}},
booktitle = {Proceedings of the 43rd IEEE/ACM International Conference on Computer-Aided Design (ICCAD)},
year = {2024},
pages = {1--9},
publisher = {ACM},
address = {New York, NY, USA},
doi = {10.1145/3676536.3676764},
url = {https://dl.acm.org/doi/10.1145/3676536.3676764},
}# clone project
git clone https://github.com/dekura/DiffOPC.git
cd DiffOPC
# [OPTIONAL] create conda environment
conda create -n dopc python=3.10
conda activate dopc
# install pytorch according to instructions
# https://pytorch.org/get-started/
# install requirements
pip install -r requirements.txtRun a single ICCAD-2013 test case (debug config, 70 ILT iterations):
python src/diffopc.py opc=debug data=single data.data_idx=1 extras.print_config=falseRun the full 10-case ICCAD-2013 sweep:
python src/diffopc.py opc=debug data=default extras.print_config=falseDisable the Aim logger (skip writing to ./aim/):
python src/diffopc.py opc=debug data=single data.data_idx=1 extras.print_config=false logger=[]Verified on torch 2.11 / CUDA 13, single-case smoke runs:
| Case | L2 | PVBand | EPE | BestIter | Runtime |
|---|---|---|---|---|---|
| 1 | 41,159 | 60,955 | 3 | 59 | 19.2 s |
| 3 | 68,771 | 103,848 | 24 | 69 | 30.6 s |
- Use
opc=debugrather thanopc=default— the default config is missingSRAF_FORBIDDENandIsInsertSRAF, which are referenced by the data loader and the solver. - Shot counting (
eval_shot=True) requires theadaboxpackage, which is not on PyPI. The debug config haseval_shot: False, so this is only relevant if you turn shot counting on.
The directory structure:
├── .github <- Github Actions workflows
│
├── configs <- Hydra configs
│ ├── data <- Data configs: ICCAD or larger dataset
│ ├── experiment <- Experiment configs
│ ├── extras <- Extra utilities configs
│ ├── hydra <- Hydra configs
│ ├── logger <- Logger configs : aim stack logger
│ ├── opc <- OPC model configs
│ ├── litho <- litho model configs
│ ├── sraf <- sraf model configs
│ ├── paths <- Project paths configs
│ ├── solver <- Solver configs
│ │
│ ├── multidiff.yaml <- Multilevel config for optimization
│ └── diffopc.yaml <- Main config for optimization
│
├── benchmark <- Project data
│
├── logs <- Logs generated by hydra and lightning loggers
│
├── scripts <- Shell scripts
│
├── src <- Source code
│ ├── data <- Data scripts
│ ├── opc <- OPC Model scripts
│ ├── utils <- Utility scripts
│ │
│ └── diffopc.py <- Run training
│
├── tests <- Tests of any kind
│
├── .env.example <- Example of file for storing private environment variables
├── .gitignore <- List of files ignored by git
├── .pre-commit-config.yaml <- Configuration of pre-commit hooks for code formatting
├── .project-root <- File for inferring the position of project root directory
├── environment.yaml <- File for installing conda environment
├── Makefile <- Makefile with commands like `make train` or `make test`
├── pyproject.toml <- Configuration options for testing and linting
├── requirements.txt <- File for installing python dependencies
├── setup.py <- File for installing project as a package
└── README.md