YoGA features¶
A list of features with corresponding wrappers is provided in the following. All these operations can be performed on a YoGA object. This webpage may not be up to date. Please refer to the file yoga.i for a complete list of available features. To get a full description of the syntax please use the help function in a Yorick session.
General utilities¶
- extern _GetMaxGflopsDeviceId get the ID of the best CUDA-capable device on your system
- extern _setDeviceId set the active device to the specified ID
- func setDeviceId set the active device to the specified ID and returns its name
- extern _listDevice returns the list of CUDA-capable devices on your system
- extern _nbDevice returns the number of CUDA-capable devices on your system
- extern _yogaThreadExit exist threads on the active device
- extern _yogaThreadSync synchronizes threads on the active device
- extern _yogaInit init a YoGA session on the specified device
- extern _yogaInitCublas init a CUBLAS session on the active device
- extern _yogaShutdownCublas shutdown the CUBLAS session on the active device
Arrays manipulations¶
- extern yoga_obj creates an array on the GPU
- extern yoga_host2device fills an object on the GPU with data from the Yorick session
- extern yoga_device2host transfers data from an object on the GPU to the Yorick session
- extern yoga_setv create a new cublasVector from input data
- extern yoga_setm create a new cublasMatrix from input data
- extern yoga_getarray get a sub-array of input object specified by a range
- extern yoga_fillarray fill a sub-array of input object specified by a range
- extern yoga_getarray get the value of an array at specified position
- extern yoga_plus add a scalar to all the elements of an array
- extern yoga_plusai add a scalar (an element of a source array) to all the elements of an array
Matrix Operations¶
YoGA provides support for most of the cublas functions as well as an autotuned custom tranpose method from the NVIDIA SDK.
BLAS functions¶
- extern yoga_imax returns the smallest index of the maximum magnitude element of obj
- extern yoga_imin returns the smallest index of the minimum magnitude element of obj
- extern yoga_asum retuns the sum of the absolute values of obj
- extern yoga_nrm2 returns the Euclidean norm of obj
- extern yoga_scale scales vectx by an amount specified by the second argument
- extern yoga_swap swaps the content of the 2 arguments
- extern yoga_axpy multiplies vectx by alpha and adds it to vecty
- extern yoga_dot computes the dot product of the 2 arguments
- extern yoga_mv multiplies matrix A by vectx and optional alpha and stores it in optional beta times vecty
- extern yoga_rank1 general rank1 operation adds to matrix dest the product of transpose(vectx) and vecty
- extern yoga_mm multiplies matrix A by matrix B and stores it in matrix C
Transpose¶
- extern yoga_transpose transposes the matrix src and places the result in matrix dest
Random number generation¶
YoGA provides support for the curand libraries. Call to curand are made through custom kernels. Two types of noise distribution are provided : uniform and normal.
- extern yoga_random generates a uniform distribution of random numbers
- extern yoga_random_n generates a normal distribution of random numbers
Fast Fourier Transform¶
YoGA provides support for the cufft library.
- extern yoga_fft computes the Fast Fourier Transform of input array
- extern yoga_fftconv_init inits the FFT convolution workspace
- extern yoga_fftconv computes the FFT convolution of two arrays
Scan, sort, compact¶
YoGA provides support for the CUDPP library. Users can scan arrays for min, max, sum, etc ... sort arrays or compact arrays.
- extern yoga_min returns the minimum value of an array
- extern yoga_max returns the maximum value of an array
- extern yoga_add returns the sum of the values of an array
- extern yoga_mult returns the product of the values of an array
- extern yoga_sort sorts the values of an array and optionally returns an array of sorted indexes array
- extern yoga_compact compacts an array using a vector of valid elements
Mis à jour par Julien Brule il y a plus de 12 ans · 2 révisions