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 12 Testing #26

Merged
merged 44 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a7c9b69
Add GPU support to airy functions
mborland Sep 12, 2024
4ac616f
Add SYCL testing of ariy functions
mborland Sep 12, 2024
6772f17
Add CUDA testing of airy functions
mborland Sep 12, 2024
1ad8cab
Add NVRTC testing of airy functions
mborland Sep 12, 2024
d447834
Add GPU support to ellint rc
mborland Sep 12, 2024
2502444
Add GPU support to ellint rd
mborland Sep 12, 2024
93c70bc
Add GPU support to ellint rf
mborland Sep 12, 2024
2a99ab9
Add GPU support to ellint rg
mborland Sep 12, 2024
1b8aedf
Add GPU support to ellint rj
mborland Sep 12, 2024
456644c
Add GPU support to ellint d
mborland Sep 12, 2024
e771827
Add GPU support to ellint_1
mborland Sep 12, 2024
e1fd153
Markup forward and add ellint_3 return type def for NVRTC platform
mborland Sep 12, 2024
e5b3f70
Add CUDA testing of ellint 1
mborland Sep 12, 2024
d9144de
NVRTC fixes
mborland Sep 12, 2024
012074e
Add NVRTC testing of ellint_1
mborland Sep 12, 2024
153831e
Add GPU support to ellint_2
mborland Sep 12, 2024
d74ba4a
Add CUDA testing of ellint_2
mborland Sep 12, 2024
118df51
Fix NVRTC errors
mborland Sep 12, 2024
660974e
Add NVRTC testing of ellint_2
mborland Sep 12, 2024
692c5aa
Add GPU support to atanh
mborland Sep 12, 2024
1d68318
Add GPU support to ellint_3
mborland Sep 12, 2024
a704f03
Add NVRTC testing of ellint_3
mborland Sep 12, 2024
c46b3f2
Add CUDA testing of ellint_3
mborland Sep 12, 2024
7ed0379
Replace use of static const char*
mborland Sep 16, 2024
3304a9c
Add SYCL testing of ellint_1
mborland Sep 16, 2024
a323d5a
Add SYCL testing of ellint 2 with slight tolerance bump
mborland Sep 16, 2024
bd2318f
Remove recursion from ellint_rj
mborland Sep 16, 2024
60b750d
Add ellint_d CUDA testing
mborland Sep 16, 2024
51a4f4f
Add NVRTC testing of ellint_d
mborland Sep 16, 2024
afbb3cb
Add SYCL testing of ellint_d
mborland Sep 16, 2024
094193a
Remove SYCL ellint_3 support
mborland Sep 16, 2024
147a0c3
Update docs
mborland Sep 16, 2024
155e186
Add GPU support to jacobi zeta
mborland Sep 16, 2024
58a79f5
Add CUDA testing of jacobi zeta
mborland Sep 16, 2024
6400e44
Add NVRTC testing of jacobi zeta
mborland Sep 16, 2024
3e96d7e
Add SYCL testing of jacobi zeta
mborland Sep 16, 2024
d57d65e
Add GPU support to heuman_lambda
mborland Sep 16, 2024
8e5f338
Add NVRTC testing of heuman lambda
mborland Sep 16, 2024
4a449e3
Add CUDA testing of heuman_lambda
mborland Sep 16, 2024
6f7ccf7
Add SYCL testing of heuman lambda
mborland Sep 16, 2024
03f6f82
Add markers to docs
mborland Sep 16, 2024
b7baa62
Add marker for CUDA only functions in the docs
mborland Sep 16, 2024
26a404b
Fix windows cases of overflow error
mborland Sep 16, 2024
20bd10d
Fix CUDA only macro for NVRTC
mborland Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/overview/gpu.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
[h4 GPU Support]

