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

Dpcpp port ELL and the porting script #779

Merged
merged 12 commits into from
Jul 22, 2021
Merged

Dpcpp port ELL and the porting script #779

merged 12 commits into from
Jul 22, 2021

Conversation

yhmtsai
Copy link
Member

@yhmtsai yhmtsai commented May 31, 2021

This PR adds the dpcpp ported ELL and the porting script
For review before merging dense, the https://github.com/ginkgo-project/ginkgo/pull/779/files/7ac6d0909f006b52c5516e63b50cf0dff6b18012..3fc8bea0d5d6f81ef4be661aade1254ad1d54355 changes only contains the ell part

TODO:

  • clear some unused code in script
  • add ConfigSelection into ELL (maybe not)
  • merge dense

@yhmtsai yhmtsai added the 1:ST:WIP This PR is a work in progress. Not ready for review. label May 31, 2021
@yhmtsai yhmtsai added this to the Ginkgo 1.4.0 milestone May 31, 2021
@yhmtsai yhmtsai self-assigned this May 31, 2021
@ginkgo-bot ginkgo-bot added mod:core This is related to the core module. mod:dpcpp This is related to the DPC++ module. reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system. reg:helper-scripts This issue/PR is related to the helper scripts mainly concerned with development of Ginkgo. reg:testing This is related to testing. type:matrix-format This is related to the Matrix formats labels May 31, 2021
@yhmtsai
Copy link
Member Author

yhmtsai commented Jun 2, 2021

format!

Copy link
Member

@tcojean tcojean left a comment

Choose a reason for hiding this comment

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

For now, I only look into the oneAPI porting script to get that out of the
way. My main concern is to create a proper documentation of this as well as a
few fixes. I do a few tentative comments already in line in the files. I think
in addition to that, having a main README.md file which explains the
workflow and how the different parts are organized and interact with each
other would be useful.

local str="$1"
# local GET_PARAM=" *([^ ]*) *$"
# Need to remove the = ....
# note. it only remove the simple one
Copy link
Member

Choose a reason for hiding this comment

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

Here you mean that it doesn't work with x = y = 3 sort of cases?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but I think the template will not have this case?

# It should automatically be decided from argument
# Also need to ignore = ...
if [[ "${temp}" =~ "typename" ]]; then
:
Copy link
Member

Choose a reason for hiding this comment

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

continue?

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, I need to reset the temp to empty

echo "$parameter"
}

check_closed() {
Copy link
Member

Choose a reason for hiding this comment

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

Since the function is also in the other file, you could share this.

echo "false"
fi
}
CONFIG_SELECTION_SUFFIX="_CONFIG"
Copy link
Member

Choose a reason for hiding this comment

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

This can be shared as well

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 situation is complex, and we do not add the config to cuda.
Thus, I will delete the adding Config part first.

dev_tools/oneapi/add_host_function.sh Outdated Show resolved Hide resolved

check_closed() {
local str="$1"
str="${str//->}"
Copy link
Member

Choose a reason for hiding this comment

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

Extra comment? # Replace everything except begin or end characters, resp. (<[ and )>]

local str="$1"
str="${str//->}"
str_start="${str//[^(<\[]}"
str_end="${str//[^>)\]]}"
Copy link
Member

@tcojean tcojean Jun 4, 2021

Choose a reason for hiding this comment

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

Extra comment? # Check that there are as many begin as end characters

echo "false"
fi
}

Copy link
Member

Choose a reason for hiding this comment

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

Possible comment:
# Converts a CUDA kernel call to the DPC++ equivalent. Also takes care of the config selection calls and DPC++ queue manipulation if needed.

fi
}

convert_syntax() {
Copy link
Member

Choose a reason for hiding this comment

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

Tentative other name:
convert_cuda_kernel_call

}

