File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,13 @@ bool containNonTensorOutputs(torch::jit::Node* n) {
40
40
}
41
41
42
42
bool isModifyingNodes (torch::jit::Node* node, torch::jit::Value* val) {
43
- const auto & schema = node->schema ();
43
+ const torch::jit::FunctionSchema* schema = node->maybeSchema ();
44
+ if (!schema) {
45
+ return false ;
46
+ }
44
47
for (size_t i = 0 ; i < node->inputs ().size (); ++i) {
45
48
if (node->inputs ()[i] == val) {
46
- const at::AliasInfo* formal = schema. arguments ()[i].alias_info ();
49
+ const at::AliasInfo* formal = schema-> arguments ()[i].alias_info ();
47
50
if (formal && formal->isWrite ()) {
48
51
return true ;
49
52
}
@@ -124,7 +127,8 @@ void find_all_fallback_nodes(
124
127
if (!isTensor (output)) {
125
128
for (auto use : output->uses ()) {
126
129
auto node = use.user ;
127
- if (node->kind () != torch::jit::prim::Constant && global_fallback_nodes.insert ({node, FallbackNodeType::kNON_TENSOR }).second ) {
130
+ if (node->kind () != torch::jit::prim::Constant &&
131
+ global_fallback_nodes.insert ({node, FallbackNodeType::kNON_TENSOR }).second ) {
128
132
q.push (node);
129
133
}
130
134
}
You can’t perform that action at this time.
0 commit comments