Skip to content

fix: fix the "schema not found for node" error #1236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 15, 2022
Merged
Changes from 3 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
8 changes: 6 additions & 2 deletions core/partitioning/partitioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ bool containNonTensorOutputs(torch::jit::Node* n) {
}

bool isModifyingNodes(torch::jit::Node* node, torch::jit::Value* val) {
const auto& schema = node->schema();
const torch::jit::FunctionSchema* schema = node->maybeSchema();
if (!schema) {
return false;
}
for (size_t i = 0; i < node->inputs().size(); ++i) {
if (node->inputs()[i] == val) {
const at::AliasInfo* formal = schema.arguments()[i].alias_info();
const at::AliasInfo* formal = schema->arguments()[i].alias_info();
if (formal && formal->isWrite()) {
LOG_GRAPH("<Whatever is doing the modifying> Is modifying node " << util::node_info(node));
Copy link
Collaborator

@narendasan narendasan Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄 I didn't mean put "<Whatever is doing the modifying>" verbatim, just what ever component is running this. not sure if its part of shape analysis or some other phase of partitioning

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol. Ok let me change it.

return true;
}
}
Expand Down