pytorch
997f05cd - [nnc] Add an initialization expression to Reduce() (#53751)

Commit
4 years ago
[nnc] Add an initialization expression to Reduce() (#53751) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/53751 Sometimes the initial value of a reduction expression needs to be computed with reference to the loop axes; for example, adding bias can be efficiently represented by initializing the accumulator from the bias tensor: ``` C[n, c, h, w] = bias[c] for (...) C[n, c, h, w] += ... ``` ghstack-source-id: 123592861 Test Plan: `buck test //caffe2/test/cpp/tensorexpr -- Reductions.InitFunction` Reviewed By: navahgar Differential Revision: D26940321 fbshipit-source-id: 8a08e19e5d0b9ad453a07fab8b61e75dcd3d626b
Author
Parents
Loading