CudaDevice

case class CudaDevice(i: Int) extends Device
trait Serializable
trait Product
trait Equals
trait Device
class Object
trait Matchable
class Any

Value members

Concrete methods

def measureTime[A](f: => A): (A, Long)
def setSeed(seed: Long): Unit
def to(t: Tensor): Tensor
def withOtherStreamThenSync[A](synchronizeBefore: Boolean)(f: => A): A

Inherited methods

def allocateBuffers[S : Sc](size: Long, options: STenOptions): BufferPair
Inherited from:
Device
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def to[S : Sc](t: STen): STen
Inherited from:
Device
def toBatched[S : Sc](tensors: Seq[STen], buffers: BufferPair): Seq[STen]

Copies tensors to this device in a single cross device copy. Data is copied via a buffer pair which consists of a source and a destinatin buffer. srcBuffer is supposed to be on the source device. dstBuffer has to be on this device. Tensors are first copied to the srcBuffer, then the srcBuffer is copied to dstBuffer, then the dstBuffer is split into views.

Copies tensors to this device in a single cross device copy. Data is copied via a buffer pair which consists of a source and a destinatin buffer. srcBuffer is supposed to be on the source device. dstBuffer has to be on this device. Tensors are first copied to the srcBuffer, then the srcBuffer is copied to dstBuffer, then the dstBuffer is split into views.

All tensors must have the same data type.

Might make sense to pin the srcBuffer.

Inherited from:
Device