From 0a4bcdcf9e1d243f14b8be39791aa4a999a9dcb7 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 14 Mar 2024 20:32:22 +0000 Subject: [PATCH] build based on 69fa90c --- previews/PR17/.documenter-siteinfo.json | 2 +- previews/PR17/generic/index.html | 2 +- previews/PR17/index.html | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/previews/PR17/.documenter-siteinfo.json b/previews/PR17/.documenter-siteinfo.json index 92a8d3a..a354ac1 100644 --- a/previews/PR17/.documenter-siteinfo.json +++ b/previews/PR17/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-11T04:04:06","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-14T20:32:12","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/previews/PR17/generic/index.html b/previews/PR17/generic/index.html index 7a0ea79..6c557a1 100644 --- a/previews/PR17/generic/index.html +++ b/previews/PR17/generic/index.html @@ -96,4 +96,4 @@ R_gpu = C_gpu - ( CuSparseMatrixCSR(A_cpu) + Diagonal(d_gpu) ) * X_gpu norm(R_gpu)
Note

If we only store one triangle of A_gpu, we can also use the wrappers Symmetric and Hermitian instead of using the keyword argument view in cholesky. For real matrices, both wrappers are allowed but only Hermitian can be used for complex matrices.

H_gpu = Hermitian(A_gpu, :U)
-F = cholesky(H_gpu)
+F = cholesky(H_gpu) diff --git a/previews/PR17/index.html b/previews/PR17/index.html index cf3976e..0361e73 100644 --- a/previews/PR17/index.html +++ b/previews/PR17/index.html @@ -3,14 +3,14 @@ pkg> add CUDSS pkg> test CUDSS

Types

CUDSS.CudssMatrixType
matrix = CudssMatrix(v::CuVector{T})
 matrix = CudssMatrix(A::CuMatrix{T})
-matrix = CudssMatrix(A::CuSparseMatrixCSR{T,Cint}, struture::String, view::Char; index::Char='O')

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

CudssMatrix is a wrapper for CuVector, CuMatrix and CuSparseMatrixCSR. CudssMatrix is used to pass matrix of the linear system, as well as solution and right-hand side.

structure specifies the stucture for sparse matrices:

  • "G": General matrix – LDU factorization;
  • "S": Real symmetric matrix – LDLᵀ factorization;
  • "H": Complex Hermitian matrix – LDLᴴ factorization;
  • "SPD": Symmetric positive-definite matrix – LLᵀ factorization;
  • "HPD": Hermitian positive-definite matrix – LLᴴ factorization.

view specifies matrix view for sparse matrices:

  • 'L': Lower-triangular matrix and all values above the main diagonal are ignored;
  • 'U': Upper-triangular matrix and all values below the main diagonal are ignored;
  • 'F': Full matrix.

index specifies indexing base for sparse matrix indices:

  • 'Z': 0-based indexing;
  • 'O': 1-based indexing.
source
CUDSS.CudssConfigType
config = CudssConfig()

CudssConfig stores configuration settings for the solver.

source
CUDSS.CudssDataType
data = CudssData()

CudssData holds internal data (e.g., LU factors arrays).

source
CUDSS.CudssSolverType
solver = CudssSolver(A::CuSparseMatrixCSR{T,Cint}, structure::String, view::Char; index::Char='O')
-solver = CudssSolver(matrix::CudssMatrix{T}, config::CudssConfig, data::CudssData)

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

CudssSolver contains all structures required to solve linear systems with cuDSS. One constructor of CudssSolver takes as input the same parameters as CudssMatrix.

structure specifies the stucture for sparse matrices:

  • "G": General matrix – LDU factorization;
  • "S": Real symmetric matrix – LDLᵀ factorization;
  • "H": Complex Hermitian matrix – LDLᴴ factorization;
  • "SPD": Symmetric positive-definite matrix – LLᵀ factorization;
  • "HPD": Hermitian positive-definite matrix – LLᴴ factorization.

view specifies matrix view for sparse matrices:

  • 'L': Lower-triangular matrix and all values above the main diagonal are ignored;
  • 'U': Upper-triangular matrix and all values below the main diagonal are ignored;
  • 'F': Full matrix.

index specifies indexing base for sparse matrix indices:

  • 'Z': 0-based indexing;
  • 'O': 1-based indexing.

CudssSolver can be also constructed from the three structures CudssMatrix, CudssConfig and CudssData if needed.

source

Functions

CUDSS.cudss_setFunction
cudss_set(matrix::CudssMatrix{T}, v::CuVector{T})
+matrix = CudssMatrix(A::CuSparseMatrixCSR{T,Cint}, struture::String, view::Char; index::Char='O')

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

CudssMatrix is a wrapper for CuVector, CuMatrix and CuSparseMatrixCSR. CudssMatrix is used to pass matrix of the linear system, as well as solution and right-hand side.

