ANSHUMAN87 commented on a change in pull request #5717: URL: https://github.com/apache/incubator-tvm/pull/5717#discussion_r436801796
########## File path: src/relay/backend/compile_engine.cc ########## @@ -689,7 +689,7 @@ class CompileEngineImpl : public CompileEngineNode { cache_node->funcs = (*f)(cfunc->schedule, all_args, cache_node->func_name, key->source_func); } else { using tvm::transform::PassContext; - With<PassContext> fresh_pass_ctx_scope(PassContext::Create()); + With<PassContext> fresh_pass_ctx_scope(static_cast<PassContext>(PassContext())); Review comment: @tqchen : Sorry for late reply! If i dont use static_cast [the testcase fails with additional assert](https://github.com/apache/incubator-tvm/blob/6ae439c8c58dd0118d2f2c5d1c4bcb650df47104/tests/python/relay/test_pass_manager.py#L555) count. ########## File path: src/relay/backend/compile_engine.cc ########## @@ -689,7 +689,7 @@ class CompileEngineImpl : public CompileEngineNode { cache_node->funcs = (*f)(cfunc->schedule, all_args, cache_node->func_name, key->source_func); } else { using tvm::transform::PassContext; - With<PassContext> fresh_pass_ctx_scope(PassContext::Create()); + With<PassContext> fresh_pass_ctx_scope(static_cast<PassContext>(PassContext())); Review comment: @tqchen : I have changed it to default constructor now, please check. Thanks! ########## File path: src/relay/backend/compile_engine.cc ########## @@ -689,7 +689,7 @@ class CompileEngineImpl : public CompileEngineNode { cache_node->funcs = (*f)(cfunc->schedule, all_args, cache_node->func_name, key->source_func); } else { using tvm::transform::PassContext; - With<PassContext> fresh_pass_ctx_scope(PassContext::Create()); + With<PassContext> fresh_pass_ctx_scope(static_cast<PassContext>(PassContext())); Review comment: > @tqchen : I have changed it to default constructor now, please check. Thanks! @tqchen : Sorry! This change does not work. I made a mistake in code build, cause of that it got passed last time! So i have to use static_cast for the test case to pass. ########## File path: src/relay/backend/compile_engine.cc ########## @@ -689,7 +689,7 @@ class CompileEngineImpl : public CompileEngineNode { cache_node->funcs = (*f)(cfunc->schedule, all_args, cache_node->func_name, key->source_func); } else { using tvm::transform::PassContext; - With<PassContext> fresh_pass_ctx_scope(PassContext::Create()); + With<PassContext> fresh_pass_ctx_scope(static_cast<PassContext>(PassContext())); Review comment: @tqchen : Any thoughts on this comment? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org