We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95a6732 commit 7af7169Copy full SHA for 7af7169
core/partitioning/partitioning.cpp
@@ -31,10 +31,13 @@ bool containNonTensorOutputs(torch::jit::Node* n) {
31
}
32
33
bool isModifyingNodes(torch::jit::Node* node, torch::jit::Value* val) {
34
- const auto& schema = node->schema();
+ const torch::jit::FunctionSchema* schema = node->maybeSchema();
35
+ if (!schema) {
36
+ return false;
37
+ }
38
for (size_t i = 0; i < node->inputs().size(); ++i) {
39
if (node->inputs()[i] == val) {
- const at::AliasInfo* formal = schema.arguments()[i].alias_info();
40
+ const at::AliasInfo* formal = schema->arguments()[i].alias_info();
41
if (formal && formal->isWrite()) {
42
return true;
43
0 commit comments