未验证 提交 6d4ae007 编写于 作者: R Ruibiao Chen 提交者: GitHub

Fix random op dependency and lr_shedule bugs for standalone executor (#45265)

* Fix random op depenency and lr_shedule bugs for standalone executor

* Fix CI errors

* Fix CI errors

* Fix CI errors
上级 68c01ac2
......@@ -273,8 +273,7 @@ void DependencyBuilder::AddDependencyForCommunicationOp() {
// make sure that the random op is scheduled sequentially
void DependencyBuilder::AddDependencyForRandomOp() {
const std::set<std::string> random_op_set = {
"bernoulli",
const std::set<std::string> random_op_set = {"bernoulli",
"poisson",
"multinomial",
"gaussian_random",
......@@ -283,10 +282,9 @@ void DependencyBuilder::AddDependencyForRandomOp() {
"randint",
"randperm",
"exponential",
"sampling_id"
"sampling_id",
"dropout",
"class_center_sample",
};
"class_center_sample"};
int dependence_op_idx = -1;
for (size_t op_idx = 0; op_idx < op_num_; ++op_idx) {
......
......@@ -1516,6 +1516,8 @@ class Executor(object):
program._compile(scope, self.place)
ir_graph = framework.IrGraph(program._graph)
inner_program = ir_graph.to_program()
if hasattr(program._program, 'lr_sheduler'):
inner_program.lr_sheduler = program._program.lr_sheduler
# print(f"Program after convert:\n {inner_program}", flush=True)
logging.warning(
"FLAGS_USE_STANDALONE_EXECUTOR and FLAGS_CONVERT_GRAPH_TO_PROGRAM is set to 1. Graph will be converted to Program and executed using new executor."
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册