Class CudaTensor (mod)
Functions for creating and operating on tensors stored on a nVidia CUDA GPU.
Inheritance
Namespace: Tensor
Assembly: Tensor.dll
Syntax
module CudaTensor
Remarks
This module contains functions for creating tensors stored on a nVidia CUDA GPU. It further contains functions that only work with tensors stored on a nVidia CUDA GPU. Calling these functions with tensors stored on other devices will result in an System.InvalidOperationException.
The CUDA backend provides options that can be configured via Cfg.
Examples
let x = CudaTensor.zeros [3L; 3L] // x.Dev = CudaTensor.Dev
Fields
Name | Description |
---|---|
val Dev | Tensor device using CUDA GPU memory as data storage. |
Methods
Name | Description |
---|---|
val arange: 'T -> 'T -> 'T -> Tensor<'T> | Creates a new vector filled with equaly spaced values using a specifed increment. |
val counting: int64 -> Tensor<int64> | Creates a new vector filled with the integers from zero to the specified maximum. |
val empty: int -> Tensor<'T> | Creates a new, empty tensor with the given number of dimensions. |
val falses: int64 list -> Tensor<bool> | Creates a new boolean tensor filled with falses. |
val filled: int64 list -> 'T -> Tensor<'T> | Creates a new tensor filled with the specified value. |
val identity: int64 -> Tensor<'T> | Creates a new identity matrix. |
val linspace: 'T -> 'T -> int64 -> Tensor<'T> | Creates a new vector of given size filled with equaly spaced values. |
val ones: int64 list -> Tensor<'T> | Creates a new tensor filled with ones (1). |
val scalar: 'T -> Tensor<'T> | Creates a new zero-dimensional (scalar) tensor with the specified value. |
val transfer: Tensor<'T> -> Tensor<'T> | Transfers a tensor to the CUDA device. |
val trues: int64 list -> Tensor<bool> | Creates a new boolean tensor filled with trues. |
val usingPtr: CUdeviceptr -> SizeT -> TensorLayout -> Tensor<'T> | Creates a tensor from the given CUDA pointer, allocation size in bytes and layout. |
val usingPtrAndType: CUdeviceptr -> SizeT -> Type -> TensorLayout -> ITensor | Creates a tensor from the given CUDA pointer, allocation size in bytes, type and layout. |
val zeros: int64 list -> Tensor<'T> | Creates a new tensor filled with zeros (0). |