Companion object of lamp.STen
- STen.fromDoubleArray, STen.fromLongArray, STen.fromFloatArray factory methods copy data from JVM arrays into off heap memory and create an STen instance
- There are similar factories which take SADDLE data structures
- Companion:
- class
Type members
Classlikes
Value members
Concrete methods
Wraps a tensor without registering it to any scope.
Wraps a tensor without registering it to any scope.
Memory may leak.
Returns a tensor with the given content and shape on the given device
Returns a tensor with the given content and shape on the given device
Create tensor directly from file. Memory maps a file into host memory. Data is not passed through the JVM. Returned tensor is always on the CPU device.
Create tensor directly from file. Memory maps a file into host memory. Data is not passed through the JVM. Returned tensor is always on the CPU device.
- Value parameters:
- length
byte length of the data
- offset
byte offset into the file. Must be page aligned (usually multiple of 4096)
- path
file path
- pin
if true the mapped segment will be page locked with mlock(2)
- scalarTypeByte
scalar type (long=4,half=5,float=6,double=7)
- Returns:
tensor on CPU
Returns a tensor with the given content and shape on the given device
Returns a tensor with the given content and shape on the given device
Returns a tensor with the given content and shape on the given device
Returns a tensor with the given content and shape on the given device
Returns a tensor with the given content and shape on the given device
Returns a tensor with the given content and shape on the given device
Broadcast tensor on root to the clique Blocks until all peers execute the broadcast. Takes a list of tensors for the case where a single thread manages multiple GPUs
Broadcast tensor on root to the clique Blocks until all peers execute the broadcast. Takes a list of tensors for the case where a single thread manages multiple GPUs
Reduction with + Output must be on the root rank
Reduction with + Output must be on the root rank
Blocks until all peers execute the reduce. Takes a list of tensors for the case where a single thread manages multiple GPUs
Wraps an aten.Tensor and registering it to the given scope
Wraps an aten.Tensor and registering it to the given scope
Create tensors directly from file. Memory maps a file into host memory. Data is not passed through the JVM. Returned tensor is always on the CPU device.
Create tensors directly from file. Memory maps a file into host memory. Data is not passed through the JVM. Returned tensor is always on the CPU device.
- Value parameters:
- length
byte length of the data (all tensors in total)
- offset
byte offset into the file. Must be page aligned (usually multiple of 4096)
- path
file path
- pin
if true the mapped segment will be page locked with mlock(2)
- tensors
list of tensors with (scalarType, byte offset, byte length), byte offset must be aligned to 8
- Returns:
tensor on CPU