Half type dependency problem

coincheung: <p>Hi,</p>
<p>I am trying to implement a cuda kernel as pytorch extension.</p>
<p>Part of my code is like this:</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/a/1a1ef0a0cf49581f94793835fd41083dd94b1f5a.png" data-download-href="https://discuss.pytorch.org/uploads/default/1a1ef0a0cf49581f94793835fd41083dd94b1f5a" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/a/1a1ef0a0cf49581f94793835fd41083dd94b1f5a_2_690x100.png" alt="image" data-base62-sha1="3J4HztpsnNldVobeKQFRyGi66zo" width="690" height="100" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/a/1a1ef0a0cf49581f94793835fd41083dd94b1f5a_2_690x100.png, https://discuss.pytorch.org/uploads/default/optimized/3X/1/a/1a1ef0a0cf49581f94793835fd41083dd94b1f5a_2_1035x150.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/1/a/1a1ef0a0cf49581f94793835fd41083dd94b1f5a_2_1380x200.png 2x" data-dominant-color="1F1C1E"><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">image</span><span class="informations">1506×219 39.5 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>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/8/28f57a35c346ef0ed019dea45183a5ec7b2a5086.png" data-download-href="https://discuss.pytorch.org/uploads/default/28f57a35c346ef0ed019dea45183a5ec7b2a5086" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/2/8/28f57a35c346ef0ed019dea45183a5ec7b2a5086.png" alt="image" data-base62-sha1="5Ql1XNst3y5qk3dP2sWqoLSLbKK" width="690" height="105" data-dominant-color="1E1D1E"><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">image</span><span class="informations">1052×161 10.3 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>
<p>To be specific, I want the kernel to work with double/float/fp16/bf32, and I used the function of <code>__shfl_down_sync</code> in my kernel.</p>
<p>When I compile, I got the error of:</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/4/f420c7417e67d23948575caaea9fb2fb4bc889b1.png" data-download-href="https://discuss.pytorch.org/uploads/default/f420c7417e67d23948575caaea9fb2fb4bc889b1" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/4/f420c7417e67d23948575caaea9fb2fb4bc889b1_2_690x95.png" alt="image" data-base62-sha1="yPEJgn7nVCeyICzcb6FYzQWEECZ" width="690" height="95" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/4/f420c7417e67d23948575caaea9fb2fb4bc889b1_2_690x95.png, https://discuss.pytorch.org/uploads/default/optimized/3X/f/4/f420c7417e67d23948575caaea9fb2fb4bc889b1_2_1035x142.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/f/4/f420c7417e67d23948575caaea9fb2fb4bc889b1_2_1380x190.png 2x" data-dominant-color="1B1B1B"><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">image</span><span class="informations">1891×263 37.6 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>
<p>It seems that there are two definitions of <code>__shfl_down_sync</code>, one works with <code>__half</code> and the other works with <code>float</code>.</p>
<p>Do you know how to make this work?</p>