Skip to content

Commit 7609877

Browse files
Add missing stream keyword argument to dpnp.ndarray.to_device method f8b5d3d
1 parent 0d31b75 commit 7609877

File tree

695 files changed

+1761
-1530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

695 files changed

+1761
-1530
lines changed

pull/2263/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 736c5a25b7bec090e80b28fab2c15734
3+
config: ff0a2a28ffe128347bbaac2ae5813e09
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

pull/2263/_modules/dpnp/dpnp_array.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -1904,7 +1904,7 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
19041904
<span class="sd"> corresponding to a non-partitioned SYCL device, an instance of</span>
19051905
<span class="sd"> :class:`dpctl.SyclQueue`, or a :class:`dpctl.tensor.Device` object</span>
19061906
<span class="sd"> returned by :obj:`dpnp.dpnp_array.dpnp_array.device` property.</span>
1907-
<span class="sd"> stream : SyclQueue, optional</span>
1907+
<span class="sd"> stream : {SyclQueue, None}, optional</span>
19081908
<span class="sd"> Execution queue to synchronize with. If ``None``, synchronization</span>
19091909
<span class="sd"> is not performed.</span>
19101910
<span class="sd"> Default: ``None``.</span>

pull/2263/_modules/dpnp/dpnp_flatiter.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

pull/2263/_modules/dpnp/dpnp_iface.html

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -153,6 +153,7 @@ <h1>Source code for dpnp.dpnp_iface</h1><div class="highlight"><pre>
153153
<span class="s2">&quot;get_result_array&quot;</span><span class="p">,</span>
154154
<span class="s2">&quot;get_usm_ndarray&quot;</span><span class="p">,</span>
155155
<span class="s2">&quot;get_usm_ndarray_or_scalar&quot;</span><span class="p">,</span>
156+
<span class="s2">&quot;is_cuda_backend&quot;</span><span class="p">,</span>
156157
<span class="s2">&quot;is_supported_array_or_scalar&quot;</span><span class="p">,</span>
157158
<span class="s2">&quot;is_supported_array_type&quot;</span><span class="p">,</span>
158159
<span class="s2">&quot;synchronize_array_data&quot;</span><span class="p">,</span>
@@ -775,6 +776,41 @@ <h1>Source code for dpnp.dpnp_iface</h1><div class="highlight"><pre>
775776
<span class="k">return</span> <span class="n">a</span> <span class="k">if</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">isscalar</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> <span class="k">else</span> <span class="n">get_usm_ndarray</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
776777

777778

