diff options
author | Iurii Zdebskyi <iuriiz@fb.com> | 2019-04-04 13:01:10 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2019-04-04 13:09:10 -0700 |
commit | b4d2df1fee35e9f2e8fb01297261e6c19d568e75 (patch) | |
tree | 3c7e3fbac153b76262787a3883c40c08191265fc /aten | |
parent | bb16e8dacb4fb62d1d1969f996e2f3387630b5db (diff) | |
download | pytorch-b4d2df1fee35e9f2e8fb01297261e6c19d568e75.tar.gz pytorch-b4d2df1fee35e9f2e8fb01297261e6c19d568e75.tar.bz2 pytorch-b4d2df1fee35e9f2e8fb01297261e6c19d568e75.zip |
Added bool and half support for resize_as_ and view methods (#18821)
Summary:
Enabled **resize_as_** and **view** methods for bool and half tensors.
tested via unit tests
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18821
Reviewed By: ezyang
Differential Revision: D14762852
Pulled By: izdeby
fbshipit-source-id: 4312079fb4e893fea6f71ff4f163094b2674f1e8
Diffstat (limited to 'aten')
-rw-r--r-- | aten/src/ATen/Declarations.cwrap | 6 | ||||
-rw-r--r-- | aten/src/ATen/native/native_functions.yaml | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/aten/src/ATen/Declarations.cwrap b/aten/src/ATen/Declarations.cwrap index a1bf2b35e9..ec3a7e2dc0 100644 --- a/aten/src/ATen/Declarations.cwrap +++ b/aten/src/ATen/Declarations.cwrap @@ -136,6 +136,9 @@ [[ name: _th_view cname: newView + cpu_half: True + cpu_bool: True + cuda_bool: True variants: - function device_guard: False @@ -148,6 +151,9 @@ [[ name: _th_resize_as_ cname: resizeAs + cpu_half: True + cpu_bool: True + cuda_bool: True variants: - function return: self diff --git a/aten/src/ATen/native/native_functions.yaml b/aten/src/ATen/native/native_functions.yaml index e0c497ac73..7d57faad59 100644 --- a/aten/src/ATen/native/native_functions.yaml +++ b/aten/src/ATen/native/native_functions.yaml @@ -2567,6 +2567,9 @@ - func: resize_as_(Tensor(a!) self, Tensor the_template) -> Tensor(a!) matches_jit_signature: True + cpu_bool: True + cuda_bool: True + cpu_half: True variants: function, method dispatch: CPU: resize_as_ @@ -3219,6 +3222,9 @@ variants: function, method - func: view(Tensor(a) self, int[] size) -> Tensor(a) + cpu_half: True + cpu_bool: True + cuda_bool: True matches_jit_signature: True variants: method device_guard: False |