Commit graph

3 commits

Author SHA1 Message Date
L-yang-yang
714a2ee23b feat(multi-gpu): implement inject distribution modes (OneIsland/HalfIslands/AllIslands)
inject_check_kernel now respects MultiGpuInjectMode from SolverConfig instead of
hardcoding OneIsland. HalfIslands uses LCG-based random island selection.
Also fixes stale write_async calls in test_multi_gpu_b3.cu.

Verified on 2×V100S: all 5 B3 tests pass, e5 (12 problem types) all optimal.
2026-03-30 20:42:32 +08:00
L-yang-yang
a848730459 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).
2026-03-25 11:52:50 +08:00
L-yang-yang
fc5a0ff4af Initial commit: cuGenOpt GPU optimization solver 2026-03-20 00:33:45 +08:00