Skip to content

Commit c4a9f0e

Browse files
tarun292facebook-github-bot
authored andcommitted
Allow complex dtypes during tensor parsing
Summary: Given that we now support ops like fft_r2c we should allow complex dtypes during tensor parsing when the program is loaded. In order to support this we need to remove an assert that prevents these dtypes from being present in the program. Differential Revision: D70268416
1 parent 5b32a80 commit c4a9f0e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

runtime/executor/tensor_parser_portable.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ Result<Tensor> parseTensor(
4343

4444
ScalarType scalar_type = static_cast<ScalarType>(s_tensor->scalar_type());
4545
ET_CHECK_OR_RETURN_ERROR(
46-
isValid(scalar_type) &&
47-
// Types that do not yet have deserialization support.
48-
scalar_type != executorch::aten::ScalarType::ComplexHalf &&
49-
scalar_type != executorch::aten::ScalarType::ComplexFloat &&
50-
scalar_type != executorch::aten::ScalarType::ComplexDouble,
46+
isValid(scalar_type),
5147
InvalidProgram,
5248
"Invalid or unsupported ScalarType %" PRId8,
5349
static_cast<int8_t>(scalar_type));

0 commit comments

Comments
 (0)