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

Rationalise names used for gpu things #321

Merged
merged 24 commits into from
Nov 8, 2021
Merged

Rationalise names used for gpu things #321

merged 24 commits into from
Nov 8, 2021

Conversation

richfitz
Copy link
Member

@richfitz richfitz commented Nov 5, 2021

This PR rationalises names used for gpu things:

  • most uses of device/cuda become gpu, especially when facing the user; this affects files, namespace and functions!
  • exceptions include "device_id", actual device storage (an implementation detail really) and things to do with the compilation toolchain
  • At the same time (to minimise the number of disruptive changes) the interface namespace becomes r, which will make Add simple python bindings to the dust class #271 much easier
  • New check to make sure that header guards are correct

I've tried to avoid folding any features in here, but couldn't help adding a fix for #301 because I was interacting with code that is very nearby.

Fixes #317
Fixes #304
Fixes #301
Fixes #298

@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #321 (92fc6a4) into master (c6d40d4) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 92fc6a4 differs from pull request most recent head db81b79. Consider uploading reports for the commit db81b79 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master      #321   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           57        57           
  Lines         3258      3258           
=========================================
  Hits          3258      3258           
Impacted Files Coverage Δ
R/interface.R 100.00% <ø> (ø)
inst/include/dust/gpu/cuda.hpp 100.00% <ø> (ø)
inst/include/dust/gpu/device_state.hpp 100.00% <ø> (ø)
inst/include/dust/gpu/gpu_info.hpp 100.00% <ø> (ø)
inst/include/dust/r/random.hpp 100.00% <ø> (ø)
inst/include/dust/r/utils.hpp 100.00% <ø> (ø)
inst/include/dust/random/normal.hpp 100.00% <ø> (ø)
R/compile.R 100.00% <100.00%> (ø)
R/cuda.R 100.00% <100.00%> (ø)
R/metadata.R 100.00% <100.00%> (ø)
... and 30 more

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 c6d40d4...db81b79. Read the comment docs.

@richfitz richfitz marked this pull request as ready for review November 5, 2021 15:44
@richfitz richfitz requested a review from johnlees November 5, 2021 15:44
NEWS.md Outdated Show resolved Hide resolved
real_type HOSTDEVICE binomial_inversion_calc(real_type u, int n, real_type p) {
__host__ __device__
real_type binomial_inversion_calc(real_type u, int n,
real_type p) {
Copy link
Member

Choose a reason for hiding this comment

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

has something gone wrong with the formatting here?

inst/include/dust/random/cuda_compatibility.hpp Outdated Show resolved Hide resolved
@richfitz richfitz merged commit 29b427b into master Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants