Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaled permutation and improved permutation interface #1415

Merged
merged 16 commits into from
Oct 28, 2023
Merged

Conversation

upsj
Copy link
Member

@upsj upsj commented Oct 6, 2023

This creates a new permutation interface to enable more functionality without overloading the Csr and Dense interfaces (which was a valid concern in #1338) and adds scaled permutation functionality merging scaling and permutation.

This is still WIP, but the interface itself is already polished enough (and the PR is big enough) that this should already be reviewed.

TODO:

  • SYCL kernels
  • Switch from S * P to P * S, i.e. first scaling, then permuting.
  • Match Permutation and ScaledPermutation interface (removing size parameter and permute mask member)
  • Add combination functionality (Scaled)Permutation * (Scaled)Permutation
  • Add Permuted and ScaledPermuted interface (probably better aimed at another PR)

@upsj upsj added the 1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. label Oct 6, 2023
@upsj upsj requested a review from a team October 6, 2023 19:35
@upsj upsj self-assigned this Oct 6, 2023
@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:testing This is related to testing. reg:example This is related to the examples. type:matrix-format This is related to the Matrix formats type:reordering This is related to the matrix(LinOp) reordering mod:all This touches all Ginkgo modules. labels Oct 6, 2023
@upsj upsj added 1:ST:ready-for-review This PR is ready for review and removed 1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. labels Oct 12, 2023
@upsj
Copy link
Member Author

upsj commented Oct 12, 2023

format!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 6 Security Hotspots
Code Smell A 160 Code Smells

80.4% 80.4% Coverage
7.5% 7.5% Duplication

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@MarcelKoch MarcelKoch self-requested a review October 13, 2023 06:56
Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I mostly have some issues regarding the documentation and then just some minor nits. Also, core tests for scaled permutation are missing.

include/ginkgo/core/base/exception.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/matrix/permutation.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/matrix/permutation.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/matrix/permutation.hpp Show resolved Hide resolved
include/ginkgo/core/matrix/scaled_permutation.hpp Outdated Show resolved Hide resolved
common/unified/matrix/csr_kernels.cpp Outdated Show resolved Hide resolved
reference/test/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Show resolved Hide resolved
test/matrix/permutation_kernels.cpp Show resolved Hide resolved
test/matrix/scaled_permutation_kernels.cpp Show resolved Hide resolved
Copy link
Member

@pratikvn pratikvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments from a first look. A few minor things, but mostly looks good.

core/matrix/csr.cpp Outdated Show resolved Hide resolved
core/matrix/csr.cpp Outdated Show resolved Hide resolved
core/matrix/csr.cpp Show resolved Hide resolved
core/matrix/csr.cpp Outdated Show resolved Hide resolved
core/matrix/csr.cpp Outdated Show resolved Hide resolved
include/ginkgo/core/matrix/scaled_permutation.hpp Outdated Show resolved Hide resolved
omp/matrix/csr_kernels.cpp Show resolved Hide resolved
include/ginkgo/core/matrix/permutation.hpp Outdated Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Show resolved Hide resolved
common/unified/matrix/scaled_permutation_kernels.cpp Outdated Show resolved Hide resolved
}


TYPED_TEST(Permutation, FactorySetsCorrectPermuteMask)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the deleted test

Copy link
Member Author

@upsj upsj Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, permute_mask is now fixed and cannot be changed.


ASSERT_EQ(m->get_const_permutation(), data);
}


TYPED_TEST(Permutation, PermutationCanBeConstructedFromExistingConstData)
{
using i_type = typename TestFixture::i_type;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several test are be deleted

dpcpp/matrix/csr_kernels.dp.cpp Outdated Show resolved Hide resolved
Comment on lines +544 to +545
* From the linear algebra perspective, with $P_{ij} = \delta_{i
* \pi(i)}$, this represents the operation $P^{-1} A P^{-T}$.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are \delta and \pi commonly used? Maybe I miss that, but I only see many greek letter are used from wiki

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In (linear) algebra, lowercase pi is often used to denote permutations, and delta means the Kronecker delta. But I agree that this should be clearer, at least we can refer to the permutation by variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when it's rendered in latex it makes more sense.

omp/matrix/csr_kernels.cpp Show resolved Hide resolved
reference/matrix/csr_kernels.cpp Outdated Show resolved Hide resolved
reference/matrix/csr_kernels.cpp Outdated Show resolved Hide resolved
}