Selected functions, distributions, tools, etc. support running on both host and devices.
These functions will have the annotation `BOOST_MATH_GPU_ENABLED` next to their individual documentation.
We test using CUDA (both NVCC and NVRTC) as well as SYCL to provide a wide range of support.
These functions will have the annotation `BOOST_MATH_GPU_ENABLED` or `BOOST_MATH_CUDA_ENABLED` next to their individual documentation.
Functions marked with `BOOST_MATH_GPU_ENABLED` are tested using CUDA (both NVCC and NVRTC) as well as SYCL to provide a wide range of support.
Functions marked with `BOOST_MATH_CUDA_ENABLED` are few, but due to its restrictions SYCL is unsupported.

[h4 Policies]

Expand Down
40 changes: 20 additions & 20 deletions doc/sf/ellint_carlson.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {

template <class T1, class T2, class T3>
``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)

}} // namespaces

Expand All @@ -32,10 +32,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {

template <class T1, class T2, class T3>
``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)

}} // namespaces

Expand All @@ -47,10 +47,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {

template <class T1, class T2, class T3, class T4>
``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)

template <class T1, class T2, class T3, class T4, class ``__Policy``>
``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)

}} // namespaces

Expand All @@ -62,10 +62,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {

template <class T1, class T2>
``__sf_result`` ellint_rc(T1 x, T2 y)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y)

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)

}} // namespaces

Expand All @@ -76,10 +76,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {

template <class T1, class T2, class T3>
``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)

}} // namespaces

Expand All @@ -98,10 +98,10 @@ when the arguments are of different types: otherwise the return is the same type
as the arguments.

template <class T1, class T2, class T3>
``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)

Returns Carlson's Elliptic Integral ['R[sub F]]:

Expand All @@ -113,10 +113,10 @@ one may be zero. Otherwise returns the result of __domain_error.
[optional_policy]

template <class T1, class T2, class T3>
``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)

Returns Carlson's elliptic integral R[sub D]:

Expand All @@ -128,10 +128,10 @@ zero, and that z >= 0. Otherwise returns the result of __domain_error.
[optional_policy]

template <class T1, class T2, class T3, class T4>
``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)

template <class T1, class T2, class T3, class T4, class ``__Policy``>
``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)

Returns Carlson's elliptic integral R[sub J]:

Expand All @@ -149,10 +149,10 @@ using the relation:
[equation ellint17]

template <class T1, class T2>
``__sf_result`` ellint_rc(T1 x, T2 y)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y)

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)

Returns Carlson's elliptic integral R[sub C]:

Expand All @@ -170,10 +170,10 @@ using the relation:
[equation ellint18]

template <class T1, class T2, class T3>
``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)

Returns Carlson's elliptic integral ['R[sub G]:]

Expand Down
72 changes: 36 additions & 36 deletions doc/sf/ellint_legendre.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {

template <class T1, class T2>
``__sf_result`` ellint_1(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);

template <class T>
``__sf_result`` ellint_1(T k);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k);

template <class T, class ``__Policy``>
``__sf_result`` ellint_1(T k, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k, const ``__Policy``&);

}} // namespaces

Expand All @@ -42,10 +42,10 @@ when T1 and T2 are different types: when they are the same type then the result
is the same type as the arguments.

template <class T1, class T2>
``__sf_result`` ellint_1(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);

Returns the incomplete elliptic integral of the first kind ['F([phi], k)]:

Expand All @@ -56,10 +56,10 @@ Requires k[super 2]sin[super 2](phi) < 1, otherwise returns the result of __doma
[optional_policy]

template <class T>
``__sf_result`` ellint_1(T k);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k);

template <class T>
``__sf_result`` ellint_1(T k, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k, const ``__Policy``&);

Returns the complete elliptic integral of the first kind ['K(k)]:

Expand Down Expand Up @@ -123,16 +123,16 @@ and
namespace boost { namespace math {

template <class T1, class T2>
``__sf_result`` ellint_2(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);

template <class T>
``__sf_result`` ellint_2(T k);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k);

template <class T, class ``__Policy``>
``__sf_result`` ellint_2(T k, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k, const ``__Policy``&);

}} // namespaces

