Tensor reinitialization codemod - 2/5 (#15947)
authorJerry Zhang <jerryzh@fb.com>
Fri, 11 Jan 2019 22:55:56 +0000 (14:55 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 11 Jan 2019 23:05:01 +0000 (15:05 -0800)
commiteb15587c993e7ac9e208ec6986addfb74910581a
treec10e9266cd49fb32fac74177f5d61d3b009b59ef
parent1235aa4fca55cea7c87febcc2761b84bf3114f1a
Tensor reinitialization codemod - 2/5 (#15947)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15947

Codemod generated with clangr shard mode, 25 files per diff,
To eliminiate partially initialized Tensor, we split the initialization of local Tensor variables into two steps, first declare un uninitialized Tensor, and
call `ReinitializeTensor` to initialize it.
motivation: https://github.com/pytorch/pytorch/pull/12407

Reviewed By: smessmer

Differential Revision: D13586732

fbshipit-source-id: 5295ab27ca0155f96a4fccf9c0ba8a609101ba24
13 files changed:
caffe2/image/image_input_op.h
caffe2/operators/boolean_mask_ops.cu
caffe2/operators/boolean_unmask_ops.cu
caffe2/operators/channel_backprop_stats_op.cu
caffe2/operators/channel_backprop_stats_op.h
caffe2/operators/channel_stats_op.cu
caffe2/operators/channel_stats_op.h
caffe2/operators/conv_op.h
caffe2/operators/conv_op_impl.h
caffe2/operators/conv_transpose_op.h
caffe2/operators/conv_transpose_op_impl.h
caffe2/operators/deform_conv_op.h
caffe2/operators/deform_conv_op_impl.h