Tensor reinitialization codemod - 4/5 (#15967)
authorJerry Zhang <jerryzh@fb.com>
Sat, 12 Jan 2019 00:38:15 +0000 (16:38 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 12 Jan 2019 00:41:19 +0000 (16:41 -0800)
commitfd0ed2e298a90253cba4a4f138860e1af6d8da02
tree22d9738e4e59999120a69ee5dda3431bb06f8fad
parent94acddb57f3408e1944a64db75447028ad15732b
Tensor reinitialization codemod - 4/5 (#15967)

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

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: D13586735

fbshipit-source-id: eae2d79e1107a2e813ce3809e690af4706aaa9ca
28 files changed:
caffe2/core/tensor.h
caffe2/operators/quantized/int8_given_tensor_fill_op.h
caffe2/operators/quantized/int8_resize_nearest_op.h
caffe2/operators/quantized/int8_roi_align_op.h
caffe2/operators/quantized/int8_slice_op.h
caffe2/operators/quantized/int8_test_utils.h
caffe2/operators/rmac_regions_op.cu
caffe2/operators/rmac_regions_op.h
caffe2/operators/segment_reduction_op_gpu.cu
caffe2/operators/slice_op.cu
caffe2/operators/slice_op.h
caffe2/operators/softmax_op.cc
caffe2/operators/softmax_op.h
caffe2/operators/softmax_ops.cu
caffe2/operators/softmax_with_loss_op.cc
caffe2/operators/softmax_with_loss_op.h
caffe2/operators/sparse_to_dense_op.h
caffe2/operators/spatial_batch_norm_op.h
caffe2/operators/spatial_softmax_with_loss_op.cc
caffe2/operators/spatial_softmax_with_loss_op.h
caffe2/operators/top_k.cu
caffe2/operators/tt_linear_op.h
caffe2/operators/unique_ops.cu
caffe2/operators/unique_ops.h
caffe2/operators/utility_ops.cu
caffe2/operators/utility_ops.h
caffe2/operators/weighted_sample_op.cu
caffe2/operators/weighted_sample_op.h