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) {
31
31
}
32
32
33
33
bool 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
+ }
35
38
for (size_t i = 0 ; i < node->inputs ().size (); ++i) {
36
39
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 ();
38
41
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." );
39
45
return true ;
40
46
}
41
47
}
You can’t perform that action at this time.
0 commit comments