structure specifies the stucture for sparse matrices:

  • "G": General matrix – LDU factorization;
  • "S": Real symmetric matrix – LDLᵀ factorization;
  • "H": Complex Hermitian matrix – LDLᴴ factorization;
  • "SPD": Symmetric positive-definite matrix – LLᵀ factorization;
  • "HPD": Hermitian positive-definite matrix – LLᴴ factorization.

view specifies matrix view for sparse matrices:

  • 'L': Lower-triangular matrix and all values above the main diagonal are ignored;
  • 'U': Upper-triangular matrix and all values below the main diagonal are ignored;
  • 'F': Full matrix.

index specifies indexing base for sparse matrix indices:

  • 'Z': 0-based indexing;
  • 'O': 1-based indexing.
source
CUDSS.CudssConfigType
config = CudssConfig()

CudssConfig stores configuration settings for the solver.

source
CUDSS.CudssDataType
data = CudssData()

CudssData holds internal data (e.g., LU factors arrays).

source
CUDSS.CudssSolverType
solver = CudssSolver(A::CuSparseMatrixCSR{T,Cint}, structure::String, view::Char; index::Char='O')
+solver = CudssSolver(matrix::CudssMatrix{T}, config::CudssConfig, data::CudssData)

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

CudssSolver contains all structures required to solve linear systems with cuDSS. One constructor of CudssSolver takes as input the same parameters as CudssMatrix.

structure specifies the stucture for sparse matrices:

  • "G": General matrix – LDU factorization;
  • "S": Real symmetric matrix – LDLᵀ factorization;
  • "H": Complex Hermitian matrix – LDLᴴ factorization;
  • "SPD": Symmetric positive-definite matrix – LLᵀ factorization;
  • "HPD": Hermitian positive-definite matrix – LLᴴ factorization.

view specifies matrix view for sparse matrices:

  • 'L': Lower-triangular matrix and all values above the main diagonal are ignored;
  • 'U': Upper-triangular matrix and all values below the main diagonal are ignored;
  • 'F': Full matrix.

index specifies indexing base for sparse matrix indices:

  • 'Z': 0-based indexing;
  • 'O': 1-based indexing.

CudssSolver can be also constructed from the three structures CudssMatrix, CudssConfig and CudssData if needed.

source

Functions

CUDSS.cudss_setFunction
cudss_set(matrix::CudssMatrix{T}, v::CuVector{T})
 cudss_set(matrix::CudssMatrix{T}, A::CuMatrix{T})
 cudss_set(matrix::CudssMatrix{T}, A::CuSparseMatrixCSR{T,Cint})
 cudss_set(data::CudssSolver, param::String, value)
 cudss_set(config::CudssConfig, param::String, value)
-cudss_set(data::CudssData, param::String, value)

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

The available configuration parameters are:

  • "reordering_alg": Algorithm for the reordering phase;
  • "factorization_alg": Algorithm for the factorization phase;
  • "solve_alg": Algorithm for the solving phase;
  • "matching_type": Type of matching;
  • "solve_mode": Potential modificator on the system matrix (transpose or adjoint);
  • "ir_n_steps": Number of steps during the iterative refinement;
  • "ir_tol": Iterative refinement tolerance;
  • "pivot_type": Type of pivoting ('C', 'R' or 'N');
  • "pivot_threshold": Pivoting threshold which is used to determine if digonal element is subject to pivoting;
  • "pivot_epsilon": Pivoting epsilon, absolute value to replace singular diagonal elements;
  • "max_lu_nnz": Upper limit on the number of nonzero entries in LU factors for non-symmetric matrices.

The available data parameter is:

  • "user_perm": User permutation to be used instead of running the reordering algorithms.
source
CUDSS.cudss_getFunction
value = cudss_get(data::CudssSolver, param::String)
+cudss_set(data::CudssData, param::String, value)

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

The available configuration parameters are:

  • "reordering_alg": Algorithm for the reordering phase;
  • "factorization_alg": Algorithm for the factorization phase;
  • "solve_alg": Algorithm for the solving phase;
  • "matching_type": Type of matching;
  • "solve_mode": Potential modificator on the system matrix (transpose or adjoint);
  • "ir_n_steps": Number of steps during the iterative refinement;
  • "ir_tol": Iterative refinement tolerance;
  • "pivot_type": Type of pivoting ('C', 'R' or 'N');
  • "pivot_threshold": Pivoting threshold which is used to determine if digonal element is subject to pivoting;
  • "pivot_epsilon": Pivoting epsilon, absolute value to replace singular diagonal elements;
  • "max_lu_nnz": Upper limit on the number of nonzero entries in LU factors for non-symmetric matrices.

The available data parameter is:

  • "user_perm": User permutation to be used instead of running the reordering algorithms.
