Skip to content

Commit 1f09f7e

Browse files
anjali411facebook-github-bot
authored andcommittedMay 1, 2020
Python API for Complex Storage and storage copy logic (pytorch#35771)
Summary: Following up on this: pytorch#35851 cross dtype storage copy is not being used internally, so I have not included cross dtype copy for complex. Pull Request resolved: pytorch#35771 Differential Revision: D21319650 Pulled By: anjali411 fbshipit-source-id: 07c72996ee598eba0cf401ad61534494d6f5b5b3
1 parent deb4100 commit 1f09f7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+723
-241
lines changed
 

‎aten/src/ATen/DLConvertor.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ DLDataType getDLDataType(const Tensor& t) {
5353
break;
5454
case ScalarType::ComplexHalf:
5555
throw std::logic_error("ComplexHalf is not supported by dlpack");
56+
break;
5657
case ScalarType::ComplexFloat:
5758
throw std::logic_error("ComplexFloat is not supported by dlpack");
59+
break;
5860
case ScalarType::ComplexDouble:
5961
throw std::logic_error("ComplexDouble is not supported by dlpack");
62+
break;
6063
case ScalarType::Undefined:
6164
throw std::logic_error("Undefined is not a valid ScalarType");
6265
case ScalarType::NumOptions:

‎aten/src/ATen/function_wrapper.py

+2
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ def TypedDict(name, attrs, total=True): # type: ignore
240240
('Short', 'int16_t', 'Long', False),
241241
('Half', 'Half', 'Double', True),
242242
('BFloat16', 'BFloat16', 'BFloat16AccrealNotDefined', True),
243+
('ComplexFloat', 'ComplexFloat', 'ComplexDouble', False),
244+
('ComplexDouble', 'ComplexDouble', 'ComplexDouble', False),
243245
]
244246

245247
static_dispatch_backends = ['CPU', 'QuantizedCPU']

0 commit comments

Comments
 (0)
Please sign in to comment.