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 weibull_lpdf, neg_binomial_2_log_lpmf and neg_binomial_2_lpmf #2231

Merged
merged 6 commits into from
Dec 5, 2020

Conversation

t4c1
Copy link
Contributor

@t4c1 t4c1 commented Dec 3, 2020

Summary

Added OpenCL implementations for functions weibull_lpdf, neg_binomial_2_log_lpmf and neg_binomial_2_lpmf.

Tests

New functions are tested.

Side Effects

None.

Release notes

Added OpenCL implementations for functions weibull_lpdf, neg_binomial_2_log_lpmf and neg_binomial_2_lpmf.

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.54 3.49 1.01 1.29% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 1.01 0.88% faster
eight_schools/eight_schools.stan 0.11 0.12 0.94 -6.48% slower
gp_regr/gp_regr.stan 0.17 0.17 1.0 -0.06% slower
irt_2pl/irt_2pl.stan 5.71 5.79 0.99 -1.39% slower
performance.compilation 86.93 86.25 1.01 0.77% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.44 8.45 1.0 -0.07% slower
pkpd/one_comp_mm_elim_abs.stan 29.22 29.46 0.99 -0.83% slower
sir/sir.stan 128.46 130.43 0.98 -1.54% slower
gp_regr/gen_gp_data.stan 0.05 0.05 1.02 2.19% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.92 2.93 1.0 -0.28% slower
pkpd/sim_one_comp_mm_elim_abs.stan 0.38 0.41 0.93 -7.73% slower
arK/arK.stan 1.76 1.76 0.99 -0.53% slower
arma/arma.stan 0.74 0.73 1.01 1.28% faster
garch/garch.stan 0.63 0.61 1.02 2.16% faster
Mean result: 0.993873531318

Jenkins Console Log
Blue Ocean
Commit hash: 5e37b98


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

@t4c1 t4c1 requested a review from rok-cesnovar December 4, 2020 09:04
@t4c1 t4c1 changed the title Opencl weibull_lpdf, neg_binomial_2_log_lpmf and neg_binomial_lpmf Opencl weibull_lpdf, neg_binomial_2_log_lpmf and neg_binomial_2_lpmf Dec 4, 2020
@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.49 3.49 1.0 -0.22% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.95 -5.81% slower
eight_schools/eight_schools.stan 0.11 0.12 0.98 -1.57% slower
gp_regr/gp_regr.stan 0.16 0.16 1.0 0.24% faster
irt_2pl/irt_2pl.stan 5.77 5.81 0.99 -0.74% slower
performance.compilation 86.98 85.65 1.02 1.53% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.44 8.45 1.0 -0.07% slower
pkpd/one_comp_mm_elim_abs.stan 29.36 30.49 0.96 -3.86% slower
sir/sir.stan 127.79 131.49 0.97 -2.89% slower
gp_regr/gen_gp_data.stan 0.04 0.04 1.0 -0.14% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.94 2.92 1.01 0.59% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.38 0.38 1.01 1.45% faster
arK/arK.stan 1.77 1.79 0.99 -1.19% slower
arma/arma.stan 0.73 0.75 0.98 -2.11% slower
garch/garch.stan 0.61 0.62 0.99 -1.02% slower
Mean result: 0.98991987972

Jenkins Console Log
Blue Ocean
Commit hash: 5e37b98


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.

This looks good but needs a merge with develop (we changed the header).

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 3.53 3.55 1.0 -0.41% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.99 -0.98% slower
eight_schools/eight_schools.stan 0.11 0.12 0.97 -2.63% slower
gp_regr/gp_regr.stan 0.17 0.17 1.01 1.15% faster
irt_2pl/irt_2pl.stan 5.79 5.76 1.0 0.44% faster
performance.compilation 88.03 85.97 1.02 2.34% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.42 8.4 1.0 0.16% faster
pkpd/one_comp_mm_elim_abs.stan 29.12 30.05 0.97 -3.21% slower
sir/sir.stan 137.86 135.61 1.02 1.63% faster
gp_regr/gen_gp_data.stan 0.04 0.04 0.99 -1.06% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.92 2.94 0.99 -0.58% slower
pkpd/sim_one_comp_mm_elim_abs.stan 0.4 0.39 1.01 1.24% faster
arK/arK.stan 1.76 1.78 0.99 -1.2% slower
arma/arma.stan 0.73 0.73 1.0 0.43% faster
garch/garch.stan 0.61 0.62 0.99 -0.93% slower
Mean result: 0.997809427034

Jenkins Console Log
Blue Ocean
Commit hash: 8948a24


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.

I took the liberty to merge develop in. Looked good otherwise.

@rok-cesnovar rok-cesnovar merged commit 9be1788 into stan-dev:develop Dec 5, 2020
@rok-cesnovar rok-cesnovar deleted the opencl_weibull_lpdf branch December 5, 2020 15:38
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.

4 participants