Commit Graph

24 Commits

Author SHA1 Message Date
Tobias Meyer Andersen
e9d6b326cc Add HIP support for AMD GPUs
This commits adds cmake functionality that can
hipify the cuistl framework to support AMD GPUs.

Some tests have been written as HIP does not mirror
CUDA exactly.

CONVERT_CUDA_TO_HIP is the new CMAKE argument.
CMAKE version is increased to include HIP
as a language (3.21 required).

A macro is added to create a layer of indirection
that will make only cuistl files that have been
changed rehipified.

Some BDA stuff is extracted to make sure CUDA
is not accidentally included.
2024-05-06 15:56:53 +02:00
Tobias Meyer Andersen
7235f34f0e Add classes handling correct MPI implementation
Make some changes to Georgs original code:
dynamically allocated arrays with std::vectors instead
Implement new class structure handling what
MPI communication implementation to use
create extra scopes to avoid reuse of index variable i

Update related tests:
Update test_cuowneroverlapcopy to account for new
class strucutre
Also remove line that invalidates the MPI tests for multiple processes
2024-04-17 13:28:30 +02:00
Tobias Meyer Andersen
4b0dd54f15 Add CUDA implementation of the DILU
preconditioner. Uses graph coloring to exploit
parallelism in upper and triangular solves when
computing a diagonal approximate inverse of a
sparse matrix. Supports blocksizes up to 3.
2024-01-25 14:26:38 +01:00
Arne Morten Kvarving
5e801bc488 avoid dead stores 2023-10-27 08:59:15 +02:00
Tobias Meyer Andersen
8b396fa3dc Update test properties of new tests using CUDA. Avoid comparison causing new warning 2023-10-16 11:31:00 +02:00
Tobias Meyer Andersen
533c5a1a3e Combine new diagonalMV kernels into one using
template arguements.
Use more consistent naming conventions.
Change printing function of CuVector from output
stream overload to toDebugString().
2023-10-16 09:53:02 +02:00
Tobias Meyer Andersen
c809819cbd Fuse kernels to optimize performance and update
the tests and documentation.
2023-10-13 10:31:17 +02:00
Tobias Meyer Andersen
1e4b0e97ee Add jacobi preconditioner that runs on the GPU.
Implement calls to cuBlas, cuSparse and implement necessary
CUDA kernels to perform a single iteration of the jacobi preconditioner.

Add tests that verify new kernels and the preconditioner in its totality.

The preconditioner is verified on 2x2 and 3x3 blocks, which as of now
are the only supported sizes. 1x1 are not supported because cuSparse
does not support it.
2023-10-13 10:31:17 +02:00
Kjetil Olsen Lye
ea86e45fef SolverAdapter now takes a reference to scalar product. 2023-05-31 16:39:45 +02:00
Kjetil Olsen Lye
ceb15e22e3 Expose CuISTL solver in FlexibleSolver. 2023-05-31 15:03:31 +02:00
Kjetil Olsen Lye
84305a7a8d Added conversion preconditioner. 2023-05-30 11:50:02 +02:00
Kjetil Olsen Lye
b30e6d79d5 Added CuSeqILU0 with the preconditioner adapter. 2023-05-30 11:49:58 +02:00
Kjetil Olsen Lye
dfa7034f1b Made error tolerances stricter. 2023-05-30 10:12:31 +02:00
Kjetil Olsen Lye
63fb363a83 Renamed CopyConstructor to CopyAssignment. 2023-05-30 10:06:08 +02:00
Kjetil Olsen Lye
133a8897a0 Fixed indexing mistake in cuistl/vector_operations 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
f006b0b4f5 Removed unused type variable. 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
b6a67275c9 Rename to to_int and to_size_t 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
5373fb7a9c Added int to size_t conversion. Added some static_asserts. 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
9418d5311d Added safe conversion from size_t to int. 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
31e7ef04ba Added a CuSparse matrix wrapper. 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
858d8b189b Added CuVector with tests. 2023-05-12 08:23:18 +02:00
Kjetil Olsen Lye
062d692c83 Added handles for cusparse and cublas. 2023-05-09 15:20:34 +02:00
Kjetil Olsen Lye
03a7fb6c9d Added error macros to check last CUDA error. 2023-05-09 15:20:34 +02:00
Kjetil Olsen Lye
bf9dd4e1dd Added safe call macros for CUDA, CuBlas and CuSparse. 2023-05-09 15:20:34 +02:00