Matrices and Vectors

Solve systems of equations, factorize matrices and multiply matrices and vectors.

Topics

Matrices

MPSMatrix

A 2D array of data that stores the data's values.

MPSMatrixDescriptor

A description of attributes used to create an MPS matrix.

MPSTemporaryMatrix

A matrix allocated on GPU private memory.

Vectors

MPSVector

A 1D array of data that stores the data's values.

MPSVectorDescriptor

A description of the length and data type of a vector.

MPSTemporaryVector

A vector allocated on GPU private memory.

Classes for Decomposition and Solving

MPSMatrixDecompositionCholesky

A kernel for computing the Cholesky factorization of a matrix.

MPSMatrixSolveCholesky

A kernel for computing the solution of a linear system of equations using a Cholesky factorization.

MPSMatrixDecompositionLU

A kernel for computing the LU factorization of a matrix using partial pivoting with row interchanges.

MPSMatrixSolveLU

A kernel for computing the solution of a linear system of equations using an LU factorization.

MPSMatrixSolveTriangular

A kernel for computing the solution of a linear system of equations using a triangular coefficient matrix.

MPSMatrixUnaryKernel

A kernel that consumes one matrix and produces one matrix.

MPSMatrixBinaryKernel

A kernel that consumes two matrices and produces one matrix.

Matrix Arithmetic Operations

MPSMatrixSum

A kernel for performing a pointwise summation of a matrix.

MPSMatrixMultiplication

A matrix multiplication kernel.

MPSMatrixVectorMultiplication

A matrix-vector multiplication kernel

MPSMatrixFindTopK

A kernel for computing the top-K values and their corresponding indices in a matrix.

Matrix Copying Operations

MPSMatrixCopy

A class that can perform multiple matrix copy operations.

MPSMatrixCopyToImage

A kernel that copies matrix data to a Metal Performance Shaders image.

MPSMatrixCopyDescriptor

A description of multiple matrix copy operations.

MPSImageCopyToMatrix

A class that copies image data to a matrix.

Matrix Neural Network Operations

MPSMatrixFullyConnected

A kernel for applying a fully connected neural network layer.

MPSMatrixFullyConnectedGradient

A kernel for applying a fully gradient connected neural network layer.

MPSMatrixNeuron

A neuron activation kernel that operates on matrices.

MPSMatrixNeuronGradient

A gradient neuron activation kernel that operates on matrices.

Matrix Softmax Operations

MPSMatrixLogSoftMax

A logarithmic softmax kernel that operates on matrices.

MPSMatrixLogSoftMaxGradient

A logarithmic gradient softmax kernel that operates on matrices.

MPSMatrixSoftMax

A softmax kernel that operates on matrices.

MPSMatrixSoftMaxGradient

A gradient softmax kernel that operates on matrices.

Matrix Normalization Operations

MPSMatrixBatchNormalization

A batch normalization kernel that operates on matrices.

MPSMatrixBatchNormalizationGradient

A batch normalization gradient kernel that operates on matrices.