You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is the same as <aclass="reference external" href="https://pytorch.org/docs/stable/generated/torch.Tensor.to.html#torch.Tensor.to" title="(in PyTorch v2.4)"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">x.to(device)</span></code></a>
387
+
this is the same as <aclass="reference external" href="https://pytorch.org/docs/stable/generated/torch.Tensor.to.html#torch.Tensor.to" title="(in PyTorch v2.5)"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">x.to(device)</span></code></a>
388
388
(the <codeclass="docutils literal notranslate"><spanclass="pre">stream</span></code> argument is not supported in PyTorch).</p>
389
389
<divclass="admonition seealso">
390
390
<pclass="admonition-title">See also</p>
@@ -401,7 +401,7 @@ <h2>Array Method Helpers<a class="headerlink" href="#array-method-helpers" title
401
401
<dd><p>Return the total number of elements of x.</p>
402
402
<p>This is equivalent to <codeclass="code docutils literal notranslate"><spanclass="pre">x.size</span></code> according to the <aclass="reference external" href="https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.size.html">standard</a>.
403
403
This helper is included because PyTorch defines <codeclass="code docutils literal notranslate"><spanclass="pre">size</span></code> in an
<codeclass="docutils literal notranslate"><spanclass="pre">__array_namespace__</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">to_device</span></code> methods, so the corresponding helper
312
312
functions <aclass="reference internal" href="helper-functions.html#array_api_compat.array_namespace" title="array_api_compat.array_namespace"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">array_namespace()</span></code></a> and <aclass="reference internal" href="helper-functions.html#array_api_compat.to_device" title="array_api_compat.to_device"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">to_device()</span></code></a> in this
attribute in the spec. Use the <aclass="reference internal" href="helper-functions.html#array_api_compat.size" title="array_api_compat.size"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">size()</span></code></a> helper function as a
0 commit comments