Expand All @@ -148,10 +148,10 @@ when T1 and T2 are different types: when they are the same type then the result
is the same type as the arguments.

template <class T1, class T2>
``__sf_result`` ellint_2(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);

Returns the incomplete elliptic integral of the second kind ['E([phi], k)]:

Expand All @@ -162,10 +162,10 @@ Requires k[super 2]sin[super 2](phi) < 1, otherwise returns the result of __doma
[optional_policy]

template <class T>
``__sf_result`` ellint_2(T k);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k);

template <class T>
``__sf_result`` ellint_2(T k, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k, const ``__Policy``&);

Returns the complete elliptic integral of the second kind ['E(k)]:

Expand Down Expand Up @@ -230,16 +230,16 @@ and
namespace boost { namespace math {

template <class T1, class T2, class T3>
``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);

template <class T1, class T2>
``__sf_result`` ellint_3(T1 k, T2 n);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);

}} // namespaces

Expand All @@ -255,10 +255,10 @@ when the arguments are of different types: when they are the same type then the
is the same type as the arguments.

template <class T1, class T2, class T3>
``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);

template <class T1, class T2, class T3, class ``__Policy``>
``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);

Returns the incomplete elliptic integral of the third kind ['[Pi](n, [phi], k)]:

Expand All @@ -271,10 +271,10 @@ would be complex).
[optional_policy]

template <class T1, class T2>
``__sf_result`` ellint_3(T1 k, T2 n);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);
BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);

Returns the complete elliptic integral of the first kind ['[Pi](n, k)]:

Expand Down Expand Up @@ -355,16 +355,16 @@ and
namespace boost { namespace math {

template <class T1, class T2>
``__sf_result`` ellint_d(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_d(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, T2 phi, const ``__Policy``&);

template <class T1>
``__sf_result`` ellint_d(T1 k);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k);

template <class T1, class ``__Policy``>
``__sf_result`` ellint_d(T1 k, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, const ``__Policy``&);

}} // namespaces

Expand All @@ -378,10 +378,10 @@ when the arguments are of different types: when they are the same type then the
is the same type as the arguments.

template <class T1, class T2>
``__sf_result`` ellint_d(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` ellint_3(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_3(T1 k, T2 phi, const ``__Policy``&);

Returns the incomplete elliptic integral:

Expand All @@ -394,10 +394,10 @@ would be complex).
[optional_policy]

template <class T1>
``__sf_result`` ellint_d(T1 k);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k);

template <class T1, class ``__Policy``>
``__sf_result`` ellint_d(T1 k, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, const ``__Policy``&);

Returns the complete elliptic integral ['D(k) = D([pi]/2, k)]

Expand Down Expand Up @@ -463,10 +463,10 @@ using the relation:
namespace boost { namespace math {

template <class T1, class T2>
``__sf_result`` jacobi_zeta(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` jacobi_zeta(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` jacobi_zeta(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` jacobi_zeta(T1 k, T2 phi, const ``__Policy``&);

}} // namespaces

Expand Down Expand Up @@ -543,10 +543,10 @@ is [@../../example/jacobi_zeta_example.cpp jacobi_zeta_example.cpp].
namespace boost { namespace math {

template <class T1, class T2>
``__sf_result`` heuman_lambda(T1 k, T2 phi);
BOOST_MATH_GPU_ENABLED ``__sf_result`` heuman_lambda(T1 k, T2 phi);

template <class T1, class T2, class ``__Policy``>
``__sf_result`` heuman_lambda(T1 k, T2 phi, const ``__Policy``&);
BOOST_MATH_GPU_ENABLED ``__sf_result`` heuman_lambda(T1 k, T2 phi, const ``__Policy``&);

}} // namespaces

Expand Down
Loading