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

GPU Batch 7 #1187

Merged
merged 2 commits into from
Aug 30, 2024
Merged

GPU Batch 7 #1187

merged 2 commits into from
Aug 30, 2024

Conversation

mborland
Copy link
Member

This begins to remove earlier workarounds for NVRTC now that support is more robust. In this PR workarounds were removed from gamma so now instead of having just tgamma, and lgamma on device we have the whole gamma family including: tgamma_ratio, tgamma_delta_ratio, gamma_p_inv, gamma_p_inva, gamma_q_inv, gamma_q_inva, gamma_p_derivative, igamma, igamma_inv, igamma_inva. This additional support allows us to add GPU support to the chi squared distribution and weibull distributions. We also gain root finding support with toms748 now being device capable.

This PR is a bit uglier than other because NVRTC does not really support forward declarations. gamma.hpp used these extensively so we either call the CUDA standard library where we can, or apply the correct pre-processing to call detail functions. A little bit of recursion was eliminated at the cost of additional dispatching functions.

Completed device CI runs can be found here: cppalliance/cuda-math#18.

CC: @steppi, @dschmitz89, @izaid.

Fix igamma_large support on device

Add GPU support to toms748

Add GPU support to igamma_inv

Add GPU markers to gamma_inva

Add GPU Markers to lgamma_small

Remove STL usage from gamma

Remove NVRTC workaround

Fix fraction use of STL headers

Mark gamma functions in fwd

Disable declval on all GPU platforms

Disable more unneeded code on device

Add forward decl for NVRTC tgamma

Disable unneeded items for all GPU

Change workaround for missing overloads

Rearrange definition location

Add include path to cuda now that workaround is removed

Fix NVRTC incompatibility with recursion and forward decls

Add tgamma_ratio CUDA and NVRTC testing

Fix NVRTC handling of gamma_p_derivative

Add gamma_p_derivative CUDA and NVRTC testing

Remove recursion from gamma_incomplete_imp

Add SYCL testing of igamma, igamma_inv, and igamma_inva

Ignore literal-range warnings

Remove use of static const char* for function name

Fix missing CUDA header

Remove calls under NVRTC to fwd decl

Add more nvrtc workarounds

Use builtin erfc instead of header cycle

Add CUDA and NVRTC testing of gamma_p_inv

Adjust tolerances

Add GPU support to chi squared dist

Fix static local variable

Add chi squared dist SYCL testing

Add chi squared dist CUDA testing

Add chi squared dist NVRTC testing

Add GPU support to weibull dist

Add weibull dist SYCL testing

Add weibull dist CUDA testing

Add weibull dist NVRTC testing
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 95.54455% with 9 lines in your changes missing coverage. Please review.

Project coverage is 94.06%. Comparing base (66b362a) to head (9ed738f).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
include/boost/math/special_functions/gamma.hpp 90.62% 6 Missing ⚠️
include/boost/math/tools/toms748_solve.hpp 89.65% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1187      +/-   ##
===========================================
- Coverage    94.08%   94.06%   -0.02%     
===========================================
  Files          780      780              
  Lines        65815    65848      +33     
===========================================
+ Hits         61922    61941      +19     
- Misses        3893     3907      +14     
Files with missing lines Coverage Δ
include/boost/math/distributions/chi_squared.hpp 90.82% <100.00%> (+0.62%) ⬆️
include/boost/math/distributions/weibull.hpp 85.36% <100.00%> (+1.07%) ⬆️
include/boost/math/special_functions/beta.hpp 100.00% <ø> (ø)
...boost/math/special_functions/detail/gamma_inva.hpp 90.90% <100.00%> (ø)
...t/math/special_functions/detail/igamma_inverse.hpp 96.77% <100.00%> (+0.03%) ⬆️
...ost/math/special_functions/detail/igamma_large.hpp 33.11% <100.00%> (ø)
...ost/math/special_functions/detail/lgamma_small.hpp 59.90% <100.00%> (ø)
include/boost/math/special_functions/log1p.hpp 80.59% <100.00%> (ø)
include/boost/math/tools/fraction.hpp 91.04% <100.00%> (ø)
include/boost/math/tools/precision.hpp 100.00% <100.00%> (ø)
... and 18 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66b362a...9ed738f. Read the comment docs.

@mborland mborland merged commit 0002de0 into develop Aug 30, 2024
78 of 79 checks passed
@mborland mborland deleted the GPU_Batch_7 branch August 30, 2024 16:23
@mborland mborland mentioned this pull request Aug 30, 2024
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.

1 participant