Move cuda copy to aten (#13348)
authorRoy Li <royboy@fb.com>
Fri, 30 Nov 2018 19:10:25 +0000 (11:10 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 30 Nov 2018 19:12:55 +0000 (11:12 -0800)
commite3840419ecffec315a08e58a48bc710ca2c2e9b4
tree8f910c3f981ba2f4fbc399f3725ed6e82dc88038
parent0786dfee7c789cd591475ad82c7cf360fcb80190
Move cuda copy to aten (#13348)

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

Move cross device, cpu to device, device to cpu copies to aten. Most of it is a direct port, main difference is that we dispatch from a single _copy_ function for copies.

Reviewed By: ezyang

Differential Revision: D12850690

fbshipit-source-id: c2e3f336796b4ae38be6027d2ec131a274a6aa8c
18 files changed:
aten/src/ATen/copy_wrapper.py
aten/src/ATen/native/Copy.cpp
aten/src/ATen/native/Copy.h
aten/src/ATen/native/cuda/Copy.cu [new file with mode: 0644]
aten/src/ATen/native/native_functions.yaml
aten/src/TH/generic/THTensor.cpp
aten/src/TH/generic/THTensorEvenMoreMath.cpp
aten/src/TH/generic/THTensorLapack.cpp
aten/src/TH/generic/THTensorMath.cpp
aten/src/TH/generic/THTensorMoreMath.cpp
aten/src/THC/THCTensorCopy.cu
aten/src/THC/generic/THCStorageCopy.cpp
aten/src/THC/generic/THCStorageCopy.cu
aten/src/THC/generic/THCTensorCopy.cpp
aten/src/THC/generic/THCTensorCopy.cu
aten/src/THC/generic/THCTensorCopy.h
aten/src/THC/generic/THCTensorMasked.cu
aten/src/THCUNN/generic/SparseLinear.cu