Exemplo n.º 1
0
// 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()

}
Exemplo n.º 2
0
// Assures Context ctx[id] is currently active. Switches contexts only when necessary.
func setDevice(deviceId int) {
	// actually set the device
	cuda.SetDevice(deviceId)
}