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

Opencl gamma_lpdf and gumbel_lpdf #2185

Merged
merged 12 commits into from
Nov 23, 2020

Conversation

t4c1
Copy link
Contributor

@t4c1 t4c1 commented Nov 10, 2020

Summary

Adds OpenCL implementations for functions gamma_lpdf and gumbel_lpdf.

Also fixes a bug in check_cl, which in case of throwing an exception, caused it to report wrong indices of error.

Tests

New functions adre tested.

Side Effects

None.

Release notes

Added OpenCL implementations for functions gamma_lpdf and gumbel_lpdf.

Fixed a bug in check_cl, which in case of throwing an exception, caused it to report wrong indices of error.

Checklist

  • Math issue Add OpenCL distributions #2152

  • Copyright holder: Tadej Ciglarič

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
    - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
    - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • the basic tests are passing

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.02 2.99 1.01 1.08% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.96 -3.7% slower
eight_schools/eight_schools.stan 0.11 0.12 0.99 -1.15% slower
gp_regr/gp_regr.stan 0.17 0.17 1.01 0.63% faster
irt_2pl/irt_2pl.stan 5.69 5.65 1.01 0.71% faster
performance.compilation 87.61 85.31 1.03 2.63% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.46 8.51 0.99 -0.53% slower
pkpd/one_comp_mm_elim_abs.stan 29.08 28.71 1.01 1.26% faster
sir/sir.stan 130.65 141.16 0.93 -8.05% slower
gp_regr/gen_gp_data.stan 0.05 0.04 1.03 2.77% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.98 2.97 1.0 0.3% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.39 0.41 0.96 -4.7% slower
arK/arK.stan 1.79 1.77 1.01 1.47% faster
arma/arma.stan 0.6 0.61 0.99 -0.76% slower
garch/garch.stan 0.74 0.74 1.0 -0.29% slower
Mean result: 0.995224450227

Jenkins Console Log
Blue Ocean
Commit hash: db886ad


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@rok-cesnovar rok-cesnovar self-requested a review November 12, 2020 15:48
@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.68 3.57 1.03 2.93% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.97 -2.94% slower
eight_schools/eight_schools.stan 0.11 0.12 0.98 -1.97% slower
gp_regr/gp_regr.stan 0.16 0.16 1.0 -0.31% slower
irt_2pl/irt_2pl.stan 5.69 5.71 1.0 -0.37% slower
performance.compilation 86.95 85.76 1.01 1.37% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.52 8.51 1.0 0.19% faster
pkpd/one_comp_mm_elim_abs.stan 30.84 31.42 0.98 -1.9% slower
sir/sir.stan 138.42 131.03 1.06 5.34% faster
gp_regr/gen_gp_data.stan 0.05 0.04 1.07 6.65% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.96 2.95 1.01 0.59% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.38 0.38 1.0 -0.1% slower
arK/arK.stan 1.76 1.78 0.99 -0.86% slower
arma/arma.stan 0.6 0.6 1.0 0.36% faster
garch/garch.stan 0.58 0.6 0.97 -3.3% slower
Mean result: 1.004549942

Jenkins Console Log
Blue Ocean
Commit hash: 7aca964


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Copy link
Member

@rok-cesnovar rok-cesnovar 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!

@rok-cesnovar rok-cesnovar merged commit d47c331 into stan-dev:develop Nov 23, 2020
@rok-cesnovar rok-cesnovar deleted the opencl_gamma_lpdf branch November 23, 2020 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants