File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,17 @@ bool containNonTensorOutputs(torch::jit::Node* n) {
3131}
3232
3333bool isModifyingNodes (torch::jit::Node* node, torch::jit::Value* val) {
34- const auto & schema = node->schema ();
34+ const torch::jit::FunctionSchema* schema = node->maybeSchema ();
35+ if (!schema) {
36+ return false ;
37+ }
3538 for (size_t i = 0 ; i < node->inputs ().size (); ++i) {
3639 if (node->inputs ()[i] == val) {
37- const at::AliasInfo* formal = schema. arguments ()[i].alias_info ();
40+ const at::AliasInfo* formal = schema-> arguments ()[i].alias_info ();
3841 if (formal && formal->isWrite ()) {
42+ LOG_GRAPH (
43+ util::node_info (node) << " is a modifying node for value " << val->debugName ()
44+ << " , add it to the dependency graph." );
3945 return true ;
4046 }
4147 }
You can’t perform that action at this time.
0 commit comments