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

bugfix arena_matrix_cl to matrix_cl conversions #2538

Merged
merged 4 commits into from
Jul 21, 2021

Conversation

t4c1
Copy link
Contributor

@t4c1 t4c1 commented Jul 16, 2021

Summary

Fixes a number of bugs related to conversions of arena_matrix_cl into matrix_cl.

Tests

Added tests for conversions and some more operations on arena_matrix_cl. Tests check that source and result of conversion have the same underlying cl::Buffer.

Side Effects

None.

Release notes

OpenCL: Fixed a number of bugs related to conversions of arena_matrix_cl into matrix_cl. Before this PR such a conversion invoked kernel generator and made a copy of data. Now only references to data are updated.

Checklist

  • Math issue #(issue number)

  • 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.11 3.1 1.01 0.62% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 1.0 0.27% faster
eight_schools/eight_schools.stan 0.11 0.13 0.87 -14.89% slower
gp_regr/gp_regr.stan 0.16 0.16 0.96 -3.68% slower
irt_2pl/irt_2pl.stan 5.9 5.93 0.99 -0.57% slower
performance.compilation 89.44 86.77 1.03 2.99% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.68 9.04 0.96 -4.18% slower
pkpd/one_comp_mm_elim_abs.stan 29.41 29.16 1.01 0.86% faster
sir/sir.stan 134.5 124.11 1.08 7.72% faster
gp_regr/gen_gp_data.stan 0.04 0.04 1.01 0.74% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 3.0 2.99 1.0 0.46% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.39 0.39 0.98 -1.61% slower
arK/arK.stan 2.53 2.54 1.0 -0.18% slower
arma/arma.stan 0.65 0.65 1.0 0.03% faster
garch/garch.stan 0.64 0.63 1.0 0.37% faster
Mean result: 0.994638708105

Jenkins Console Log
Blue Ocean
Commit hash: b8e60fd


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 7eee48c into stan-dev:develop Jul 21, 2021
@rok-cesnovar rok-cesnovar deleted the fix_arena_matrix_cl branch July 21, 2021 06:17
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