fix: harden CUDA safety checks and translate comments to English

Safety fixes (4 critical, 4 warning) from code review:

- qap.cuh: fix clone_to_device cross-device D2H by retaining host matrices
- types.cuh: add CUDA_CHECK to InjectBuffer, track owner_gpu for safe destroy
- types.cuh: add bounds check on lexicographic priority index
- solver.cuh: cap migrate_kernel islands to MAX_ISLANDS=64 to prevent stack overflow
- multi_gpu_solver.cuh: guard against 0 GPUs, propagate stop_reason from best GPU
- types.cuh: warn on SeqRegistry overflow
- solver.cuh: warn when constraint_directed/phased_search disabled without AOS

Translate all Chinese comments to English across 25+ source files
(core/*.cuh, problems/*.cuh, Makefile, multi-GPU tests).

Verified on V100S×2 (sm_70, CUDA 12.8): e5 (12 problem types, all optimal),
e13 (multi-objective + multi-GPU, 9 configs, all passed).
This commit is contained in:
L-yang-yang 2026-03-25 11:52:50 +08:00
parent ab278d0e82
commit a848730459
25 changed files with 1147 additions and 1167 deletions

View file

@ -6,7 +6,7 @@
[![CUDA](https://img.shields.io/badge/CUDA-11.0%2B-green.svg)](https://developer.nvidia.com/cuda-toolkit)
[![Python](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://www.python.org/)
**Paper**: [cuGenOpt: A GPU-Accelerated General-Purpose Metaheuristic Framework for Combinatorial Optimization](http://arxiv.org/abs/2603.19163)
**Paper**: [cuGenOpt: A GPU-Accelerated General-Purpose Metaheuristic Framework for Combinatorial Optimization](https://arxiv.org/abs/2603.19163)
---
@ -114,28 +114,7 @@ Define your own problem by inheriting `ProblemBase` and implementing `compute_ob
└─────────────────────────────────────────────────────────┘
```
---
## Project Structure
```
generic_solver/
├── prototype/ # Core framework (header-only .cuh files)
│ ├── core/ # Solver, operators, population, types
│ └── problems/ # 12+ problem implementations
├── python/ # Python wrapper (pip install cugenopt)
│ ├── cugenopt/ # Python package (built-ins + JIT compiler)
│ └── tests/ # Test suite
├── benchmark/ # Experiments and benchmarks
│ ├── experiments/ # E0-E13: 14 experiment groups
│ ├── data/ # Standard instances (TSPLIB, Solomon, QAPLIB)
│ └── results/ # Experimental reports
├── paper_v3_en/ # Paper source (LaTeX)
├── STATUS.md # Project status and roadmap
└── README.md # This file
```
---
## Performance Highlights
@ -186,8 +165,7 @@ generic_solver/
## Installation
### Python Package
coming soon
come soon
```bash
pip install cugenopt
```
@ -207,18 +185,7 @@ cd prototype
make all
```
---
## Documentation
| Document | Description |
|----------|-------------|
| [STATUS.md](STATUS.md) | Project status, roadmap, and design decisions |
| [Python API Guide](python/README.md) | Detailed Python API documentation |
| [Benchmark Design](benchmark/DESIGN.md) | Experimental methodology |
| [Paper](paper_v3_en/) | Full technical details and evaluation |
---
## Citation