convert_syntax() {
local syntax_regex="([^<>]*)(<[^<>]*>)?<<<(.*)>>>(.*)"
Copy link
Member

@tcojean tcojean Jun 4, 2021

Choose a reason for hiding this comment

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

Maybe a comment for the regex?

# [1]: kernel name
# [2]: template parameters if it exists
# [3]: CUDA parameters
# [4]: the rest of the function call (parameters, ...)

As a note, couldn't the template parameters call another templated struct? In
that case, maybe the check [^<>]* isn't warranted for the template portion?

Copy link
Member Author

Choose a reason for hiding this comment

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

you are right, it can not handle call<t<1>, ..><<<>>>()
should we consider it? it maybe is possible to handle up to one level but arbitrary template is hard or impossible?

Copy link
Member

@tcojean tcojean left a comment

Choose a reason for hiding this comment

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

Continued

local num=0
local var=""
if [[ "${str}" =~ ${syntax_regex} ]]; then
content="${BASH_REMATCH[3]}"
Copy link
Member

Choose a reason for hiding this comment

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

local content="${BASH_REMATCH[3]}"

fi
temp="${temp}${variable}"
# echo "// temp ${temp}"
is_closed=$(check_closed "$temp")
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 a comment is warranted here:
# Do not fall into the trap of counting parameters in a sub-expression, such as a function call inside the CUDA kernel parameters

fi
temp=""
fi
done
Copy link
Member

Choose a reason for hiding this comment

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

If I'm correct, all you do in the previous loop is to count the number of
variables in the list, and you reconstruct it all in $var? In that case,
isn't it possible to use three regex on $content to cleanup the annoying
parts before counting? Like:

temp=${content//\[*\]/}
temp=${temp//\(*\)/}
temp=${temp//<*>/}
num=$((${#temp//[^,]} + 1))
# You can also do checks for when num == 4

local suffix=""
local function_name=$(echo "${BASH_REMATCH[1]}" | sed -E 's/(.*::)| //g')
# echo "// functioname ${function_name}"
MAP_FILE="map_list"
Copy link
Member

Choose a reason for hiding this comment

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

This seems to come from somewhere else, maybe put it as a global variable or
function variable?

# echo "// functioname ${function_name}"
MAP_FILE="map_list"
suffix=$(cat "${MAP_FILE}" | sed -nE "s/${function_name} -> ${function_name}(.*)/\1/p")
suffix_matches=$(echo "${suffix}" | wc -l)
Copy link
Member

Choose a reason for hiding this comment

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

local suffix_matches=$(echo "${suffix}" | wc -l)


# extract device_code
if [ "${EXTRACT_KERNEL}" = "true" ]; then
IFS=';' read -ra individual_deivce <<< "${DEVICE_FILE}"
Copy link
Member

Choose a reason for hiding this comment

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

IFS=';' read -ra individual_device <<< "${DEVICE_FILE}"

# extract device_code
if [ "${EXTRACT_KERNEL}" = "true" ]; then
IFS=';' read -ra individual_deivce <<< "${DEVICE_FILE}"
for variable in "${individual_deivce[@]}"; do
Copy link
Member

Choose a reason for hiding this comment

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

for variable in "${individual_device[@]}"; do

mkdir -p "${ROOT_DIR}/${dpct_dir}"
cp "${dpct_device_file}" "${ROOT_DIR}/${dpct_device_path}"
done
fi
Copy link
Member

Choose a reason for hiding this comment

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

I fail to see for now, what is this for?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is optional and off.
it will move the common code to common/dpcpp_code if enabling it.

cp "${dpct_device_file}" "${ROOT_DIR}/${dpct_device_path}"
done
fi

Copy link
Member

Choose a reason for hiding this comment

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

Maybe a comment?
# Integrate the new DPC++ file into the correct place

done
fi

target_file=$(echo "${input}" | sed 's/cuda\//dpcpp\//g;s/\.cuh/\.dp\.hpp/g;s/\.cu/\.dp\.cpp/g')
Copy link
Member

Choose a reason for hiding this comment

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

target_file=$(echo "${input}" | sed 's:cuda/:dpcpp/:g;s:\.cuh:\.dp\.hpp:g;s:\.cu:\.dp\.cpp:g')

@yhmtsai yhmtsai force-pushed the dpcpp_port_ell branch 3 times, most recently from 146b746 to d5c5899 Compare July 13, 2021 21:23
@yhmtsai yhmtsai added 1:ST:ready-for-review This PR is ready for review and removed 1:ST:WIP This PR is a work in progress. Not ready for review. labels Jul 14, 2021
@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #779 (7dd6ef1) into develop (47ba37d) will increase coverage by 0.54%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #779      +/-   ##
===========================================
+ Coverage    93.71%   94.25%   +0.54%     
===========================================
  Files          408      408              
  Lines        32758    32756       -2     
===========================================
+ Hits         30698    30874     +176     
+ Misses        2060     1882     -178     
Impacted Files Coverage Δ
accessor/range.hpp 100.00% <100.00%> (ø)
reference/factorization/par_ilut_kernels.cpp 100.00% <0.00%> (+0.49%) ⬆️
omp/factorization/par_ilut_kernels.cpp 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47ba37d...7dd6ef1. Read the comment docs.

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.

This is a bit out of my depth, but I just had a cursory look. :)

dpcpp/base/config.hpp Outdated Show resolved Hide resolved
dpcpp/matrix/ell_kernels.dp.cpp Outdated Show resolved Hide resolved
@@ -69,7 +69,8 @@ class range {
*
* @param params parameters forwarded to Accessor constructor.
*/
template <typename... AccessorParams>
template <typename... AccessorParams,
std::enable_if_t<(sizeof...(AccessorParams) > 1), bool> = true>
Copy link
Member

Choose a reason for hiding this comment

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

This change would make the include/ginkgo/core/base/range.hpp diverge ? Maybe we should either note this somewhere and in 2.0 fix it, or adapt the include/ginkgo/core/base/range.hpp as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

what do you mean diverge here? the usage of constructor keeps the same due to the accessor always require more than 1 args

Copy link
Member

Choose a reason for hiding this comment

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

I believe this is a duplication of the include/ginkgo/core/base/range.hpp, as it was needed to be separate for the Accessor. I meant now the typically the same class (range) has two different versions and we should probably unify them. Also I think you are changing one of the copy constructors below ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it uses enable_if_t to avoid compiler use this constructor as copy constuctor. By doing so, compiler can auto generate the copy/move constructor, so we do not need to manually point copy constructor to default behavior.
I can also change the part in include/ginkgo/core/base/range.hpp

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I guess we need to be sure that it does not break interface, I would also maybe ping @thoasm for his comments here.

Copy link
Member

Choose a reason for hiding this comment

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

Can you give a bit of background why we need a copy constructor and a mutable lvalue ref constructor?

Copy link
Member Author

Choose a reason for hiding this comment

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

disabling Outer(const Outer&)

error: no matching constructor for initialization of 'Outer'
       run([&]() { [=]() { func(a); }; });
                                ^
candidate constructor not viable: 1st argument ('const Outer') would lose const qualifier

disabling Outer(Outer&)

note: in instantiation of function template specialization 'Outer::Outer<Outer &>' requested here
  run([&]() { [=]() { func(a); }; });

this is simple version for emulating the dpcpp submit the job.
As far as I remember, two default impl out of class is okay in C++ code, but dpcpp can not allow it.

Copy link
Member

Choose a reason for hiding this comment

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

Can you post a longer snippet that contains the entire context? Why do you need to modify the element you are copying in a copy constructor?

Copy link
Member

Choose a reason for hiding this comment

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

Right, we talked about something like that previously.
If I remember correctly, the problem is that you need both const range & and range & for them to be used, otherwise, for a range &, the forwarding constructor is taken. Additionally, for some reason, the visual studio compiler does not accept both copy constructors range(const range &) = default and range(range &) = default (apparently, implementing them instead of =default does not help as well).
Was that about right, @yhmtsai?
I would prefer to find an alternative solution and will try something tomorrow, otherwise, we can add the SFINAE work-around to only exclude single range parameter for this constructor.

Copy link
Member Author

@yhmtsai yhmtsai Jul 20, 2021

Choose a reason for hiding this comment

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

this is the small example

#include <CL/sycl.hpp>
#include <utility>
class Inner {
public:
    explicit Inner(int, int) {}
};

class Outer {
public:
    template <typename... T>
    constexpr explicit Outer(T &&... inner) : inner_{std::forward<T>(inner)...}
    {}
    Outer(Outer &&) = default;
    // putting default inside class works
    // Outer(Outer &) = default;
    // Outer(Outer const&) = default;
    Outer(Outer &);
    Outer(Outer const &);
private:
    Inner inner_;
};

// putting outside fails
Outer::Outer(Outer &) = default;
Outer::Outer(Outer const &) = default;

void func(Outer a) {}

template <typename Lambda>
void run(Lambda f)
{
    f();
}

int main()
{
    auto a = Outer(3, 4);
    // simulate the submit
    run([&]() { [=]() { func(a); }; });
    sycl::queue q_ct1{sycl::property::queue::in_order{}};
    // real submit
    q_ct1.submit([&](sycl::handler &cgh) {
        cgh.parallel_for(sycl::range<1>{1},
                         [=](sycl::id<1> idx_id) { func(a); });
    });
    q_ct1.wait_and_throw();
    return 0;
}

the error in MSVC is shown in https://github.com/ginkgo-project/ginkgo/runs/3008759379?check_suite_focus=true
error C2580 ... multiple versions of a defaulted special member functions are not allowed

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 more minor comments

dev_tools/oneapi/add_host_function.sh Outdated Show resolved Hide resolved
dev_tools/oneapi/add_host_function.sh Show resolved Hide resolved
dev_tools/oneapi/convert_source.sh Show resolved Hide resolved
dev_tools/oneapi/fake_interface/cooperative_groups.cuh Outdated Show resolved Hide resolved
dev_tools/oneapi/fake_interface/cooperative_groups.cuh Outdated Show resolved Hide resolved
dpcpp/base/helper.hpp Outdated Show resolved Hide resolved
dpcpp/components/prefix_sum.dp.hpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@fritzgoebel fritzgoebel left a comment

Choose a reason for hiding this comment

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

The ELL kernels look good to me. On the rest I think others are better qualified to review

@@ -49,6 +49,12 @@ struct config {
*/
using lane_mask_type = uint64;


/**
* The number of threads within a CUDA warp.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* The number of threads within a CUDA warp.
* The number of threads within a DPCPP warp.

@@ -59,6 +65,11 @@ struct config {
* to maximize GPU occupancy.
*/
static constexpr uint32 min_warps_per_block = 4;

/**
* The maximal number of threads allowed in a CUDA warp.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* The maximal number of threads allowed in a CUDA warp.
* The maximal number of threads allowed in a DPCPP warp.

@yhmtsai yhmtsai force-pushed the dpcpp_port_ell branch 2 times, most recently from dec40a8 to 317ddd7 Compare July 21, 2021 21:33
thoasm
thoasm previously requested changes Jul 22, 2021
Copy link
Member

@thoasm thoasm left a comment

Choose a reason for hiding this comment

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

I would prefer to move the check_if_valid helper structure.

accessor/range.hpp Outdated Show resolved Hide resolved
accessor/range.hpp Outdated Show resolved Hide resolved
Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

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

LGTM! Does it make sense to keep the conversion scripts in-tree in the long run? We're not maintaining them, and they will not be used after we finished porting.

// Because the atomic operation changes the values of c during computation,
// it can not do the right alpha * a * b + beta * c operation.
// Thus, the dpcpp kernel only computes alpha * a * b when it uses atomic
// operation.
if (atomic) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead note that c needs to be scaled beforehand, otherwise this might lead to confusion. Also:

Suggested change
// Because the atomic operation changes the values of c during computation,
// it can not do the right alpha * a * b + beta * c operation.
// Thus, the dpcpp kernel only computes alpha * a * b when it uses atomic
// operation.
if (atomic) {
// Because the atomic operation changes the values of c during computation,
// it can not do the right alpha * a * b + beta * c operation.
// Thus, the dpcpp kernel only adds alpha * a * b when it uses atomic
// operation.
if (atomic) {

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 will move this part into the atomic scope and the following is what I use (including c be scaled)

// Because the atomic operation changes the values of c during
// computation, it can not directly do alpha * a * b + beta * c
// operation. The beta * c needs to be done before calling this kernel.
// Then, this kernel only adds alpha * a * b when it uses atomic
// operation.

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.

LGTM! Thanks for adding the documentation.

dev_tools/oneapi/add_host_function.sh Show resolved Hide resolved
dev_tools/oneapi/convert_source.sh Show resolved Hide resolved
yhmtsai and others added 9 commits July 22, 2021 11:31
Co-authored-by: Terry Cojean <terry.cojean@kit.edu>
such that compiler use auto generated one.
Co-authored-by: Fritz Goebel <goebel.fritz@googlemail.com>
Co-authored-by: Pratik Nayak <pratikvn@protonmail.com>
Co-authored-by: Tobias Ribizel <ribizel@kit.edu>
Co-authored-by: Thomas Grützmacher <thomas.gruetzmacher@kit.edu>
@thoasm thoasm dismissed their stale review July 22, 2021 09:54

Changes were addressed

@yhmtsai yhmtsai added the 1:ST:ready-to-merge This PR is ready to merge. label Jul 22, 2021
@sonarcloud
Copy link

sonarcloud bot commented Jul 22, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
5.8% 5.8% Duplication

@yhmtsai
Copy link
Member Author

yhmtsai commented Jul 22, 2021

@upsj I think we put it here like cuda2hip. it will be hard to use on adaptive changes.
implement cuda -> apply cuda2dpcpp -> delete those porting on unchanged function -> fix the porting
maybe some script to only extract the changed function or selection help this situtation

@yhmtsai yhmtsai removed the 1:ST:ready-for-review This PR is ready for review label Jul 22, 2021
@yhmtsai yhmtsai merged commit d081b71 into develop Jul 22, 2021
@yhmtsai yhmtsai deleted the dpcpp_port_ell branch July 22, 2021 21:28
tcojean added a commit that referenced this pull request Aug 20, 2021
Ginkgo release 1.4.0

The Ginkgo team is proud to announce the new Ginkgo minor release 1.4.0. This
release brings most of the Ginkgo functionality to the Intel DPC++ ecosystem
which enables Intel-GPU and CPU execution. The only Ginkgo features which have
not been ported yet are some preconditioners.

Ginkgo's mixed-precision support is greatly enhanced thanks to:
1. The new Accessor concept, which allows writing kernels featuring on-the-fly
memory compression, among other features. The accessor can be used as
header-only, see the [accessor BLAS benchmarks repository](https://github.com/ginkgo-project/accessor-BLAS/tree/develop) as a usage example.
2. All LinOps now transparently support mixed-precision execution. By default,
this is done through a temporary copy which may have a performance impact but
already allows mixed-precision research.

Native mixed-precision ELL kernels are implemented which do not see this cost.
The accessor is also leveraged in a new CB-GMRES solver which allows for
performance improvements by compressing the Krylov basis vectors. Many other
features have been added to Ginkgo, such as reordering support, a new IDR
solver, Incomplete Cholesky preconditioner, matrix assembly support (only CPU
for now), machine topology information, and more!

Supported systems and requirements:
+ For all platforms, cmake 3.13+
+ C++14 compliant compiler
+ Linux and MacOS
  + gcc: 5.3+, 6.3+, 7.3+, all versions after 8.1+
  + clang: 3.9+
  + Intel compiler: 2018+
  + Apple LLVM: 8.0+
  + CUDA module: CUDA 9.0+
  + HIP module: ROCm 3.5+
  + DPC++ module: Intel OneAPI 2021.3. Set the CXX compiler to `dpcpp`.
+ Windows
  + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, all versions after 8.1+
  + Microsoft Visual Studio: VS 2019
  + CUDA module: CUDA 9.0+, Microsoft Visual Studio
  + OpenMP module: MinGW or Cygwin.


Algorithm and important feature additions:
+ Add a new DPC++ Executor for SYCL execution and other base utilities
  [#648](#648), [#661](#661), [#757](#757), [#832](#832)
+ Port matrix formats, solvers and related kernels to DPC++. For some kernels,
  also make use of a shared kernel implementation for all executors (except
  Reference). [#710](#710), [#799](#799), [#779](#779), [#733](#733), [#844](#844), [#843](#843), [#789](#789), [#845](#845), [#849](#849), [#855](#855), [#856](#856)
+ Add accessors which allow multi-precision kernels, among other things.
  [#643](#643), [#708](#708)
+ Add support for mixed precision operations through apply in all LinOps. [#677](#677)
+ Add incomplete Cholesky factorizations and preconditioners as well as some
  improvements to ILU. [#672](#672), [#837](#837), [#846](#846)
+ Add an AMGX implementation and kernels on all devices but DPC++.
  [#528](#528), [#695](#695), [#860](#860)
+ Add a new mixed-precision capability solver, Compressed Basis GMRES
  (CB-GMRES). [#693](#693), [#763](#763)
+ Add the IDR(s) solver. [#620](#620)
+ Add a new fixed-size block CSR matrix format (for the Reference executor).
  [#671](#671), [#730](#730)
+ Add native mixed-precision support to the ELL format. [#717](#717), [#780](#780)
+ Add Reverse Cuthill-McKee reordering [#500](#500), [#649](#649)
+ Add matrix assembly support on CPUs. [#644](#644)
+ Extends ISAI from triangular to general and spd matrices. [#690](#690)

Other additions:
+ Add the possibility to apply real matrices to complex vectors.
  [#655](#655), [#658](#658)
+ Add functions to compute the absolute of a matrix format. [#636](#636)
+ Add symmetric permutation and improve existing permutations.
  [#684](#684), [#657](#657), [#663](#663)
+ Add a MachineTopology class with HWLOC support [#554](#554), [#697](#697)
+ Add an implicit residual norm criterion. [#702](#702), [#818](#818), [#850](#850)
+ Row-major accessor is generalized to more than 2 dimensions and a new
  "block column-major" accessor has been added. [#707](#707)
+ Add an heat equation example. [#698](#698), [#706](#706)
+ Add ccache support in CMake and CI. [#725](#725), [#739](#739)
+ Allow tuning and benchmarking variables non intrusively. [#692](#692)
+ Add triangular solver benchmark [#664](#664)
+ Add benchmarks for BLAS operations [#772](#772), [#829](#829)
+ Add support for different precisions and consistent index types in benchmarks.
  [#675](#675), [#828](#828)
+ Add a Github bot system to facilitate development and PR management.
  [#667](#667), [#674](#674), [#689](#689), [#853](#853)
+ Add Intel (DPC++) CI support and enable CI on HPC systems. [#736](#736), [#751](#751), [#781](#781)
+ Add ssh debugging for Github Actions CI. [#749](#749)
+ Add pipeline segmentation for better CI speed. [#737](#737)


Changes:
+ Add a Scalar Jacobi specialization and kernels. [#808](#808), [#834](#834), [#854](#854)
+ Add implicit residual log for solvers and benchmarks. [#714](#714)
+ Change handling of the conjugate in the dense dot product. [#755](#755)
+ Improved Dense stride handling. [#774](#774)
+ Multiple improvements to the OpenMP kernels performance, including COO,
an exclusive prefix sum, and more. [#703](#703), [#765](#765), [#740](#740)
+ Allow specialization of submatrix and other dense creation functions in solvers. [#718](#718)
+ Improved Identity constructor and treatment of rectangular matrices. [#646](#646)
+ Allow CUDA/HIP executors to select allocation mode. [#758](#758)
+ Check if executors share the same memory. [#670](#670)
+ Improve test install and smoke testing support. [#721](#721)
+ Update the JOSS paper citation and add publications in the documentation.
  [#629](#629), [#724](#724)
+ Improve the version output. [#806](#806)
+ Add some utilities for dim and span. [#821](#821)
+ Improved solver and preconditioner benchmarks. [#660](#660)
+ Improve benchmark timing and output. [#669](#669), [#791](#791), [#801](#801), [#812](#812)


Fixes:
+ Sorting fix for the Jacobi preconditioner. [#659](#659)
+ Also log the first residual norm in CGS [#735](#735)
+ Fix BiCG and HIP CSR to work with complex matrices. [#651](#651)
+ Fix Coo SpMV on strided vectors. [#807](#807)
+ Fix segfault of extract_diagonal, add short-and-fat test. [#769](#769)
+ Fix device_reset issue by moving counter/mutex to device. [#810](#810)
+ Fix `EnableLogging` superclass. [#841](#841)
+ Support ROCm 4.1.x and breaking HIP_PLATFORM changes. [#726](#726)
+ Decreased test size for a few device tests. [#742](#742)
+ Fix multiple issues with our CMake HIP and RPATH setup.
  [#712](#712), [#745](#745), [#709](#709)
+ Cleanup our CMake installation step. [#713](#713)
+ Various simplification and fixes to the Windows CMake setup. [#720](#720), [#785](#785)
+ Simplify third-party integration. [#786](#786)
+ Improve Ginkgo device arch flags management. [#696](#696)
+ Other fixes and improvements to the CMake setup.
  [#685](#685), [#792](#792), [#705](#705), [#836](#836)
+ Clarification of dense norm documentation [#784](#784)
+ Various development tools fixes and improvements [#738](#738), [#830](#830), [#840](#840)
+ Make multiple operators/constructors explicit. [#650](#650), [#761](#761)
+ Fix some issues, memory leaks and warnings found by MSVC.
  [#666](#666), [#731](#731)
+ Improved solver memory estimates and consistent iteration counts [#691](#691)
+ Various logger improvements and fixes [#728](#728), [#743](#743), [#754](#754)
+ Fix for ForwardIterator requirements in iterator_factory. [#665](#665)
+ Various benchmark fixes. [#647](#647), [#673](#673), [#722](#722)
+ Various CI fixes and improvements. [#642](#642), [#641](#641), [#795](#795), [#783](#783), [#793](#793), [#852](#852)


Related PR: #857
tcojean added a commit that referenced this pull request Aug 23, 2021
Release 1.4.0 to master

The Ginkgo team is proud to announce the new Ginkgo minor release 1.4.0. This
release brings most of the Ginkgo functionality to the Intel DPC++ ecosystem
which enables Intel-GPU and CPU execution. The only Ginkgo features which have
not been ported yet are some preconditioners.

Ginkgo's mixed-precision support is greatly enhanced thanks to:
1. The new Accessor concept, which allows writing kernels featuring on-the-fly
memory compression, among other features. The accessor can be used as
header-only, see the [accessor BLAS benchmarks repository](https://github.com/ginkgo-project/accessor-BLAS/tree/develop) as a usage example.
2. All LinOps now transparently support mixed-precision execution. By default,
this is done through a temporary copy which may have a performance impact but
already allows mixed-precision research.

Native mixed-precision ELL kernels are implemented which do not see this cost.
The accessor is also leveraged in a new CB-GMRES solver which allows for
performance improvements by compressing the Krylov basis vectors. Many other
features have been added to Ginkgo, such as reordering support, a new IDR
solver, Incomplete Cholesky preconditioner, matrix assembly support (only CPU
for now), machine topology information, and more!

Supported systems and requirements:
+ For all platforms, cmake 3.13+
+ C++14 compliant compiler
+ Linux and MacOS
  + gcc: 5.3+, 6.3+, 7.3+, all versions after 8.1+
  + clang: 3.9+
  + Intel compiler: 2018+
  + Apple LLVM: 8.0+
  + CUDA module: CUDA 9.0+
  + HIP module: ROCm 3.5+
  + DPC++ module: Intel OneAPI 2021.3. Set the CXX compiler to `dpcpp`.
+ Windows
  + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, all versions after 8.1+
  + Microsoft Visual Studio: VS 2019
  + CUDA module: CUDA 9.0+, Microsoft Visual Studio
  + OpenMP module: MinGW or Cygwin.


Algorithm and important feature additions:
+ Add a new DPC++ Executor for SYCL execution and other base utilities
  [#648](#648), [#661](#661), [#757](#757), [#832](#832)
+ Port matrix formats, solvers and related kernels to DPC++. For some kernels,
  also make use of a shared kernel implementation for all executors (except
  Reference). [#710](#710), [#799](#799), [#779](#779), [#733](#733), [#844](#844), [#843](#843), [#789](#789), [#845](#845), [#849](#849), [#855](#855), [#856](#856)
+ Add accessors which allow multi-precision kernels, among other things.
  [#643](#643), [#708](#708)
+ Add support for mixed precision operations through apply in all LinOps. [#677](#677)
+ Add incomplete Cholesky factorizations and preconditioners as well as some
  improvements to ILU. [#672](#672), [#837](#837), [#846](#846)
+ Add an AMGX implementation and kernels on all devices but DPC++.
  [#528](#528), [#695](#695), [#860](#860)
+ Add a new mixed-precision capability solver, Compressed Basis GMRES
  (CB-GMRES). [#693](#693), [#763](#763)
+ Add the IDR(s) solver. [#620](#620)
+ Add a new fixed-size block CSR matrix format (for the Reference executor).
  [#671](#671), [#730](#730)
+ Add native mixed-precision support to the ELL format. [#717](#717), [#780](#780)
+ Add Reverse Cuthill-McKee reordering [#500](#500), [#649](#649)
+ Add matrix assembly support on CPUs. [#644](#644)
+ Extends ISAI from triangular to general and spd matrices. [#690](#690)

Other additions:
+ Add the possibility to apply real matrices to complex vectors.
  [#655](#655), [#658](#658)
+ Add functions to compute the absolute of a matrix format. [#636](#636)
+ Add symmetric permutation and improve existing permutations.
  [#684](#684), [#657](#657), [#663](#663)
+ Add a MachineTopology class with HWLOC support [#554](#554), [#697](#697)
+ Add an implicit residual norm criterion. [#702](#702), [#818](#818), [#850](#850)
+ Row-major accessor is generalized to more than 2 dimensions and a new
  "block column-major" accessor has been added. [#707](#707)
+ Add an heat equation example. [#698](#698), [#706](#706)
+ Add ccache support in CMake and CI. [#725](#725), [#739](#739)
+ Allow tuning and benchmarking variables non intrusively. [#692](#692)
+ Add triangular solver benchmark [#664](#664)
+ Add benchmarks for BLAS operations [#772](#772), [#829](#829)
+ Add support for different precisions and consistent index types in benchmarks.
  [#675](#675), [#828](#828)
+ Add a Github bot system to facilitate development and PR management.
  [#667](#667), [#674](#674), [#689](#689), [#853](#853)
+ Add Intel (DPC++) CI support and enable CI on HPC systems. [#736](#736), [#751](#751), [#781](#781)
+ Add ssh debugging for Github Actions CI. [#749](#749)
+ Add pipeline segmentation for better CI speed. [#737](#737)


Changes:
+ Add a Scalar Jacobi specialization and kernels. [#808](#808), [#834](#834), [#854](#854)
+ Add implicit residual log for solvers and benchmarks. [#714](#714)
+ Change handling of the conjugate in the dense dot product. [#755](#755)
+ Improved Dense stride handling. [#774](#774)
+ Multiple improvements to the OpenMP kernels performance, including COO,
an exclusive prefix sum, and more. [#703](#703), [#765](#765), [#740](#740)
+ Allow specialization of submatrix and other dense creation functions in solvers. [#718](#718)
+ Improved Identity constructor and treatment of rectangular matrices. [#646](#646)
+ Allow CUDA/HIP executors to select allocation mode. [#758](#758)
+ Check if executors share the same memory. [#670](#670)
+ Improve test install and smoke testing support. [#721](#721)
+ Update the JOSS paper citation and add publications in the documentation.
  [#629](#629), [#724](#724)
+ Improve the version output. [#806](#806)
+ Add some utilities for dim and span. [#821](#821)
+ Improved solver and preconditioner benchmarks. [#660](#660)
+ Improve benchmark timing and output. [#669](#669), [#791](#791), [#801](#801), [#812](#812)


Fixes:
+ Sorting fix for the Jacobi preconditioner. [#659](#659)
+ Also log the first residual norm in CGS [#735](#735)
+ Fix BiCG and HIP CSR to work with complex matrices. [#651](#651)
+ Fix Coo SpMV on strided vectors. [#807](#807)
+ Fix segfault of extract_diagonal, add short-and-fat test. [#769](#769)
+ Fix device_reset issue by moving counter/mutex to device. [#810](#810)
+ Fix `EnableLogging` superclass. [#841](#841)
+ Support ROCm 4.1.x and breaking HIP_PLATFORM changes. [#726](#726)
+ Decreased test size for a few device tests. [#742](#742)
+ Fix multiple issues with our CMake HIP and RPATH setup.
  [#712](#712), [#745](#745), [#709](#709)
+ Cleanup our CMake installation step. [#713](#713)
+ Various simplification and fixes to the Windows CMake setup. [#720](#720), [#785](#785)
+ Simplify third-party integration. [#786](#786)
+ Improve Ginkgo device arch flags management. [#696](#696)
+ Other fixes and improvements to the CMake setup.
  [#685](#685), [#792](#792), [#705](#705), [#836](#836)
+ Clarification of dense norm documentation [#784](#784)
+ Various development tools fixes and improvements [#738](#738), [#830](#830), [#840](#840)
+ Make multiple operators/constructors explicit. [#650](#650), [#761](#761)
+ Fix some issues, memory leaks and warnings found by MSVC.
  [#666](#666), [#731](#731)
+ Improved solver memory estimates and consistent iteration counts [#691](#691)
+ Various logger improvements and fixes [#728](#728), [#743](#743), [#754](#754)
+ Fix for ForwardIterator requirements in iterator_factory. [#665](#665)
+ Various benchmark fixes. [#647](#647), [#673](#673), [#722](#722)
+ Various CI fixes and improvements. [#642](#642), [#641](#641), [#795](#795), [#783](#783), [#793](#793), [#852](#852)

Related PR: #866
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. 1:ST:run-full-test mod:core This is related to the core module. mod:dpcpp This is related to the DPC++ module. reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system. reg:helper-scripts This issue/PR is related to the helper scripts mainly concerned with development of Ginkgo. reg:testing This is related to testing. type:matrix-format This is related to the Matrix formats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants