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

Add conversions benchmarking support to Ginkgo #312

Merged
merged 5 commits into from
Jun 6, 2019

Conversation

tcojean
Copy link
Member

@tcojean tcojean commented May 29, 2019

  • The user specifies the format(s) he wants to benchmark.
  • The benchmarker tries to benchmark this against all other formats.
  • If no conversion exist between these formats, completed: false is reported in the results.
Sample output when running BENCHMARK=conversions

[
    {
        "filename": "/home/benchmarks/.config/ssget/MM/HB/1138_bus/1138_bus.mtx",
        "problem": {
            "id": 1,
            "group": "HB",
            "name": "1138_bus",
            "rows": 1138,
            "cols": 1138,
            "nonzeros": 4054,
            "real": true,
            "binary": false,
            "2d3d": false,
            "posdef": true,
            "psym": 1,
            "nsym": 1,
            "kind": "power network problem",
            "row_distribution": {
                "min": 2,
                "q1": 2.0,
                "median": 3.0,
                "q3": 4.0,
                "max": 18,
                "mean": 3.562390158172232,
                "variance": 3.247864937407531,
                "skewness": 2.228146865738476,
                "kurtosis": 11.27766449882735,
                "hyperskewness": 62.4708567384242,
                "hyperflatness": 401.1203913461838
            },
            "col_distribution": {
                "min": 2,
                "q1": 2.0,
                "median": 3.0,
                "q3": 4.0,
                "max": 18,
                "mean": 3.562390158172232,
                "variance": 3.247864937407531,
                "skewness": 2.228146865738476,
                "kurtosis": 11.27766449882735,
                "hyperskewness": 62.4708567384242,
                "hyperflatness": 401.1203913461838
            }
        },
        "spmv": {
            "csr": {
                "storage": 53712,
                "time": 24744.5,
                "completed": true
            },
            "coo": {
                "storage": 64864,
                "time": 25874.4,
                "completed": true
            },
            "hybrid": {
                "storage": 60312,
                "time": 28899.0,
                "completed": true
            },
            "sellp": {
                "storage": 146216,
                "time": 24955.4,
                "completed": true
            },
            "ell": {
                "storage": 245808,
                "time": 23365.8,
                "completed": true
            }
        },
        "optimal": {
            "spmv": "ell"
        },
        "conversions": {
            "csr-coo": {
                "time": 82400.7,
                "completed": true
            },
            "csr-ell": {
                "time": 155313.0,
                "completed": true
            },
            "csr-hybrid": {
                "completed": false
            },
            "csr-sellp": {
                "time": 252322.3,
                "completed": true
            },
            "coo-csr": {
                "time": 87257.2,
                "completed": true
            },
            "coo-ell": {
                "completed": false
            },
            "coo-hybrid": {
                "completed": false
            },
            "coo-sellp": {
                "completed": false
            },
            "hybrid-coo": {
                "completed": false
            },
            "hybrid-csr": {
                "completed": false
            },
            "hybrid-ell": {
                "completed": false
            },
            "hybrid-sellp": {
                "completed": false
            },
            "sellp-coo": {
                "completed": false
            },
            "sellp-csr": {
                "time": 207013.4,
                "completed": true
            },
            "sellp-ell": {
                "completed": false
            },
            "sellp-hybrid": {
                "completed": false
            },
            "ell-coo": {
                "completed": false
            },
            "ell-csr": {
                "time": 205345.8,
                "completed": true
            },
            "ell-hybrid": {
                "completed": false
            },
            "ell-sellp": {
                "completed": false
            }
        }
    }
]

@tcojean tcojean added is:enhancement An improvement of an existing feature. reg:benchmarking This is related to benchmarking. 1:ST:WIP This PR is a work in progress. Not ready for review. labels May 29, 2019
@tcojean tcojean self-assigned this May 29, 2019
@tcojean tcojean added is:new-feature A request or implementation of a feature that does not exist yet. and removed is:enhancement An improvement of an existing feature. labels May 29, 2019
@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #312 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #312   +/-   ##
========================================
  Coverage    98.17%   98.17%           
========================================
  Files          215      215           
  Lines        16529    16529           
========================================
  Hits         16227    16227           
  Misses         302      302

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 82e6da6...7a1e531. Read the comment docs.

@tcojean tcojean 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 May 29, 2019
@tcojean
Copy link
Member Author

tcojean commented May 29, 2019

This is ready for review. I added a sample output of the current conversion timings for matrix 1138_bus (suitesparse matrix n°1).

@tcojean tcojean added the type:matrix-format This is related to the Matrix formats label May 29, 2019
"Matrix-Vector Multiplication on CUDA.\n"
"hybrid: Hybrid uses ell and coo to represent the matrix.\n"
"sellp: Sliced Ellpack format.\n");

Copy link
Collaborator

@hartwiganzt hartwiganzt May 29, 2019

Choose a reason for hiding this comment

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

I understand correctly, the conversion is always format 1 -> format 2 ? Or both ways?

Copy link
Member Author

Choose a reason for hiding this comment

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

