polish README - 1
This commit is contained in:
50
README.md
50
README.md
@@ -1,9 +1,23 @@
|
|||||||
# Geo-Layout Transformer
|
# Geo-Layout Transformer 🚀
|
||||||
|
|
||||||
**A Unified, Self-Supervised Foundation Model for Physical Design Analysis**
|
**A Unified, Self-Supervised Foundation Model for Physical Design Analysis**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## ✨ Highlights
|
||||||
|
|
||||||
|
- **Unified foundation model** for diverse physical design analysis tasks
|
||||||
|
- **Hybrid GNN + Transformer** architecture capturing local-to-global layout semantics
|
||||||
|
- **Self-supervised pretraining** on unlabeled GDSII/OASIS for strong transferability
|
||||||
|
- **Modular task heads** for easy adaptation (e.g., hotspot detection, connectivity)
|
||||||
|
|
||||||
|
## 🖥️ Supported Systems
|
||||||
|
|
||||||
|
- **Python**: 3.9+
|
||||||
|
- **OS**: macOS 13+/Apple Silicon, Linux (Ubuntu 20.04/22.04). Windows via **WSL2** recommended
|
||||||
|
- **Frameworks**: PyTorch, PyTorch Geometric (with CUDA optional)
|
||||||
|
- **EDA I/O**: GDSII/OASIS (via `klayout` Python API)
|
||||||
|
|
||||||
## 1. Vision
|
## 1. Vision
|
||||||
|
|
||||||
The **Geo-Layout Transformer** is a research project aimed at creating a paradigm shift in Electronic Design Automation (EDA) for physical design. Instead of relying on a fragmented set of heuristic-based tools, we are building a single, unified foundation model that understands the deep, contextual "language" of semiconductor layouts.
|
The **Geo-Layout Transformer** is a research project aimed at creating a paradigm shift in Electronic Design Automation (EDA) for physical design. Instead of relying on a fragmented set of heuristic-based tools, we are building a single, unified foundation model that understands the deep, contextual "language" of semiconductor layouts.
|
||||||
@@ -30,6 +44,34 @@ The model's architecture is designed to hierarchically process layout informatio
|
|||||||
|
|
||||||
4. **Task-Specific Heads**: The final, context-aware embeddings from the Transformer are fed into simple, lightweight neural network "heads" for specific downstream tasks. This modular design allows the core model to be adapted to new applications with minimal effort.
|
4. **Task-Specific Heads**: The final, context-aware embeddings from the Transformer are fed into simple, lightweight neural network "heads" for specific downstream tasks. This modular design allows the core model to be adapted to new applications with minimal effort.
|
||||||
|
|
||||||
|
## 🧭 Project Structure
|
||||||
|
|
||||||
|
```text
|
||||||
|
Geo-Layout-Transformer/
|
||||||
|
├─ configs/ # Training & task configs (e.g., default, hotspot)
|
||||||
|
├─ scripts/
|
||||||
|
│ ├─ preprocess_gds.py # GDSII → graph dataset pipeline
|
||||||
|
│ └─ visualize_attention.py # Attention/interpretability utilities
|
||||||
|
├─ src/
|
||||||
|
│ ├─ data/
|
||||||
|
│ │ ├─ dataset.py # PyTorch Geometric dataset/dataloader
|
||||||
|
│ │ ├─ gds_parser.py # GDS/OASIS parsing helpers
|
||||||
|
│ │ └─ graph_constructor.py# Hetero-graph construction logic
|
||||||
|
│ ├─ engine/
|
||||||
|
│ │ ├─ trainer.py # Train loop (pretrain/fine-tune)
|
||||||
|
│ │ ├─ evaluator.py # Evaluation & metrics
|
||||||
|
│ │ └─ self_supervised.py # SSL tasks (e.g., masked layout modeling)
|
||||||
|
│ ├─ models/
|
||||||
|
│ │ ├─ gnn_encoder.py # Patch-level GNN encoder (e.g., RGAT)
|
||||||
|
│ │ ├─ transformer_core.py # Global Transformer backbone
|
||||||
|
│ │ ├─ task_heads.py # Downstream task heads
|
||||||
|
│ │ └─ geo_layout_transformer.py # End-to-end model composition
|
||||||
|
│ └─ utils/ # Config, logging, misc utilities
|
||||||
|
├─ main.py # Entry point (pretrain/train/infer)
|
||||||
|
├─ requirements.txt # Python deps (install after PyTorch/PyG)
|
||||||
|
└─ README*.md # English/Chinese documentation
|
||||||
|
```
|
||||||
|
|
||||||
## 3. Getting Started
|
## 3. Getting Started
|
||||||
|
|
||||||
### 3.1. Prerequisites
|
### 3.1. Prerequisites
|
||||||
@@ -64,6 +106,8 @@ The model's architecture is designed to hierarchically process layout informatio
|
|||||||
```
|
```
|
||||||
*(Note: You may need to install `klayout` separately via its own package manager or build from source to enable its Python API).*
|
*(Note: You may need to install `klayout` separately via its own package manager or build from source to enable its Python API).*
|
||||||
|
|
||||||
|
> Tip: GPU is optional. For CPU-only environments, install the CPU variants of PyTorch/PyG.
|
||||||
|
|
||||||
## 4. Project Usage
|
## 4. Project Usage
|
||||||
|
|
||||||
The project workflow is divided into two main stages: data preprocessing and model training.
|
The project workflow is divided into two main stages: data preprocessing and model training.
|
||||||
@@ -114,3 +158,7 @@ This project is ambitious and we welcome contributions. Our future roadmap inclu
|
|||||||
- [ ] **Generative Design**: Using the learned representations in a generative framework to synthesize "correct-by-construction" layouts.
|
- [ ] **Generative Design**: Using the learned representations in a generative framework to synthesize "correct-by-construction" layouts.
|
||||||
|
|
||||||
Please feel free to open an issue or submit a pull request.
|
Please feel free to open an issue or submit a pull request.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Made with ❤️ for EDA research and open-source collaboration.
|
||||||
|
|||||||
50
README_zh.md
50
README_zh.md
@@ -1,9 +1,23 @@
|
|||||||
# Geo-Layout Transformer
|
# Geo-Layout Transformer 🚀
|
||||||
|
|
||||||
**一个用于物理设计分析的统一、自监督基础模型**
|
**一个用于物理设计分析的统一、自监督基础模型**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## ✨ 亮点
|
||||||
|
|
||||||
|
- **统一基础模型**:覆盖多种物理设计分析任务
|
||||||
|
- **混合 GNN + Transformer**:从局部到全局建模版图语义
|
||||||
|
- **自监督预训练**:在无标签 GDSII/OASIS 上学习强泛化表示
|
||||||
|
- **模块化任务头**:轻松适配(如热点检测、连通性验证)
|
||||||
|
|
||||||
|
## 🖥️ 支持系统
|
||||||
|
|
||||||
|
- **Python**:3.9+
|
||||||
|
- **操作系统**:macOS 13+/Apple Silicon、Linux(Ubuntu 20.04/22.04)。Windows 建议使用 **WSL2**
|
||||||
|
- **深度学习框架**:PyTorch、PyTorch Geometric(CUDA 可选)
|
||||||
|
- **EDA I/O**:GDSII/OASIS(通过 `klayout` Python API)
|
||||||
|
|
||||||
## 1. 项目愿景
|
## 1. 项目愿景
|
||||||
|
|
||||||
**Geo-Layout Transformer** 是一个旨在推动电子设计自动化(EDA)物理设计领域范式转变的研究项目。我们不再依赖于一套零散的、基于启发式规则的工具,而是致力于构建一个统一的基础模型,使其能够理解半导体版图深层次的、上下文相关的“设计语言”。
|
**Geo-Layout Transformer** 是一个旨在推动电子设计自动化(EDA)物理设计领域范式转变的研究项目。我们不再依赖于一套零散的、基于启发式规则的工具,而是致力于构建一个统一的基础模型,使其能够理解半导体版图深层次的、上下文相关的“设计语言”。
|
||||||
@@ -30,6 +44,34 @@
|
|||||||
|
|
||||||
4. **特定任务头**:从 Transformer 输出的、具有全局上下文感知能力的最终嵌入,被送入简单、轻量级的神经网络“头”(Head)中,以执行特定的下游任务。这种模块化设计使得核心模型能够以最小的代价适应新的应用。
|
4. **特定任务头**:从 Transformer 输出的、具有全局上下文感知能力的最终嵌入,被送入简单、轻量级的神经网络“头”(Head)中,以执行特定的下游任务。这种模块化设计使得核心模型能够以最小的代价适应新的应用。
|
||||||
|
|
||||||
|
## 🧭 项目结构
|
||||||
|
|
||||||
|
```text
|
||||||
|
Geo-Layout-Transformer/
|
||||||
|
├─ configs/ # 训练与任务配置(如 default、hotspot)
|
||||||
|
├─ scripts/
|
||||||
|
│ ├─ preprocess_gds.py # GDSII → 图数据集流水线
|
||||||
|
│ └─ visualize_attention.py # 注意力与可解释性工具
|
||||||
|
├─ src/
|
||||||
|
│ ├─ data/
|
||||||
|
│ │ ├─ dataset.py # PyG 数据集/加载器
|
||||||
|
│ │ ├─ gds_parser.py # GDS/OASIS 解析
|
||||||
|
│ │ └─ graph_constructor.py# 异构图构建逻辑
|
||||||
|
│ ├─ engine/
|
||||||
|
│ │ ├─ trainer.py # 训练循环(预训练/微调)
|
||||||
|
│ │ ├─ evaluator.py # 评估与指标
|
||||||
|
│ │ └─ self_supervised.py # 自监督任务(如掩码版图建模)
|
||||||
|
│ ├─ models/
|
||||||
|
│ │ ├─ gnn_encoder.py # 区块级 GNN 编码器(如 RGAT)
|
||||||
|
│ │ ├─ transformer_core.py # 全局 Transformer 骨干
|
||||||
|
│ │ ├─ task_heads.py # 下游任务头
|
||||||
|
│ │ └─ geo_layout_transformer.py # 端到端模型组装
|
||||||
|
│ └─ utils/ # 配置、日志与通用工具
|
||||||
|
├─ main.py # 入口(预训练/训练/推理)
|
||||||
|
├─ requirements.txt # Python 依赖(在 PyTorch/PyG 之后安装)
|
||||||
|
└─ README*.md # 中英文文档
|
||||||
|
```
|
||||||
|
|
||||||
## 3. 快速上手
|
## 3. 快速上手
|
||||||
|
|
||||||
### 3.1. 环境要求
|
### 3.1. 环境要求
|
||||||
@@ -64,6 +106,8 @@
|
|||||||
```
|
```
|
||||||
*(注意:您可能需要通过 `klayout` 自身的包管理器或从源码编译来单独安装它,以启用其 Python API)。*
|
*(注意:您可能需要通过 `klayout` 自身的包管理器或从源码编译来单独安装它,以启用其 Python API)。*
|
||||||
|
|
||||||
|
> 提示:GPU 不是必须的。仅 CPU 环境可安装 PyTorch/PyG 的 CPU 版本。
|
||||||
|
|
||||||
## 4. 项目使用
|
## 4. 项目使用
|
||||||
|
|
||||||
项目的工作流程分为两个主要阶段:数据预处理和模型训练。
|
项目的工作流程分为两个主要阶段:数据预处理和模型训练。
|
||||||
@@ -114,3 +158,7 @@ python main.py --config-file configs/default.yaml --mode pretrain --data-dir dat
|
|||||||
- [ ] **生成式设计**:在生成式框架中使用学习到的表示来合成“构建即正确”的版图。
|
- [ ] **生成式设计**:在生成式框架中使用学习到的表示来合成“构建即正确”的版图。
|
||||||
|
|
||||||
欢迎随时提出 Issue 或提交 Pull Request。
|
欢迎随时提出 Issue 或提交 Pull Request。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Made with ❤️ 面向 EDA 研究与开源协作。
|
||||||
|
|||||||
Reference in New Issue
Block a user