select_gpu function

(Shortest import: from brian2cuda.utils.gputools import select_gpu)

brian2cuda.utils.gputools.select_gpu()[source]

Select GPU for simulation, based on user preference prefs.devices.cuda_standalone.cuda_backend.gpu_id or (if not provided) pick the GPU with highest compute capability. Returns tuple of (gpu_id, compute_capability) of type (int, float).