From d404eae44c6f6506865c94d928168a1f23f850b0 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 9 Dec 2024 00:31:30 +0000 Subject: [PATCH] build based on 3eae9a5 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/krylov_operators/index.html | 4 ++-- dev/reference/index.html | 2 +- dev/triangular_operators/index.html | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 5309f27..de286a9 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-22T15:45:24","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-09T00:31:25","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 88b0c08..412fc88 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,4 +1,4 @@ Home · KrylovPreconditioners.jl

KrylovPreconditioners.jl documentation

This package provides a collection of preconditioners.

How to Cite

If you use KrylovPreconditioners.jl in your work, please cite using the format given in CITATION.cff.

How to Install

KrylovPreconditioners.jl can be installed and tested through the Julia package manager:

julia> ]
 pkg> add KrylovPreconditioners
-pkg> test KrylovPreconditioners

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

+pkg> test KrylovPreconditioners

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers organization, so questions about any of our packages are welcome.

diff --git a/dev/krylov_operators/index.html b/dev/krylov_operators/index.html index cd438d3..fdbe906 100644 --- a/dev/krylov_operators/index.html +++ b/dev/krylov_operators/index.html @@ -1,5 +1,5 @@ -Krylov operators · KrylovPreconditioners.jl

Krylov operators

KrylovPreconditioners.KrylovOperatorFunction
KrylovOperator(A; nrhs::Int=1, transa::Char='N')

Create a Krylov operator to accelerate sparse matrix-vector or matrix-matrix products on GPU architectures. The operator is compatible with sparse matrices stored on NVIDIA, AMD, and Intel GPUs.

Input arguments

  • A: The sparse matrix on the GPU that serves as the operator for matrix-vector or matrix-matrix products;
  • nrhs: Specifies the number of columns for the right-hand sides. Defaults to 1 for standard matrix-vector products;
  • transa: Determines how the matrix A is applied during the products; 'N' for no transposition, 'T' for transpose, and 'C' for conjugate transpose.

Output argument

  • op: An instance of AbstractKrylovOperator representing the Krylov operator for the specified sparse matrix and parameters.
source
KrylovPreconditioners.update!Method
update!(op::AbstractKrylovOperator, A)

Update the sparse matrix A associated with the given AbstractKrylovOperator without the need to reallocate buffers or repeat the structural analysis phase for detecting parallelism for sparse matrix-vector or matrix-matrix products. A and the operator op must have the same sparsity pattern, enabling efficient reuse of existing resources.

Input arguments

  • op: The Krylov operator to update;
  • A: The new sparse matrix to associate with the operator.
source

Nvidia GPUs

Sparse matrices have a specific storage on Nvidia GPUs (CuSparseMatrixCSC, CuSparseMatrixCSR or CuSparseMatrixCOO):

using CUDA, CUDA.CUSPARSE
+Krylov operators · KrylovPreconditioners.jl

Krylov operators

KrylovPreconditioners.KrylovOperatorFunction
KrylovOperator(A; nrhs::Int=1, transa::Char='N')

Create a Krylov operator to accelerate sparse matrix-vector or matrix-matrix products on GPU architectures. The operator is compatible with sparse matrices stored on NVIDIA, AMD, and Intel GPUs.

Input arguments

  • A: The sparse matrix on the GPU that serves as the operator for matrix-vector or matrix-matrix products;
  • nrhs: Specifies the number of columns for the right-hand sides. Defaults to 1 for standard matrix-vector products;
  • transa: Determines how the matrix A is applied during the products; 'N' for no transposition, 'T' for transpose, and 'C' for conjugate transpose.

Output argument

  • op: An instance of AbstractKrylovOperator representing the Krylov operator for the specified sparse matrix and parameters.
source
KrylovPreconditioners.update!Method
update!(op::AbstractKrylovOperator, A)

