• Stanislav Pidhorskyi's avatar
    Fixed uninitialized entries in the gradient of `bary_img` for unused pixels · 3c37fcb2
    Stanislav Pidhorskyi authored
    Summary:
    For unused warps we always write zeros to `bary_img_grad`.
    However it is possible that the warp is used, but only portion of the threads are used. In this case, for unused threads we do not write zeros to `bary_img_grad`.
    
    For efficiency, `bary_img_grad` is created with `at::empty`, thus  those before mentioned entries, will still have uninitialized values.
    
    This is not an issue, because the `render` function will never read those entries, however it is possible that the uninitialized values will coincide with `nan` and it will trigger a false positive detection in auto grad anomaly detection.  Please see more details in D60904848 about the issue.
    
    Differential Revision: D60912474
    
    fbshipit-source-id: 6eda5a07789db456c17eb60de222dd4c7b1c53d2
    3c37fcb2
interpolate_kernel.cu 19.4 KB