TYPED_TEST(Permutation, AppliesRowAndColPermutationToDenseWithOneArray)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing deleted function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality is no longer available through Permutation

include/ginkgo/core/matrix/csr.hpp Show resolved Hide resolved
include/ginkgo/core/matrix/scaled_permutation.hpp Outdated Show resolved Hide resolved
reference/test/matrix/scaled_permutation.cpp Outdated Show resolved Hide resolved
reference/test/matrix/scaled_permutation.cpp Show resolved Hide resolved
test/matrix/csr_kernels2.cpp Outdated Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Outdated Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Outdated Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Show resolved Hide resolved
core/matrix/permutation.cpp Show resolved Hide resolved
Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second part of my review. Some conversations are marked resolved but actually not. I assume you do not push the changes yet. I prefer marking resolved after pushing or will push soon. Otherwise, I am not sure whether it is resolved or missed. Is it rebased after #1423 is merged?

Comment on lines +106 to +108
const auto out_col = permutation[in_col_idxs[tid]];
out_col_idxs[tid] = out_col;
out_vals[tid] = in_vals[tid] / scale[out_col];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • inverse_column: did permutation first not the scaling first here, because we only have $(P \times S)^{-1} = S^{-1} \times P^{-1} $ not $P^{-1} \{P^{-T}S^{-1}P^{-1}\}$

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the second formula $P^{-1} (P S^{-1} P^T)$ is only useful for inverting a scaled permutation into the $PS$ form again, we don't need it for the scaling. Is there a question on this kernel?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only to clear my understanding is correct or not.
in this kernel, you did the permutation first and then the scaling directly not the other direction because you do not have and do not need to generate the second formula

common/unified/matrix/dense_kernels.template.cpp Outdated Show resolved Hide resolved
include/ginkgo/core/matrix/csr.hpp Outdated Show resolved Hide resolved
reference/matrix/dense_kernels.cpp Show resolved Hide resolved
reference/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
Comment on lines +1185 to +1215
if ((mode & permute_mode::symmetric) == permute_mode::none) {
output->copy_from(this);
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume symmetric is the full bit set of all possible settings but it is not obvious here I think.
Could we just check permute_mode::none without the mask? the user input more than the bitset will also throw the error in the end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, symmetric is rows | columns, so this checks that we are permuting both at the same time

core/matrix/dense.cpp Show resolved Hide resolved
core/matrix/dense.cpp Show resolved Hide resolved
core/matrix/csr.cpp Outdated Show resolved Hide resolved
@yhmtsai yhmtsai added this to the Release 1.7.0 milestone Oct 24, 2023
@upsj upsj force-pushed the scaled_permutation branch from 0779b54 to 8c4a46d Compare October 24, 2023 16:51
Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only few minor comments.

core/matrix/csr.cpp Outdated Show resolved Hide resolved
reference/test/matrix/permutation.cpp Show resolved Hide resolved
reference/test/matrix/scaled_permutation.cpp Show resolved Hide resolved
Copy link
Member

@pratikvn pratikvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor things, but otherwise LGTM.

core/factorization/factorization.cpp Show resolved Hide resolved
Comment on lines +261 to +263
run<const Dense<double>*, const Dense<float>*,
const Dense<complex<double>>*, const Dense<complex<float>>*>(op, fn);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this in a compile time list and maybe substitute with a macro instead ? I think if half and other value types are added, updating these lists becomes tedious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bigger topic that I would like to tackle more uniformly elsewhere. Right now we don't have that many use cases yet.

dpcpp/matrix/csr_kernels.dp.cpp Show resolved Hide resolved
include/ginkgo/core/matrix/csr.hpp Show resolved Hide resolved
core/matrix/permutation.cpp Show resolved Hide resolved
include/ginkgo/core/matrix/scaled_permutation.hpp Outdated Show resolved Hide resolved
Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have two files left for review. It should be done later today
I am thinking using prepend rather than combine

core/matrix/permutation.hpp Outdated Show resolved Hide resolved
col_size_(size[1]),
enabled_permute_(enabled_permute)
{}
Permutation(std::shared_ptr<const Executor> exec, size_type = 0);
Copy link
Member

@yhmtsai yhmtsai Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it is not necessary in core.cpp

}
}
out->move_from(tmp);
GKO_ASSERT_EQ(enabled_permute, row_permute);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was supported column_permute or combined one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they didn't make sense as LinOps and only supported square matrices, the interface was not suited for what it represents.

