Remove broken CuPy 13.x memory pool setup

This commit is contained in:
Antoine Jacquin
2026-05-31 21:35:27 +02:00
parent 5a9cdddcfb
commit 17fd96fdf5

View File

@ -123,10 +123,8 @@ def _init_gpu():
_cp = _real_cupy
_cp_ndimage = _real_cupy_ndimage
props = _real_cupy.cuda.runtime.getDeviceProperties(0)
total_mem = props['totalGlobalMem']
pool_size = int(total_mem * 0.9)
_real_cupy.cuda.set_memory_pool(0, pool_size)
# Memory pool management removed — CuPy 13.x uses its own allocator.
# OOM protection handled at the application level (gpu_cleanup() calls).
except (ImportError, Exception) as e:
logger.warning(f"GPU {_best_gpu_id} ({_gpu_name}) non utilisable — mode CPU: {e}")