When it is said that the user wants to benchmark conversions for a format (say csr), conversions are automatically tried against all other formats in Ginkgo (i.e. coo, ell, hybrid, sellp).

In other words, the users only give "format1" as argument to the benchmarker. Then, all possible format2 are tested. If both format1 and format2 are given as argument then both ways will be benchmarked. I thought if the users specify both format1 and format2 as arguments it is too tiresome as there is a lot of possible combinations.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense. But we should be explicit in the description, then...

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.

LGTM!
Only very minor comments from my side, nothing critical.

benchmark/conversions/conversions.cpp Outdated Show resolved Hide resolved
benchmark/conversions/conversions.cpp Outdated Show resolved Hide resolved
benchmark/conversions/conversions.cpp Outdated Show resolved Hide resolved
benchmark/conversions/conversions.cpp Outdated Show resolved Hide resolved
@tcojean tcojean force-pushed the conversion_benchmarker branch 4 times, most recently from ea871b9 to fcd29b9 Compare June 3, 2019 16:49
@tcojean
Copy link
Member Author

tcojean commented Jun 3, 2019

This now got quite an update. I removed as part of this PR a lot of the code duplication we had within our benchmarks. I also improve a little the overall code quality (remove unused parameters and templates, etc).

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.

Minor comments.
I really like the improvements you made!

benchmark/utils/spmv_common.hpp Show resolved Hide resolved
benchmark/utils/general.hpp Show resolved Hide resolved
benchmark/matrix_statistics/matrix_statistics.cpp Outdated Show resolved Hide resolved
+ The user specifies the format(s) he wants to benchmark.
+ The benchmarker tries to benchmark this against all other formats.
+ Set a threshold and a coverage range for codecov
+ Set test exclusions for sonarqube
@tcojean
Copy link
Member Author

tcojean commented Jun 5, 2019

Documentation was added, and documentation generation is also fixed as can be seen here:
https://gitlab.com/ginkgo-project/ginkgo-public-ci/-/jobs/225795553

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.

LGTM!
Thanks for also taking care of the documentation errors!

@tcojean tcojean merged commit 2f2f09e into develop Jun 6, 2019
@tcojean tcojean deleted the conversion_benchmarker branch June 6, 2019 08:55
@tcojean tcojean 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 Jul 4, 2019
tcojean added a commit that referenced this pull request Oct 20, 2019
The Ginkgo team is proud to announce the new minor release of Ginkgo version
1.1.0. This release brings several performance improvements, adds Windows support, 
adds support for factorizations inside Ginkgo and a new ILU preconditioner
based on ParILU algorithm, among other things. For detailed information, check the respective issue.

Supported systems and requirements:
+ For all platforms, cmake 3.9+
+ Linux and MacOS
  + gcc: 5.3+, 6.3+, 7.3+, 8.1+
  + clang: 3.9+
  + Intel compiler: 2017+
  + Apple LLVM: 8.0+
  + CUDA module: CUDA 9.0+
+ Windows
  + MinGW and CygWin: gcc 5.3+, 6.3+, 7.3+, 8.1+
  + Microsoft Visual Studio: VS 2017 15.7+
  + CUDA module: CUDA 9.0+, Microsoft Visual Studio
  + OpenMP module: MinGW or CygWin.


The current known issues can be found in the [known issues
page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues).