Update the sparse matrix A associated with the given AbstractKrylovOperator without the need to reallocate buffers or repeat the structural analysis phase for detecting parallelism for sparse matrix-vector or matrix-matrix products. A and the operator op must have the same sparsity pattern, enabling efficient reuse of existing resources.

Input arguments

  • op: The Krylov operator to update;
  • A: The new sparse matrix to associate with the operator.
source

Nvidia GPUs

Sparse matrices have a specific storage on Nvidia GPUs (CuSparseMatrixCSC, CuSparseMatrixCSR or CuSparseMatrixCOO):

using CUDA, CUDA.CUSPARSE
 using SparseArrays
 using KrylovPreconditioners
 
@@ -46,4 +46,4 @@
 
   # Krylov operator
   op_csr = KrylovOperator(A_csr_gpu; nrhs=1, transa='N')
-end
+end
diff --git a/dev/reference/index.html b/dev/reference/index.html index 6bcb183..13692fd 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,2 +1,2 @@ -Reference · KrylovPreconditioners.jl

Reference

Index

KrylovPreconditioners.update!Method
function update!(p, J::SparseMatrixCSC)

Update the preconditioner p from the sparse Jacobian J in CSC format for the CPU

Note that this implements the same algorithm as for the GPU and becomes very slow on CPU with growing number of blocks.

source
KrylovPreconditioners.BlockJacobiPreconditionerType
BlockJacobiPreconditioner

Overlapping-Schwarz preconditioner.

Attributes

  • nblocks::Int64: Number of partitions or blocks.
  • blocksize::Int64: Size of each block.
  • partitions::Vector{Vector{Int64}}:npart` partitions stored as lists
  • cupartitions: partitions transfered to the GPU
  • lpartitions::Vector{Int64}`: Length of each partitions.
  • culpartitions::Vector{Int64}`: Length of each partitions, on the GPU.
  • blocks: Dense blocks of the block-Jacobi
  • cublocks: Js transfered to the GPU
  • map: The partitions as a mapping to construct views
  • cumap: cumap transferred to the GPU`
  • part: Partitioning as output by Metis
  • cupart: part transferred to the GPU
source
KrylovPreconditioners.backward_substitution!Function

Applies in-place backward substitution with the U factor of F, under the assumptions:

  1. U is stored transposed / row-wise
  2. U has no lower-triangular elements stored
  3. U has (nonzero) diagonal elements stored.
source
+Reference · KrylovPreconditioners.jl

Reference

Index

KrylovPreconditioners.update!Method
function update!(p, J::SparseMatrixCSC)

Update the preconditioner p from the sparse Jacobian J in CSC format for the CPU

Note that this implements the same algorithm as for the GPU and becomes very slow on CPU with growing number of blocks.

source
KrylovPreconditioners.BlockJacobiPreconditionerType
BlockJacobiPreconditioner

Overlapping-Schwarz preconditioner.

Attributes

  • nblocks::Int64: Number of partitions or blocks.
  • blocksize::Int64: Size of each block.
  • partitions::Vector{Vector{Int64}}:npart` partitions stored as lists
  • cupartitions: partitions transfered to the GPU
  • lpartitions::Vector{Int64}`: Length of each partitions.
  • culpartitions::Vector{Int64}`: Length of each partitions, on the GPU.
  • blocks: Dense blocks of the block-Jacobi
  • cublocks: Js transfered to the GPU
  • map: The partitions as a mapping to construct views
  • cumap: cumap transferred to the GPU`
  • part: Partitioning as output by Metis
  • cupart: part transferred to the GPU
source
KrylovPreconditioners.backward_substitution!Function

Applies in-place backward substitution with the U factor of F, under the assumptions:

  1. U is stored transposed / row-wise
  2. U has no lower-triangular elements stored
  3. U has (nonzero) diagonal elements stored.
source
diff --git a/dev/triangular_operators/index.html b/dev/triangular_operators/index.html index abbc724..8685eb1 100644 --- a/dev/triangular_operators/index.html +++ b/dev/triangular_operators/index.html @@ -1,5 +1,5 @@ -Triangular operators · KrylovPreconditioners.jl