Comment on lines 205 to 206
std::unique_ptr<Permutation> combine(
ptr_param<const Permutation> other) const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe prepend? combine may be confused with the combination of ginkgo (c1 op1 + c2 op2)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think prepend is more suitable for collections, this is an operation that produces a single object from two objects. I do agree that this is confusing though, I will change it to compose, which pretty accurately represents things, albeit a bit reversed (op1->compose(op2) = $op2 \circ op1$)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or composed if it helps the order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name should describe an action, composed sounds more like a check.

include/ginkgo/core/matrix/scaled_permutation.hpp Outdated Show resolved Hide resolved
core/matrix/dense.cpp Show resolved Hide resolved
{
switch (mode) {
case permute_mode::none:
return stream << "none";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with some prefix like perm::none?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that is the caller's responsibility, as they already know they are printing a permutation_mode. This is only used in debugging though, so it's not very important.

dpcpp/matrix/csr_kernels.dp.cpp Outdated Show resolved Hide resolved
dpcpp/matrix/csr_kernels.dp.cpp Outdated Show resolved Hide resolved
reference/matrix/permutation_kernels.cpp Show resolved Hide resolved
reference/test/matrix/permutation.cpp Outdated Show resolved Hide resolved
reference/test/matrix/permutation.cpp Outdated Show resolved Hide resolved
common/cuda_hip/matrix/csr_kernels.hpp.inc Outdated Show resolved Hide resolved
common/cuda_hip/matrix/csr_kernels.hpp.inc Show resolved Hide resolved
reference/test/matrix/dense_kernels.cpp Show resolved Hide resolved
reference/test/matrix/csr_kernels.cpp Outdated Show resolved Hide resolved
Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. some nit and some name suggestion.
also reminder: need to move the latest version of check_diag and add_scaled_identity

upsj and others added 12 commits October 27, 2023 09:33
- remove permute_mask
- deprecate permute_mask and dim<2> parameters
Co-authored-by: Tobias Ribizel <[email protected]>
- fix and test csr column permutation for hypersparse matrices
- fix inverse nonsymm scaled permutation for dense
- extract permutation dimension validation
- simplify permutation dispatch
- re-add templated constructors to preserve interface
- move more code to source
- add documentation for permutation to permute_mode
instead of matrix classes
- improve documentation
- make scaled_permutation final
- remove unnecessary InvalidValueError
- improve error message on dispatch_helper run(...)
- simplify rectangular permutation tests
- fix dense tests not calling scaled permutation
- test apply in (scaled) permutation on the device
- throw DimensionMismatch instead of ValueMismatch
- add more round-trip and inverted permutation tests
- add dpcpp subgroup size

Co-authored-by: Pratik Nayak <[email protected]>
Co-authored-by: Yuhsiang M. Tsai <[email protected]>
Co-authored-by: Marcel Koch <[email protected]>
also adds a few more tests to be sure.
- const-correctness
- rename combine to compose
- rename invert to compute_inverse
- improve documentation
- add more tests
- simplify DPC++ kernel launch

Co-authored-by: Marcel Koch <[email protected]>
Co-authored-by: Yuhsiang M. Tsai <[email protected]>
Co-authored-by: Pratik Nayak <[email protected]>
@upsj upsj force-pushed the scaled_permutation branch from 5668746 to 67152e9 Compare October 27, 2023 13:44
@upsj upsj added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Oct 27, 2023
@upsj upsj merged commit 6d9e5fd into develop Oct 28, 2023
12 of 13 checks passed
@upsj upsj deleted the scaled_permutation branch October 28, 2023 03:02
@tcojean tcojean mentioned this pull request Nov 6, 2023
tcojean added a commit that referenced this pull request Nov 10, 2023
Release 1.7.0 to master

The Ginkgo team is proud to announce the new Ginkgo minor release 1.7.0. This release brings new features such as:
- Complete GPU-resident sparse direct solvers feature set and interfaces,
- Improved Cholesky factorization performance,
- A new MC64 reordering,
- Batched iterative solver support with the BiCGSTAB solver with batched Dense and ELL matrix types,
- MPI support for the SYCL backend,
- Improved ParILU(T)/ParIC(T) preconditioner convergence,
and more!

If you face an issue, please first check our [known issues page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues) and the [open issues list](https://github.com/ginkgo-project/ginkgo/issues) and if you do not find a solution, feel free to [open a new issue](https://github.com/ginkgo-project/ginkgo/issues/new/choose) or ask a question using the [github discussions](https://github.com/ginkgo-project/ginkgo/discussions).

Supported systems and requirements:
+ For all platforms, CMake 3.16+
+ C++14 compliant compiler
+ Linux and macOS
  + GCC: 5.5+
  + clang: 3.9+
  + Intel compiler: 2019+
  + Apple Clang: 14.0 is tested. Earlier versions might also work.
  + NVHPC: 22.7+
  + Cray Compiler: 14.0.1+
  + CUDA module: CMake 3.18+, and CUDA 10.1+ or NVHPC 22.7+
  + HIP module: ROCm 4.5+
  + DPC++ module: Intel oneAPI 2022.1+ with oneMKL and oneDPL. Set the CXX compiler to `dpcpp` or `icpx`.
  + MPI: standard version 3.1+, ideally GPU Aware, for best performance
+ Windows
  + MinGW: GCC 5.5+
  + Microsoft Visual Studio: VS 2019+
  + CUDA module: CUDA 10.1+, Microsoft Visual Studio
  + OpenMP module: MinGW.

### Version support changes

+ CUDA 9.2 is no longer supported and 10.0 is untested [#1382](#1382)
+ Ginkgo now requires CMake version 3.16 (and 3.18 for CUDA) [#1368](#1368)

### Interface changes

+ `const` Factory parameters can no longer be modified through `with_*` functions, as this breaks const-correctness [#1336](#1336) [#1439](#1439)

### New Deprecations

+ The `device_reset` parameter of CUDA and HIP executors no longer has an effect, and its `allocation_mode` parameters have been deprecated in favor of the `Allocator` interface. [#1315](#1315)
+ The CMake parameter `GINKGO_BUILD_DPCPP` has been deprecated in favor of `GINKGO_BUILD_SYCL`. [#1350](#1350)
+ The `gko::reorder::Rcm` interface has been deprecated in favor of `gko::experimental::reorder::Rcm` based on `Permutation`. [#1418](#1418)
+ The Permutation class' `permute_mask` functionality. [#1415](#1415)
+ Multiple functions with typos (`set_complex_subpsace()`, range functions such as `conj_operaton` etc). [#1348](#1348)

### Summary of previous deprecations
+ `gko::lend()` is not necessary anymore.
+ The classes `RelativeResidualNorm` and `AbsoluteResidualNorm` are deprecated in favor of `ResidualNorm`.
+ The class `AmgxPgm` is deprecated in favor of `Pgm`.
+ Default constructors for the CSR `load_balance` and `automatical` strategies
+ The PolymorphicObject's move-semantic `copy_from` variant
+ The templated `SolverBase` class.
+ The class `MachineTopology` is deprecated in favor of `machine_topology`.
+ Logger constructors and create functions with the `executor` parameter.
+ The virtual, protected, Dense functions `compute_norm1_impl`, `add_scaled_impl`, etc.
+ Logger events for solvers and criterion without the additional `implicit_tau_sq` parameter.
+ The global `gko::solver::default_krylov_dim`, use instead `gko::solver::gmres_default_krylov_dim`.

### Added features

+ Adds a batch::BatchLinOp class that forms a base class for batched linear operators such as batched matrix formats, solver and preconditioners [#1379](#1379)
+ Adds a batch::MultiVector class that enables operations such as dot, norm, scale on batched vectors [#1371](#1371)
+ Adds a batch::Dense matrix format that stores batched dense matrices and provides gemv operations for these dense matrices. [#1413](#1413)
+ Adds a batch::Ell matrix format that stores batched Ell matrices and provides spmv operations for these batched Ell matrices. [#1416](#1416) [#1437](#1437)
+ Add a batch::Bicgstab solver (class, core, and reference kernels) that enables iterative solution of batched linear systems [#1438](#1438).
+ Add device kernels (CUDA, HIP, and DPCPP) for batch::Bicgstab solver. [#1443](#1443).
+ New MC64 reordering algorithm which optimizes the diagonal product or sum of a matrix by permuting the rows, and computes additional scaling factors for equilibriation [#1120](#1120)
+ New interface for (non-symmetric) permutation and scaled permutation of Dense and Csr matrices [#1415](#1415)
+ LU and Cholesky Factorizations can now be separated into their factors [#1432](#1432)
+ New symbolic LU factorization algorithm that is optimized for matrices with an almost-symmetric sparsity pattern [#1445](#1445)
+ Sorting kernels for SparsityCsr on all backends [#1343](#1343)
+ Allow passing pre-generated local solver as factory parameter for the distributed Schwarz preconditioner [#1426](#1426)
+ Add DPCPP kernels for Partition [#1034](#1034), and CSR's `check_diagonal_entries` and `add_scaled_identity` functionality [#1436](#1436)
+ Adds a helper function to create a partition based on either local sizes, or local ranges [#1227](#1227)
+ Add function to compute arithmetic mean of dense and distributed vectors [#1275](#1275)
+ Adds `icpx` compiler supports [#1350](#1350)
+ All backends can be built simultaneously [#1333](#1333)
+ Emits a CMake warning in downstream projects that use different compilers than the installed Ginkgo [#1372](#1372)
+ Reordering algorithms in sparse_blas benchmark [#1354](#1354)
+ Benchmarks gained an `-allocator` parameter to specify device allocators [#1385](#1385)
+ Benchmarks gained an `-input_matrix` parameter that initializes the input JSON based on the filename [#1387](#1387)
+ Benchmark inputs can now be reordered as a preprocessing step [#1408](#1408)


### Improvements

+ Significantly improve Cholesky factorization performance [#1366](#1366)
+ Improve parallel build performance [#1378](#1378)
+ Allow constrained parallel test execution using CTest resources [#1373](#1373)
+ Use arithmetic type more inside mixed precision ELL [#1414](#1414)
+ Most factory parameters of factory type no longer need to be constructed explicitly via `.on(exec)` [#1336](#1336) [#1439](#1439)
+ Improve ParILU(T)/ParIC(T) convergence by using more appropriate atomic operations [#1434](#1434)

### Fixes

+ Fix an over-allocation for OpenMP reductions [#1369](#1369)
+ Fix DPCPP's common-kernel reduction for empty input sizes [#1362](#1362)
+ Fix several typos in the API and documentation [#1348](#1348)
+ Fix inconsistent `Threads` between generations [#1388](#1388)
+ Fix benchmark median condition [#1398](#1398)
+ Fix HIP 5.6.0 compilation [#1411](#1411)
+ Fix missing destruction of rand_generator from cuda/hip [#1417](#1417)
+ Fix PAPI logger destruction order [#1419](#1419)
+ Fix TAU logger compilation [#1422](#1422)
+ Fix relative criterion to not iterate if the residual is already zero [#1079](#1079)
+ Fix memory_order invocations with C++20 changes [#1402](#1402)
+ Fix `check_diagonal_entries_exist` report correctly when only missing diagonal value in the last rows. [#1440](#1440)
+ Fix checking OpenMPI version in cross-compilation settings [#1446](#1446)
+ Fix false-positive deprecation warnings in Ginkgo, especially for the old Rcm (it doesn't emit deprecation warnings anymore as a result but is still considered deprecated) [#1444](#1444)


### Related PR: #1451
tcojean added a commit that referenced this pull request Nov 10, 2023
Release 1.7.0 to develop

The Ginkgo team is proud to announce the new Ginkgo minor release 1.7.0. This release brings new features such as:
- Complete GPU-resident sparse direct solvers feature set and interfaces,
- Improved Cholesky factorization performance,
- A new MC64 reordering,
- Batched iterative solver support with the BiCGSTAB solver with batched Dense and ELL matrix types,
- MPI support for the SYCL backend,
- Improved ParILU(T)/ParIC(T) preconditioner convergence,
and more!

If you face an issue, please first check our [known issues page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues) and the [open issues list](https://github.com/ginkgo-project/ginkgo/issues) and if you do not find a solution, feel free to [open a new issue](https://github.com/ginkgo-project/ginkgo/issues/new/choose) or ask a question using the [github discussions](https://github.com/ginkgo-project/ginkgo/discussions).

Supported systems and requirements:
+ For all platforms, CMake 3.16+
+ C++14 compliant compiler
+ Linux and macOS
  + GCC: 5.5+
  + clang: 3.9+
  + Intel compiler: 2019+
  + Apple Clang: 14.0 is tested. Earlier versions might also work.
  + NVHPC: 22.7+
  + Cray Compiler: 14.0.1+
  + CUDA module: CMake 3.18+, and CUDA 10.1+ or NVHPC 22.7+
  + HIP module: ROCm 4.5+
  + DPC++ module: Intel oneAPI 2022.1+ with oneMKL and oneDPL. Set the CXX compiler to `dpcpp` or `icpx`.
  + MPI: standard version 3.1+, ideally GPU Aware, for best performance
+ Windows
  + MinGW: GCC 5.5+
  + Microsoft Visual Studio: VS 2019+
  + CUDA module: CUDA 10.1+, Microsoft Visual Studio
  + OpenMP module: MinGW.

### Version support changes

+ CUDA 9.2 is no longer supported and 10.0 is untested [#1382](#1382)
+ Ginkgo now requires CMake version 3.16 (and 3.18 for CUDA) [#1368](#1368)

### Interface changes

+ `const` Factory parameters can no longer be modified through `with_*` functions, as this breaks const-correctness [#1336](#1336) [#1439](#1439)

### New Deprecations

+ The `device_reset` parameter of CUDA and HIP executors no longer has an effect, and its `allocation_mode` parameters have been deprecated in favor of the `Allocator` interface. [#1315](#1315)
+ The CMake parameter `GINKGO_BUILD_DPCPP` has been deprecated in favor of `GINKGO_BUILD_SYCL`. [#1350](#1350)
+ The `gko::reorder::Rcm` interface has been deprecated in favor of `gko::experimental::reorder::Rcm` based on `Permutation`. [#1418](#1418)
+ The Permutation class' `permute_mask` functionality. [#1415](#1415)
+ Multiple functions with typos (`set_complex_subpsace()`, range functions such as `conj_operaton` etc). [#1348](#1348)

### Summary of previous deprecations
+ `gko::lend()` is not necessary anymore.
+ The classes `RelativeResidualNorm` and `AbsoluteResidualNorm` are deprecated in favor of `ResidualNorm`.
+ The class `AmgxPgm` is deprecated in favor of `Pgm`.
+ Default constructors for the CSR `load_balance` and `automatical` strategies
+ The PolymorphicObject's move-semantic `copy_from` variant
+ The templated `SolverBase` class.
+ The class `MachineTopology` is deprecated in favor of `machine_topology`.
+ Logger constructors and create functions with the `executor` parameter.
+ The virtual, protected, Dense functions `compute_norm1_impl`, `add_scaled_impl`, etc.
+ Logger events for solvers and criterion without the additional `implicit_tau_sq` parameter.
+ The global `gko::solver::default_krylov_dim`, use instead `gko::solver::gmres_default_krylov_dim`.

### Added features

+ Adds a batch::BatchLinOp class that forms a base class for batched linear operators such as batched matrix formats, solver and preconditioners [#1379](#1379)
+ Adds a batch::MultiVector class that enables operations such as dot, norm, scale on batched vectors [#1371](#1371)
+ Adds a batch::Dense matrix format that stores batched dense matrices and provides gemv operations for these dense matrices. [#1413](#1413)
+ Adds a batch::Ell matrix format that stores batched Ell matrices and provides spmv operations for these batched Ell matrices. [#1416](#1416) [#1437](#1437)
+ Add a batch::Bicgstab solver (class, core, and reference kernels) that enables iterative solution of batched linear systems [#1438](#1438).
+ Add device kernels (CUDA, HIP, and DPCPP) for batch::Bicgstab solver. [#1443](#1443).
+ New MC64 reordering algorithm which optimizes the diagonal product or sum of a matrix by permuting the rows, and computes additional scaling factors for equilibriation [#1120](#1120)
+ New interface for (non-symmetric) permutation and scaled permutation of Dense and Csr matrices [#1415](#1415)
+ LU and Cholesky Factorizations can now be separated into their factors [#1432](#1432)
+ New symbolic LU factorization algorithm that is optimized for matrices with an almost-symmetric sparsity pattern [#1445](#1445)
+ Sorting kernels for SparsityCsr on all backends [#1343](#1343)
+ Allow passing pre-generated local solver as factory parameter for the distributed Schwarz preconditioner [#1426](#1426)
+ Add DPCPP kernels for Partition [#1034](#1034), and CSR's `check_diagonal_entries` and `add_scaled_identity` functionality [#1436](#1436)
+ Adds a helper function to create a partition based on either local sizes, or local ranges [#1227](#1227)
+ Add function to compute arithmetic mean of dense and distributed vectors [#1275](#1275)
+ Adds `icpx` compiler supports [#1350](#1350)
+ All backends can be built simultaneously [#1333](#1333)
+ Emits a CMake warning in downstream projects that use different compilers than the installed Ginkgo [#1372](#1372)
+ Reordering algorithms in sparse_blas benchmark [#1354](#1354)
+ Benchmarks gained an `-allocator` parameter to specify device allocators [#1385](#1385)
+ Benchmarks gained an `-input_matrix` parameter that initializes the input JSON based on the filename [#1387](#1387)
+ Benchmark inputs can now be reordered as a preprocessing step [#1408](#1408)


### Improvements

+ Significantly improve Cholesky factorization performance [#1366](#1366)
+ Improve parallel build performance [#1378](#1378)
+ Allow constrained parallel test execution using CTest resources [#1373](#1373)
+ Use arithmetic type more inside mixed precision ELL [#1414](#1414)
+ Most factory parameters of factory type no longer need to be constructed explicitly via `.on(exec)` [#1336](#1336) [#1439](#1439)
+ Improve ParILU(T)/ParIC(T) convergence by using more appropriate atomic operations [#1434](#1434)

### Fixes

+ Fix an over-allocation for OpenMP reductions [#1369](#1369)
+ Fix DPCPP's common-kernel reduction for empty input sizes [#1362](#1362)
+ Fix several typos in the API and documentation [#1348](#1348)
+ Fix inconsistent `Threads` between generations [#1388](#1388)
+ Fix benchmark median condition [#1398](#1398)
+ Fix HIP 5.6.0 compilation [#1411](#1411)
+ Fix missing destruction of rand_generator from cuda/hip [#1417](#1417)
+ Fix PAPI logger destruction order [#1419](#1419)
+ Fix TAU logger compilation [#1422](#1422)
+ Fix relative criterion to not iterate if the residual is already zero [#1079](#1079)
+ Fix memory_order invocations with C++20 changes [#1402](#1402)
+ Fix `check_diagonal_entries_exist` report correctly when only missing diagonal value in the last rows. [#1440](#1440)
+ Fix checking OpenMPI version in cross-compilation settings [#1446](#1446)
+ Fix false-positive deprecation warnings in Ginkgo, especially for the old Rcm (it doesn't emit deprecation warnings anymore as a result but is still considered deprecated) [#1444](#1444)

### Related PR: #1454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-to-merge This PR is ready to merge. mod:all This touches all Ginkgo modules. reg:build This is related to the build system. reg:example This is related to the examples. reg:testing This is related to testing. type:matrix-format This is related to the Matrix formats type:reordering This is related to the matrix(LinOp) reordering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants