Browse Source

increase tbe compile process timeout to 600s

pull/15080/head
laiyongqiang 4 years ago
parent
commit
e5c8e2d477
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      mindspore/_extends/parallel_compile/tbe_compiler/tbe_process.py

+ 5
- 3
mindspore/_extends/parallel_compile/tbe_compiler/tbe_process.py View File

@@ -34,6 +34,8 @@ RL_COMPILE = "RL_COMPILE"
RL_OFFLINE = "RL_OFFLINE" RL_OFFLINE = "RL_OFFLINE"
RL_ONLINE = "RL_ONLINE" RL_ONLINE = "RL_ONLINE"


COMPILE_TIME_OUT_SECONDS = 600



def create_tbe_parallel_process(): def create_tbe_parallel_process():
""" """
@@ -102,8 +104,8 @@ def run_compiler(op_json):
""" """
try: try:
tbe_compiler = os.path.join(os.path.split(os.path.realpath(__file__))[0], "compiler.py") tbe_compiler = os.path.join(os.path.split(os.path.realpath(__file__))[0], "compiler.py")
completed_object = subprocess.run([sys.executable, tbe_compiler], input=op_json, timeout=300,
text=True, capture_output=True, check=True)
completed_object = subprocess.run([sys.executable, tbe_compiler], input=op_json,
timeout=COMPILE_TIME_OUT_SECONDS, text=True, capture_output=True, check=True)
return "Success", completed_object.stderr return "Success", completed_object.stderr
except subprocess.TimeoutExpired: except subprocess.TimeoutExpired:
tb = traceback.format_exc() tb = traceback.format_exc()
@@ -363,7 +365,7 @@ class TbeProcess:
ret = 0, "Failed", "Failed" ret = 0, "Failed", "Failed"
if self.__running_tasks: if self.__running_tasks:
task_id, task_future = self.__running_tasks.pop(0) task_id, task_future = self.__running_tasks.pop(0)
ret_type, result = task_future.get(330)
ret_type, result = task_future.get(COMPILE_TIME_OUT_SECONDS)
if ret_type == "Success": if ret_type == "Success":
ret = task_id, "Success", result ret = task_id, "Success", result
elif ret_type in ("Exception", "TBEException"): elif ret_type in ("Exception", "TBEException"):


Loading…
Cancel
Save