Commit 34f6c57c authored by Pruthvi's avatar Pruthvi Committed by Scott Cyphers

add dynmic state check for node_pass to skip optimization if it contains dynamic state (#3035)

parent 7cafb313
......@@ -131,6 +131,10 @@ void pass::Manager::run_passes(shared_ptr<Function> func, bool transitive)
for (auto f_pair : fs)
{
shared_ptr<Function> f = f_pair.first;
if (node_pass->get_property(PassProperty::REQUIRE_STATIC_SHAPE) && f_pair.second)
{
continue;
}
for (shared_ptr<Node> n : f->get_ops())
{
node_pass->run_on_node(n);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment