<p dir="auto"><code class="notranslate">le</code> is a point-wise math operator so porting it from the TH code to Aten (and TensorIterator) expected to be easy. Such migration will help to clean up the code, simplify dispatch as well as provide immediate 2-3x operator performance gain.</p>
<p dir="auto">Porting guide: <a href="https://github.com/pytorch/pytorch/wiki/TH-to-ATen-porting-guide">https://github.com/pytorch/pytorch/wiki/TH-to-ATen-porting-guide</a></p>
<p dir="auto">Example PR with porting of the adaptive_avg_pool2d: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="386961306" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/14714" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/14714/hovercard" href="https://github.com/pytorch/pytorch/pull/14714">#14714</a></p>
<p dir="auto">How to use TensorIterator: <a href="https://github.com/pytorch/pytorch/wiki/How-to-use-TensorIterator">https://github.com/pytorch/pytorch/wiki/How-to-use-TensorIterator</a></p>
<p dir="auto">Porting TH operators is essential for code simplicity and performance reasons.</p>
<p dir="auto">Porting guides and Q&amp;A are available in umbrella issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="481740397" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/24507" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/24507/hovercard" href="https://github.com/pytorch/pytorch/issues/24507">#24507</a></p>
<p dir="auto">Feel free to add <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/VitalyFedyunin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/VitalyFedyunin">@VitalyFedyunin</a> as a reviewer to get a prioritized review.</p>