CPU

lamp.CPU
case object CPU extends Device

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Device
class Object
trait Matchable
class Any
Show all
Self type
CPU.type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Value members

Concrete methods

def measureTime[A](f: => A): (A, Long)
def setSeed(seed: Long): Unit
def to[S : Sc](t: STenOptions): STenOptions
def to(t: Tensor): Tensor

Inherited methods

def allocateBuffers[S : Sc](size: Long, options: STenOptions): BufferPair

Attributes

Inherited from:
Device
def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def to[S : Sc](t: STen): STen

Attributes

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.

Attributes

Inherited from:
Device
def withOtherStream[A](synchronizeBefore: Boolean, synchronizeAfter: Boolean)(f: => A): A

Executes f on a new stream

Executes f on a new stream

f must not switch to other threads

Restores the stream to the original stream Optionally synchronizes the host before and/or after f

Attributes

Inherited from:
Device