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: rev support for trigonometric functions #2259

Merged
merged 13 commits into from
Dec 16, 2020

Conversation

rok-cesnovar
Copy link
Member

@rok-cesnovar rok-cesnovar commented Dec 15, 2020

Summary

This PR adds /rev OpenCL support for acos, acosh, asin, asinh, atan, atanh, cos, cosh, sin, sinh, tan, tanh

Tests

/

Side Effects

/

Release notes

OpenCL: added /rev support for acos, acosh, asin, asinh, atan, atanh, cos, cosh, tan, tanh

Checklist

@rok-cesnovar rok-cesnovar requested a review from t4c1 December 15, 2020 13:13
#include <gtest/gtest.h>
#include <test/unit/math/opencl/util.hpp>

auto acos_functor = [](const auto& a) { return stan::math::acos(a).eval(); };
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for eval.

Suggested change
auto acos_functor = [](const auto& a) { return stan::math::acos(a).eval(); };
auto acos_functor = [](const auto& a) { return stan::math::acos(a); };

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for other tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

t4c1
t4c1 previously approved these changes Dec 15, 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.41 3.47 0.98 -1.74% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 1.01 0.98% faster
eight_schools/eight_schools.stan 0.11 0.11 0.96 -4.68% slower
gp_regr/gp_regr.stan 0.15 0.16 0.98 -1.66% slower
irt_2pl/irt_2pl.stan 5.41 5.43 1.0 -0.46% slower
performance.compilation 89.54 88.03 1.02 1.68% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.41 8.45 1.0 -0.41% slower
pkpd/one_comp_mm_elim_abs.stan 29.39 29.82 0.99 -1.47% slower
sir/sir.stan 138.77 136.2 1.02 1.85% faster
gp_regr/gen_gp_data.stan 0.05 0.04 1.01 1.12% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.96 2.92 1.02 1.51% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.41 0.4 1.02 1.74% faster
arK/arK.stan 2.48 2.46 1.01 0.76% faster
arma/arma.stan 0.89 0.89 1.0 0.11% faster
garch/garch.stan 0.53 0.54 0.99 -1.08% slower
Mean result: 0.999123075781

Jenkins Console Log
Blue Ocean
Commit hash: 74d64ef


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 merged commit 9f1033a into develop Dec 16, 2020
@rok-cesnovar rok-cesnovar deleted the opencl_trigonometric branch December 16, 2020 21:34
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