Additions:
+ Upper and lower triangular solvers ([#327](#327), [#336](#336), [#341](#341), [#342](#342)) 
+ New factorization support in Ginkgo, and addition of the ParILU
  algorithm ([#305](#305), [#315](#315), [#319](#319), [#324](#324))
+ New ILU preconditioner ([#348](#348), [#353](#353))
+ Windows MinGW and Cygwin support ([#347](#347))
+ Windows Visual studio support ([#351](#351))
+ New example showing how to use ParILU as a preconditioner ([#358](#358))
+ New example on using loggers for debugging ([#360](#360))
+ Add two new 9pt and 27pt stencil examples ([#300](#300), [#306](#306))
+ Allow benchmarking CuSPARSE spmv formats through Ginkgo's benchmarks ([#303](#303))
+ New benchmark for sparse matrix format conversions ([#312](#312))
+ Add conversions between CSR and Hybrid formats ([#302](#302), [#310](#310))
+ Support for sorting rows in the CSR format by column idices ([#322](#322))
+ Addition of a CUDA COO SpMM kernel for improved performance ([#345](#345))
+ Addition of a LinOp to handle perturbations of the form (identity + scalar *
  basis * projector) ([#334](#334))
+ New sparsity matrix representation format with Reference and OpenMP
  kernels ([#349](#349), [#350](#350))

Fixes:
+ Accelerate GMRES solver for CUDA executor ([#363](#363))
+ Fix BiCGSTAB solver convergence ([#359](#359))
+ Fix CGS logging by reporting the residual for every sub iteration ([#328](#328))
+ Fix CSR,Dense->Sellp conversion's memory access violation ([#295](#295))
+ Accelerate CSR->Ell,Hybrid conversions on CUDA ([#313](#313), [#318](#318))
+ Fixed slowdown of COO SpMV on OpenMP ([#340](#340))
+ Fix gcc 6.4.0 internal compiler error ([#316](#316))
+ Fix compilation issue on Apple clang++ 10 ([#322](#322))
+ Make Ginkgo able to compile on Intel 2017 and above ([#337](#337))
+ Make the benchmarks spmv/solver use the same matrix formats ([#366](#366))
+ Fix self-written isfinite function ([#348](#348))
+ Fix Jacobi issues shown by cuda-memcheck

Tools and ecosystem:
+ Multiple improvements to the CI system and tools ([#296](#296), [#311](#311), [#365](#365))
+ Multiple improvements to the Ginkgo containers ([#328](#328), [#361](#361))
+ Add sonarqube analysis to Ginkgo ([#304](#304), [#308](#308), [#309](#309))
+ Add clang-tidy and iwyu support to Ginkgo ([#298](#298))
+ Improve Ginkgo's support of xSDK M12 policy by adding the `TPL_` arguments
  to CMake ([#300](#300))
+ Add support for the xSDK R7 policy ([#325](#325))
+ Fix examples in html documentation ([#367](#367))
tcojean added a commit that referenced this pull request Oct 21, 2019
The Ginkgo team is proud to announce the new minor release of Ginkgo version
1.1.0. This release brings several performance improvements, adds Windows support,
adds support for factorizations inside Ginkgo and a new ILU preconditioner
based on ParILU algorithm, among other things. For detailed information, check the respective issue.

Supported systems and requirements:
+ For all platforms, cmake 3.9+
+ Linux and MacOS
  + gcc: 5.3+, 6.3+, 7.3+, 8.1+
  + clang: 3.9+
  + Intel compiler: 2017+
  + Apple LLVM: 8.0+
  + CUDA module: CUDA 9.0+
+ Windows
  + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, 8.1+
  + Microsoft Visual Studio: VS 2017 15.7+
  + CUDA module: CUDA 9.0+, Microsoft Visual Studio
  + OpenMP module: MinGW or Cygwin.


The current known issues can be found in the [known issues
page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues).


### Additions
+ Upper and lower triangular solvers ([#327](#327), [#336](#336), [#341](#341), [#342](#342)) 
+ New factorization support in Ginkgo, and addition of the ParILU
  algorithm ([#305](#305), [#315](#315), [#319](#319), [#324](#324))
+ New ILU preconditioner ([#348](#348), [#353](#353))
+ Windows MinGW and Cygwin support ([#347](#347))
+ Windows Visual Studio support ([#351](#351))
+ New example showing how to use ParILU as a preconditioner ([#358](#358))
+ New example on using loggers for debugging ([#360](#360))
+ Add two new 9pt and 27pt stencil examples ([#300](#300), [#306](#306))
+ Allow benchmarking CuSPARSE spmv formats through Ginkgo's benchmarks ([#303](#303))
+ New benchmark for sparse matrix format conversions ([#312](#312))
+ Add conversions between CSR and Hybrid formats ([#302](#302), [#310](#310))
+ Support for sorting rows in the CSR format by column idices ([#322](#322))
+ Addition of a CUDA COO SpMM kernel for improved performance ([#345](#345))
+ Addition of a LinOp to handle perturbations of the form (identity + scalar *
  basis * projector) ([#334](#334))
+ New sparsity matrix representation format with Reference and OpenMP
  kernels ([#349](#349), [#350](#350))

### Fixes
+ Accelerate GMRES solver for CUDA executor ([#363](#363))
+ Fix BiCGSTAB solver convergence ([#359](#359))
+ Fix CGS logging by reporting the residual for every sub iteration ([#328](#328))
+ Fix CSR,Dense->Sellp conversion's memory access violation ([#295](#295))
+ Accelerate CSR->Ell,Hybrid conversions on CUDA ([#313](#313), [#318](#318))
+ Fixed slowdown of COO SpMV on OpenMP ([#340](#340))
+ Fix gcc 6.4.0 internal compiler error ([#316](#316))
+ Fix compilation issue on Apple clang++ 10 ([#322](#322))
+ Make Ginkgo able to compile on Intel 2017 and above ([#337](#337))
+ Make the benchmarks spmv/solver use the same matrix formats ([#366](#366))
+ Fix self-written isfinite function ([#348](#348))
+ Fix Jacobi issues shown by cuda-memcheck

### Tools and ecosystem improvements
+ Multiple improvements to the CI system and tools ([#296](#296), [#311](#311), [#365](#365))
+ Multiple improvements to the Ginkgo containers ([#328](#328), [#361](#361))
+ Add sonarqube analysis to Ginkgo ([#304](#304), [#308](#308), [#309](#309))
+ Add clang-tidy and iwyu support to Ginkgo ([#298](#298))
+ Improve Ginkgo's support of xSDK M12 policy by adding the `TPL_` arguments
  to CMake ([#300](#300))
+ Add support for the xSDK R7 policy ([#325](#325))
+ Fix examples in html documentation ([#367](#367))


Related PR: #370
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. is:new-feature A request or implementation of a feature that does not exist yet. reg:benchmarking This is related to benchmarking. 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

3 participants