未验证 提交 171da2ce 编写于 作者: L Leo Chen 提交者: GitHub

[new-exec] skip compiled program (#37512)

* skip compiled program

* fix ut
上级 7db7a0ec
......@@ -1332,13 +1332,14 @@ class Executor(object):
def _can_use_interpreter_core(program, place):
compiled = isinstance(program, compiler.CompiledProgram)
# NOTE(zhiqiu): only single card compiled program is supported
# NOTE(zhiqiu): do not support compiled program now
if compiled:
if program._is_data_parallel and len(
program._get_places(place, program._places)) == 1:
return True
else:
return False
return False
# if program._is_data_parallel and len(
# program._get_places(place, program._places)) == 1:
# return True
# else:
# return False
else:
assert isinstance(program, Program)
return True
......
......@@ -261,7 +261,7 @@ class SwitchExecutorInterfaceWithFeed(unittest.TestCase):
def test_compiled_program(self):
data = np.ones([2, 2], dtype="float32")
feed = {"a": data, 'fake_input': data}
feed = {"a": data}
res = self.run_new_executor(feed, use_compiled=True)
gt = self.run_raw_executor(feed, use_compiled=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册