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
Fix accesses to uninitialized memory when running sum() within an OMP… (pytorch#13274)
Summary:
```
… parallel region.
The two_pass_reduction code allocates a buffer of size at::max_threads().
When called within a parallel region, at::parallel_for only uses 1 thread
so some of this buffer is not written.
This makes two changes:
1) two_pass_reduction is not called when already in a parallel region
2) two_pass_reduction fills unwritten buffer elements with the identity
(the value in dst)
```
cc The controller you requested could not be found. SsnL: I think this should fix the NaNs in BatchNorm when calling sum() within a parallel region.
Pull Request resolved: pytorch#13274
Differential Revision: D12840034
Pulled By: colesbury
fbshipit-source-id: d32e80909a98a0f1bb1c80689fe5089b7019ef59
0 commit comments