// Sets a list of devices to use. func InitGPU(device int, flags uint) { Debug("InitGPU ", device, flags) _useDevice = device cuda.SetDevice(_useDevice) printGPUInfo() initGPUProperties() initGPUL1Config() STREAM0 = NewStream() }
// Assures Context ctx[id] is currently active. Switches contexts only when necessary. func setDevice(deviceId int) { // actually set the device cuda.SetDevice(deviceId) }