21enum class Op : uint8_t {
22 gemm,
gemv,
trsm,
trmm,
symm,
hemm,
syrk,
herk,
syr2k,
her2k,
23 potrf,
getrf,
getrs,
getri,
geqrf,
orgqr,
ormqr,
syev,
gesvd,
spmm,
74 Op op()
const {
return op_; }
79 static std::string build_message(
Op op,
ScalarKind scalar,
const std::string&
detail) {
80 std::string m =
"BatchLAS: no route for ";
84 m +=
"> on this backend";
89 m +=
" This build has no vendor library for that op, and BatchLAS has no\n"
90 " native kernel for it yet. If you configured with\n"
91 " -DBATCHLAS_ENABLE_VENDOR_BLAS=OFF, re-enabling it restores this op;\n"
92 " otherwise the vendor library was not found at configure time.";
ScalarKind scalar() const
NoRouteError(Op op, Backend backend, ScalarKind scalar, std::string detail)
No kernel, backend or vendor entry point in this build on this device serves the request.
unsupported(const std::string &what_arg)
Enumerations, scalar traits and scalar concepts shared by every public header.
The BatchLAS exception hierarchy.
Event gemv(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const VectorView< T > &X, const VectorView< T > &Y, T alpha, T beta, Transpose transA)
Batched general matrix-vector multiply.
Event syr2k(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Uplo uplo, Transpose transA)
Batched symmetric rank-2k update.
Event herk(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, float_t< T > alpha, float_t< T > beta, Uplo uplo, Transpose transA)
Batched Hermitian rank-k update.
Event hemm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Side side, Uplo uplo)
Batched Hermitian matrix-matrix multiply.
Event gemm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Transpose transA, Transpose transB, ComputePrecision precision=ComputePrecision::Default)
Batched general matrix-matrix multiply.
Event syrk(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Uplo uplo, Transpose transA)
Batched symmetric rank-k update.
Event trsm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, T alpha, Side side, Uplo uplo, Transpose transA, Diag diag)
Batched triangular solve with multiple right-hand sides, in place.
Event her2k(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, float_t< T > beta, Uplo uplo, Transpose transA)
Batched Hermitian rank-2k update.
Event trmm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, Side side, Uplo uplo, Transpose transA, Diag diag)
Batched triangular matrix-matrix multiply, out of place.
Event symm(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, const MatrixView< T, MatrixFormat::Dense > &C, T alpha, T beta, Side side, Uplo uplo)
Batched symmetric matrix-matrix multiply.
Event syev(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &descrA, Span< typename base_type< T >::type > eigenvalues, JobType jobtype, Uplo uplo, Span< std::byte > workspace, Span< int32_t > info)
Eigenvalues, and optionally eigenvectors, of a batch of symmetric/Hermitian matrices (LAPACK ?...
constexpr std::string_view to_string(MatrixFormat v)
Spelling of v as in source.
Backend
Library family an entry point dispatches to, used as a template argument.
@ F64
64-bit float accumulation.
@ F32
32-bit float accumulation.
Event potrf(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &descrA, Uplo uplo, Span< std::byte > workspace, Span< int32_t > info)
Batched Cholesky factorization of Hermitian positive-definite matrices.
Event getrs(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, Transpose transA, Span< int64_t > pivots, Span< std::byte > work_space)
Batched solve of using the LU factors from getrf().
Event getrf(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< int64_t > pivots, Span< std::byte > work_space, Span< int32_t > info)
Batched LU factorization with partial pivoting.
Event posv(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, Uplo uplo, Span< std::byte > work_space, Span< int32_t > info)
Batched solve of for Hermitian positive-definite A.
Event gesv(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &B, Span< int64_t > pivots, Span< std::byte > work_space, Span< int32_t > info)
Batched solve of by LU with partial pivoting.
Event getri(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, Span< int64_t > pivots, Span< std::byte > work_space, Span< int32_t > info)
Batched inverse from the LU factors produced by getrf().
Event orgqr(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< T > tau, Span< std::byte > workspace)
Batched formation of the first n columns of Q from geqrf() output.
Event geqrf(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< T > tau, Span< std::byte > work_space)
Batched Householder QR factorization .
Event ormqr(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, const MatrixView< T, MatrixFormat::Dense > &C, Side side, Transpose trans, Span< T > tau, Span< std::byte > workspace, int32_t block_size_hint=0)
Batched multiplication by the orthogonal/unitary Q from geqrf().
Event spmm(Queue &ctx, const MatrixView< T, MFormat > &A, const MatrixView< T, MatrixFormat::Dense > &descrB, const MatrixView< T, MatrixFormat::Dense > &descrC, T alpha, T beta, Transpose transA, Transpose transB, Span< std::byte > workspace)
Batched sparse-times-dense matrix multiply.
Event gesvd(Queue &ctx, const MatrixView< T, MatrixFormat::Dense > &A, Span< typename base_type< T >::type > singular_values, const MatrixView< T, MatrixFormat::Dense > &U, const MatrixView< T, MatrixFormat::Dense > &Vh, SvdVectors jobu, SvdVectors jobvh, Span< std::byte > workspace, Span< int32_t > info)
Singular value decomposition of a batch of matrices (LAPACK ?gesvd).
constexpr std::string_view op_name(Op o)
constexpr ScalarKind scalar_kind_of