Skip to content

Commit

Permalink
update dpnp.dot implementation (IntelPython#1669)
Browse files Browse the repository at this point in the history
* dot_func

* using mkl::dotu instead mkl::dotc for complex

* fix a test

* fix negative strides

* add a temporary workaround

* address comments

* add a TODO comment

* call dpt.vecdot for integer data types

* update doc string

* pass argument by reference

* update doc to add boolean dtype

---------

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com> ac1fca7
  • Loading branch information
github-actions[bot] committed Feb 7, 2024
1 parent 62c77c3 commit 9354103
Show file tree
Hide file tree
Showing 915 changed files with 5,768 additions and 2,953 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1f6f0d11edfb90c5f4003df029b4916c
config: dfd6a5c4917205258f274135cb589a79
tags: 645f666f9bcd5a90fca523b33c5a78b7
31 changes: 26 additions & 5 deletions _modules/dpnp/dpnp_array.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.11.1+454.ge7f7a7cb documentation</title>
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.11.1+457.gac1fca74 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=35b6cc3c"></script>
<script src="../../_static/documentation_options.js?v=b52800d2"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.11.1+454.ge7f7a7cb
0.11.1+457.gac1fca74
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -873,8 +873,29 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>

<div class="viewcode-block" id="dpnp_array.dot">
<a class="viewcode-back" href="../../reference/generated/dpnp.dpnp_array.dpnp_array.html#dpnp.dpnp_array.dpnp_array.dot">[docs]</a>
<span class="k">def</span> <span class="nf">dot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">,</span> <span class="n">out</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">return</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">,</span> <span class="n">out</span><span class="p">)</span></div>
<span class="k">def</span> <span class="nf">dot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">out</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Dot product of two arrays.</span>

<span class="sd"> For full documentation refer to :obj:`dpnp.dot`.</span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; import dpnp as np</span>
<span class="sd"> &gt;&gt;&gt; a = np.eye(2)</span>
<span class="sd"> &gt;&gt;&gt; b = np.ones((2, 2)) * 2</span>
<span class="sd"> &gt;&gt;&gt; a.dot(b)</span>
<span class="sd"> array([[2., 2.],</span>
<span class="sd"> [2., 2.]])</span>

<span class="sd"> This array method can be conveniently chained:</span>

<span class="sd"> &gt;&gt;&gt; a.dot(b).dot(b)</span>
<span class="sd"> array([[8., 8.],</span>
<span class="sd"> [8., 8.]])</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">return</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">out</span><span class="p">)</span></div>


<span class="nd">@property</span>
Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_flatiter.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.11.1+454.ge7f7a7cb documentation</title>
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.11.1+457.gac1fca74 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=35b6cc3c"></script>
<script src="../../_static/documentation_options.js?v=b52800d2"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.11.1+454.ge7f7a7cb
0.11.1+457.gac1fca74
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_iface.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.11.1+454.ge7f7a7cb documentation</title>
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.11.1+457.gac1fca74 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=35b6cc3c"></script>
<script src="../../_static/documentation_options.js?v=b52800d2"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.11.1+454.ge7f7a7cb
0.11.1+457.gac1fca74
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
Loading

0 comments on commit 9354103

Please sign in to comment.