Can I use TensorIterator when I writing pytorch C++/CUDA extension?

username: zhryang
cooked: <p>I find there are many TensorIterator ops in pytorch source code. But I can not use TensorIterator when I writing C++/CUDA extension? I think TensorIterator is very important. Without TensorIterator, the program will have unpredictable bugs. How do I solve this problem?</p>

username: ptrblck
cooked: <p>Have a look at <a href="https://github.com/pytorch/pytorch/wiki/How-to-use-TensorIterator">this doc</a> to for an example.</p>

username: zhryang
cooked: <p>When I writing C++/CUDA extension, I can not find this head file</p>
<pre><code class="lang-auto">#include &lt;ATen/native/Lerp.h&gt;
#include &lt;ATen/native/TensorIterator.h&gt;
#include &lt;ATen/native/cpu/Loops.h&gt;
</code></pre>

username: ptrblck
cooked: <p>You wouldn’t need <code>Lerp</code> for your extension, would you?<br>
Are you able to fine the other headers?</p>

username: zhryang
cooked: <p>Unfortunately, I can not find the other headers. I install pytorch using pip3. I only find this files.<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/a/2ab9e7d3c2b7faafd19854558b570716d38354aa.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/2ab9e7d3c2b7faafd19854558b570716d38354aa" title="0"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2ab9e7d3c2b7faafd19854558b570716d38354aa_2_690x45.jpeg" alt="0" data-base62-sha1="65YlZ8Z9h5zklOVI0bIOhfmicX0" width="690" height="45" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2ab9e7d3c2b7faafd19854558b570716d38354aa_2_690x45.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2ab9e7d3c2b7faafd19854558b570716d38354aa_2_1035x67.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2ab9e7d3c2b7faafd19854558b570716d38354aa_2_1380x90.jpeg 2x" data-dominant-color="0F0F10"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">0</span><span class="informations">1904×125 53.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
At same time, I can not find this header file in libtorch. I can only find this files as follows<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/f/ff2fb52e7d79c7a9cc780e8b698d397492903927.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/ff2fb52e7d79c7a9cc780e8b698d397492903927" title="1"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/f/ff2fb52e7d79c7a9cc780e8b698d397492903927_2_690x89.jpeg" alt="1" data-base62-sha1="AptY2fxcrOC3pSQUhsTp8xCzVYj" width="690" height="89" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/f/ff2fb52e7d79c7a9cc780e8b698d397492903927_2_690x89.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/f/f/ff2fb52e7d79c7a9cc780e8b698d397492903927_2_1035x133.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/f/f/ff2fb52e7d79c7a9cc780e8b698d397492903927_2_1380x178.jpeg 2x" data-dominant-color="09090A"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">1</span><span class="informations">1894×247 68.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>