779+
<span class="k">def</span><span class="w"> </span><span class="nf">is_cuda_backend</span><span class="p">(</span><span class="n">obj</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
780+
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
781+
<span class="sd"> Checks that object has a CUDA backend.</span>
782+
783+
<span class="sd"> Parameters</span>
784+
<span class="sd"> ----------</span>
785+
<span class="sd"> obj : {Device, SyclDevice, SyclQueue, dpnp.ndarray, usm_ndarray, None},</span>
786+
<span class="sd"> optional</span>
787+
<span class="sd"> An input object with sycl_device property to check device backend.</span>
788+
<span class="sd"> If `obj` is ``None``, device backend will be checked for the default</span>
789+
<span class="sd"> queue.</span>
790+
<span class="sd"> Default: ``None``.</span>
791+
792+
<span class="sd"> Returns</span>
793+
<span class="sd"> -------</span>
794+
<span class="sd"> out : bool</span>
795+
<span class="sd"> Return ``True`` if data of the input object resides on a CUDA backend,</span>
796+
<span class="sd"> otherwise ``False``.</span>
797+
798+
<span class="sd"> &quot;&quot;&quot;</span>
799+
800+
<span class="k">if</span> <span class="n">obj</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
801+
<span class="n">sycl_device</span> <span class="o">=</span> <span class="n">dpctl</span><span class="o">.</span><span class="n">select_default_device</span><span class="p">()</span>
802+
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">dpctl</span><span class="o">.</span><span class="n">SyclDevice</span><span class="p">):</span>
803+
<span class="n">sycl_device</span> <span class="o">=</span> <span class="n">obj</span>
804+
<span class="k">else</span><span class="p">:</span>
805+
<span class="n">sycl_device</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="s2">&quot;sycl_device&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
806+
<span class="k">if</span> <span class="p">(</span>
807+
<span class="n">sycl_device</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
808+
<span class="ow">and</span> <span class="n">sycl_device</span><span class="o">.</span><span class="n">backend</span> <span class="o">==</span> <span class="n">dpctl</span><span class="o">.</span><span class="n">backend_type</span><span class="o">.</span><span class="n">cuda</span>
809+
<span class="p">):</span>
810+
<span class="k">return</span> <span class="kc">True</span>
811+
<span class="k">return</span> <span class="kc">False</span>
812+
813+
778814
<span class="k">def</span><span class="w"> </span><span class="nf">is_supported_array_or_scalar</span><span class="p">(</span><span class="n">a</span><span class="p">):</span>
779815
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
780816
<span class="sd"> Return ``True`` if `a` is a scalar or an array of either</span>

pull/2263/_modules/dpnp/dpnp_iface_arraycreation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

pull/2263/_modules/dpnp/dpnp_iface_bitwise.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

pull/2263/_modules/dpnp/dpnp_iface_counting.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

pull/2263/_modules/dpnp/dpnp_iface_functional.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_functional &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_functional &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

pull/2263/_modules/dpnp/dpnp_iface_histograms.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

pull/2263/_modules/dpnp/dpnp_iface_indexing.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_indexing &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_indexing &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -215,6 +215,7 @@ <h1>Source code for dpnp.dpnp_iface_indexing</h1><div class="highlight"><pre>
215215
<span class="sd"> :obj:`dpnp.take_along_axis` : Preferable if choices is an array.</span>
216216

217217
<span class="sd"> &quot;&quot;&quot;</span>
218+
218219
<span class="n">x1_desc</span> <span class="o">=</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">get_dpnp_descriptor</span><span class="p">(</span><span class="n">x1</span><span class="p">,</span> <span class="n">copy_when_nondefault_queue</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
219220

220221
<span class="n">choices_list</span> <span class="o">=</span> <span class="p">[]</span>
@@ -224,6 +225,11 @@ <h1>Source code for dpnp.dpnp_iface_indexing</h1><div class="highlight"><pre>
224225
<span class="p">)</span>
225226

226227
<span class="k">if</span> <span class="n">x1_desc</span><span class="p">:</span>
228+
<span class="k">if</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">is_cuda_backend</span><span class="p">(</span><span class="n">x1_desc</span><span class="o">.</span><span class="n">get_array</span><span class="p">()):</span>
229+
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span>
230+
<span class="s2">&quot;Running on CUDA is currently not supported&quot;</span>
231+
<span class="p">)</span>
232+
227233
<span class="k">if</span> <span class="nb">any</span><span class="p">(</span><span class="ow">not</span> <span class="n">desc</span> <span class="k">for</span> <span class="n">desc</span> <span class="ow">in</span> <span class="n">choices_list</span><span class="p">):</span>
228234
<span class="k">pass</span>
229235
<span class="k">elif</span> <span class="n">out</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>

pull/2263/_modules/dpnp/dpnp_iface_libmath.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_libmath &mdash; Data Parallel Extension for NumPy 0.17.0dev4+7.g1dc89488da4 documentation</title>
17+
<title>dpnp.dpnp_iface_libmath &mdash; Data Parallel Extension for NumPy 0.17.0dev4+12.gf8b5d3d2aa9 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=80cc296b"></script>
24+
<script src="../../_static/documentation_options.js?v=b1c284c5"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -169,6 +169,10 @@ <h1>Source code for dpnp.dpnp_iface_libmath</h1><div class="highlight"><pre>
169169
<span class="n">in_array1</span><span class="p">,</span> <span class="n">copy_when_strides</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">copy_when_nondefault_queue</span><span class="o">=</span><span class="kc">False</span>
170170
<span class="p">)</span>
171171
<span class="k">if</span> <span class="n">x1_desc</span><span class="p">:</span>
172+
<span class="k">if</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">is_cuda_backend</span><span class="p">(</span><span class="n">x1_desc</span><span class="o">.</span><span class="n">get_array</span><span class="p">()):</span>
173+
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span>
174+
<span class="s2">&quot;Running on CUDA is currently not supported&quot;</span>
175+
<span class="p">)</span>
172176
<span class="k">return</span> <span class="n">dpnp_erf</span><span class="p">(</span><span class="n">x1_desc</span><span class="p">)</span><span class="o">.</span><span class="n">get_pyobj</span><span class="p">()</span>
173177

174178
<span class="n">result</span> <span class="o">=</span> <span class="n">create_output_descriptor_py</span><span class="p">(</span>

0 commit comments

Comments
 (0)