Dictionary Constants (#32869)

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

Differential Revision: D19909339

Pulled By: Krovatkin

fbshipit-source-id: 6fe2a9b470768f84b957c69cdf9af3a1bd9b1ca9
This commit is contained in:
Nikolay Korovaiko
2020-03-09 16:04:54 -07:00
committed by Facebook Github Bot
parent 90ff3b56d0
commit 0a4a558c2c
8 changed files with 102 additions and 20 deletions

View File

@ -796,20 +796,6 @@ struct PythonPrintImpl {
stmt << ss.str();
}
static bool elementTypeCanBeInferredFromMembers(const TypePtr& elem_type) {
if (elem_type->kind() == OptionalType::Kind) {
// it is possible that we are constructing an optional list, but all
// elements are present
return false;
}
if (elem_type->kind() == InterfaceType::Kind) {
// since classes can be members of multiple interfaces, we cannot
// construct which interface the list holds from the members alone
return false;
}
return true;
}
void printOpName(TaggedStringStream& stmt, Symbol kind) {
// Special overriding ops set that requires serializing differently to
// preserve the original code semantics.