Please sign in to comment.
add TouchInst for buffers that don't need to be initialized (#4000)
Summary: Per #3903 when IRGening ConcatNode we insert a `SplatInst` so the output buffer is initialized. In that case since we overwrite the entire buffer we don't need that splat and it's wasted work. This PR solves the problem by doing nothing, or rather by adding a new instruction `TouchInst` which does nothing except mark its output as initialized. I've only updated the case of Concat, but there may be other situations we use `splat` as an initializer for memory that is overwritten. Documentation: N/A Pull Request resolved: #4000 Test Plan: Ran tests in debug and release. This code is covered by the Concat operator tests for backends that use IR - Interpreter, CPU and OpenCL (Habana and NNPI use Nodes instead). Fixes #3903. Differential Revision: D19376756 Pulled By: nickgg fbshipit-source-id: 2eccc64f3501090c5919b8162502586877eaf716
- Loading branch information
Showing with 17 additions and 2 deletions.