Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions torch/csrc/jit/runtime/static/ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,10 @@ std::function<void(ProcessedNode*)> getNativeOperation(Node* n) {
if (n->inputs().size() != 2) {
return nullptr;
}
// TODO: make __getitem__ work for other container types
if (n->input(0)->type()->castRaw<DictType>() == nullptr) {
return nullptr;
}
return [](ProcessedNode* p_node) {
auto dict = p_node->Input(0).toGenericDict();
auto key = p_node->Input(1);
Expand Down