source
CUDSS.cudss_getFunction
value = cudss_get(data::CudssSolver, param::String)
 value = cudss_get(config::CudssConfig, param::String)
-value = cudss_get(data::CudssData, param::String)

The available configuration parameters are:

  • "reordering_alg": Algorithm for the reordering phase;
  • "factorization_alg": Algorithm for the factorization phase;
  • "solve_alg": Algorithm for the solving phase;
  • "matching_type": Type of matching;
  • "solve_mode": Potential modificator on the system matrix (transpose or adjoint);
  • "ir_n_steps": Number of steps during the iterative refinement;
  • "ir_tol": Iterative refinement tolerance;
  • "pivot_type": Type of pivoting ('C', 'R' or 'N');
  • "pivot_threshold": Pivoting threshold which is used to determine if digonal element is subject to pivoting;
  • "pivot_epsilon": Pivoting epsilon, absolute value to replace singular diagonal elements;
  • "max_lu_nnz": Upper limit on the number of nonzero entries in LU factors for non-symmetric matrices.

The available data parameters are:

  • "info": Device-side error information;
  • "lu_nnz": Number of non-zero entries in LU factors;
  • "npivots": Number of pivots encountered during factorization;
  • "inertia": Tuple of positive and negative indices of inertia for symmetric and hermitian non positive-definite matrix types;
  • "perm_reorder_row": Reordering permutation for the rows;
  • "perm_reorder_col": Reordering permutation for the columns;
  • "perm_row": Final row permutation (which includes effects of both reordering and pivoting);
  • "perm_col": Final column permutation (which includes effects of both reordering and pivoting);
  • "diag": Diagonal of the factorized matrix.

The data parameters "info", "lu_nnz", "perm_reorder_row" and "perm_reorder_col" require the phase "analyse" performed by cudss. The data parameters "npivots", "inertia" and "diag" require the phases "analyse" and "factorization" performed by cudss. The data parameters "perm_row" and "perm_col" are available but not yet functional.

source
CUDSS.cudssFunction
cudss(phase::String, solver::CudssSolver{T}, x::CuVector{T}, b::CuVector{T})
+value = cudss_get(data::CudssData, param::String)

The available configuration parameters are:

  • "reordering_alg": Algorithm for the reordering phase;
  • "factorization_alg": Algorithm for the factorization phase;
  • "solve_alg": Algorithm for the solving phase;
  • "matching_type": Type of matching;
  • "solve_mode": Potential modificator on the system matrix (transpose or adjoint);
  • "ir_n_steps": Number of steps during the iterative refinement;
  • "ir_tol": Iterative refinement tolerance;
  • "pivot_type": Type of pivoting ('C', 'R' or 'N');
  • "pivot_threshold": Pivoting threshold which is used to determine if digonal element is subject to pivoting;
  • "pivot_epsilon": Pivoting epsilon, absolute value to replace singular diagonal elements;
  • "max_lu_nnz": Upper limit on the number of nonzero entries in LU factors for non-symmetric matrices.

The available data parameters are:

  • "info": Device-side error information;
  • "lu_nnz": Number of non-zero entries in LU factors;
  • "npivots": Number of pivots encountered during factorization;
  • "inertia": Tuple of positive and negative indices of inertia for symmetric and hermitian non positive-definite matrix types;
  • "perm_reorder_row": Reordering permutation for the rows;
  • "perm_reorder_col": Reordering permutation for the columns;
  • "perm_row": Final row permutation (which includes effects of both reordering and pivoting);
  • "perm_col": Final column permutation (which includes effects of both reordering and pivoting);
  • "diag": Diagonal of the factorized matrix.

The data parameters "info", "lu_nnz", "perm_reorder_row" and "perm_reorder_col" require the phase "analyse" performed by cudss. The data parameters "npivots", "inertia" and "diag" require the phases "analyse" and "factorization" performed by cudss. The data parameters "perm_row" and "perm_col" are available but not yet functional.

source
CUDSS.cudssFunction
cudss(phase::String, solver::CudssSolver{T}, x::CuVector{T}, b::CuVector{T})
 cudss(phase::String, solver::CudssSolver{T}, X::CuMatrix{T}, B::CuMatrix{T})
-cudss(phase::String, solver::CudssSolver{T}, X::CudssMatrix{T}, B::CudssMatrix{T})

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

The available phases are "analysis", "factorization", "refactorization" and "solve". The phases "solve_fwd", "solve_diag" and "solve_bwd" are available but not yet functional.

source
+cudss(phase::String, solver::CudssSolver{T}, X::CudssMatrix{T}, B::CudssMatrix{T})

The type T can be Float32, Float64, ComplexF32 or ComplexF64.

The available phases are "analysis", "factorization", "refactorization" and "solve". The phases "solve_fwd", "solve_diag" and "solve_bwd" are available but not yet functional.

source