Triangular operators

KrylovPreconditioners.TriangularOperatorFunction
TriangularOperator(A, uplo::Char, diag::Char; nrhs::Int=1, transa::Char='N')

Create a triangular operator for efficient solution of sparse triangular systems on GPU architectures. Supports sparse matrices stored on NVIDIA, AMD, and Intel GPUs.

Input arguments

  • A: A sparse matrix on the GPU representing the triangular system to be solved;
  • uplo: Specifies whether the triangular matrix A is upper triangular ('U') or lower triangular ('L');
  • diag: Indicates whether the diagonal is unit ('U') or non-unit ('N');
  • nrhs: Specifies the number of columns for the right-hand side(s). Defaults to 1, corresponding to solving triangular systems with a single vector as the right-hand side;
  • transa: Determines how the matrix A is applied during the triangle solves; 'N' for no transposition, 'T' for transpose, and 'C' for conjugate transpose.

Output argument

  • op: An instance of AbstractTriangularOperator representing the triangular operator for the specified sparse matrix and parameters.
source
KrylovPreconditioners.update!Method
update!(op::AbstractTriangularOperator, A)

Update the sparse matrix A associated with the given AbstractTriangularOperator without the need to reallocate buffers or repeat the structural analysis phase for detecting parallelism for sparse triangular solves. A and the operator op must have the same sparsity pattern, enabling efficient reuse of existing resources.

Input arguments

  • op: The triangular operator to update;
  • A: The new sparse matrix to associate with the operator.
source

Nvidia GPUs

Sparse matrices have a specific storage on Nvidia GPUs (CuSparseMatrixCSC, CuSparseMatrixCSR or CuSparseMatrixCOO):

using CUDA, CUDA.CUSPARSE
+Triangular operators · KrylovPreconditioners.jl

Triangular operators

KrylovPreconditioners.TriangularOperatorFunction
TriangularOperator(A, uplo::Char, diag::Char; nrhs::Int=1, transa::Char='N')

Create a triangular operator for efficient solution of sparse triangular systems on GPU architectures. Supports sparse matrices stored on NVIDIA, AMD, and Intel GPUs.

Input arguments

  • A: A sparse matrix on the GPU representing the triangular system to be solved;
  • uplo: Specifies whether the triangular matrix A is upper triangular ('U') or lower triangular ('L');
  • diag: Indicates whether the diagonal is unit ('U') or non-unit ('N');
  • nrhs: Specifies the number of columns for the right-hand side(s). Defaults to 1, corresponding to solving triangular systems with a single vector as the right-hand side;
  • transa: Determines how the matrix A is applied during the triangle solves; 'N' for no transposition, 'T' for transpose, and 'C' for conjugate transpose.

Output argument

  • op: An instance of AbstractTriangularOperator representing the triangular operator for the specified sparse matrix and parameters.
source
KrylovPreconditioners.update!Method
update!(op::AbstractTriangularOperator, A)

Update the sparse matrix A associated with the given AbstractTriangularOperator without the need to reallocate buffers or repeat the structural analysis phase for detecting parallelism for sparse triangular solves. A and the operator op must have the same sparsity pattern, enabling efficient reuse of existing resources.

Input arguments

  • op: The triangular operator to update;
  • A: The new sparse matrix to associate with the operator.
source

Nvidia GPUs

Sparse matrices have a specific storage on Nvidia GPUs (CuSparseMatrixCSC, CuSparseMatrixCSR or CuSparseMatrixCOO):

using CUDA, CUDA.CUSPARSE
 using SparseArrays
 using KrylovPreconditioners
 
@@ -46,4 +46,4 @@
 
   # Triangular operator
   op_csr = TriangularOperator(A_csr_gpu; uplo='L', diag='U', nrhs=1, transa='N')
-end
+end