mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
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:
committed by
Facebook Github Bot
parent
90ff3b56d0
commit
0a4a558c2c
@ -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.
|
||||
|
Reference in New Issue
Block a user