mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
fix wrong exit code in pipeline_manager (#715)
* fix exit * change to general exit errorcode=1
This commit is contained in:
parent
d57cf85e1d
commit
585e34b229
@ -79,7 +79,7 @@ class PipelineCaller:
|
|||||||
if call_id not in self._mp_dict:
|
if call_id not in self._mp_dict:
|
||||||
get_root_logger().error(
|
get_root_logger().error(
|
||||||
f'`{self._func_name}` with Call id: {call_id} failed. exit.')
|
f'`{self._func_name}` with Call id: {call_id} failed. exit.')
|
||||||
exit()
|
exit(1)
|
||||||
ret = self._mp_dict[call_id]
|
ret = self._mp_dict[call_id]
|
||||||
self._mp_dict.pop(call_id)
|
self._mp_dict.pop(call_id)
|
||||||
return ret
|
return ret
|
||||||
|
@ -37,14 +37,14 @@ def register_engines(device_id: int,
|
|||||||
x86_engine = pplnn.X86EngineFactory.Create(x86_options)
|
x86_engine = pplnn.X86EngineFactory.Create(x86_options)
|
||||||
if not x86_engine:
|
if not x86_engine:
|
||||||
logger.error('Failed to create x86 engine')
|
logger.error('Failed to create x86 engine')
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
if disable_avx512:
|
if disable_avx512:
|
||||||
status = x86_engine.Configure(pplnn.X86_CONF_DISABLE_AVX512)
|
status = x86_engine.Configure(pplnn.X86_CONF_DISABLE_AVX512)
|
||||||
if status != pplcommon.RC_SUCCESS:
|
if status != pplcommon.RC_SUCCESS:
|
||||||
logger.error('x86 engine Configure() failed: ' +
|
logger.error('x86 engine Configure() failed: ' +
|
||||||
pplcommon.GetRetCodeStr(status))
|
pplcommon.GetRetCodeStr(status))
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
engines.append(pplnn.Engine(x86_engine))
|
engines.append(pplnn.Engine(x86_engine))
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ def register_engines(device_id: int,
|
|||||||
cuda_engine = pplnn.CudaEngineFactory.Create(cuda_options)
|
cuda_engine = pplnn.CudaEngineFactory.Create(cuda_options)
|
||||||
if not cuda_engine:
|
if not cuda_engine:
|
||||||
logger.error('Failed to create cuda engine.')
|
logger.error('Failed to create cuda engine.')
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
if quick_select:
|
if quick_select:
|
||||||
status = cuda_engine.Configure(
|
status = cuda_engine.Configure(
|
||||||
@ -63,7 +63,7 @@ def register_engines(device_id: int,
|
|||||||
if status != pplcommon.RC_SUCCESS:
|
if status != pplcommon.RC_SUCCESS:
|
||||||
logger.error('cuda engine Configure() failed: ' +
|
logger.error('cuda engine Configure() failed: ' +
|
||||||
pplcommon.GetRetCodeStr(status))
|
pplcommon.GetRetCodeStr(status))
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
if input_shapes is not None:
|
if input_shapes is not None:
|
||||||
status = cuda_engine.Configure(pplnn.CUDA_CONF_SET_INPUT_DIMS,
|
status = cuda_engine.Configure(pplnn.CUDA_CONF_SET_INPUT_DIMS,
|
||||||
@ -72,7 +72,7 @@ def register_engines(device_id: int,
|
|||||||
logger.error(
|
logger.error(
|
||||||
'cuda engine Configure(CUDA_CONF_SET_INPUT_DIMS) failed: '
|
'cuda engine Configure(CUDA_CONF_SET_INPUT_DIMS) failed: '
|
||||||
+ pplcommon.GetRetCodeStr(status))
|
+ pplcommon.GetRetCodeStr(status))
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
if export_algo_file is not None:
|
if export_algo_file is not None:
|
||||||
status = cuda_engine.Configure(pplnn.CUDA_CONF_EXPORT_ALGORITHMS,
|
status = cuda_engine.Configure(pplnn.CUDA_CONF_EXPORT_ALGORITHMS,
|
||||||
@ -81,7 +81,7 @@ def register_engines(device_id: int,
|
|||||||
logger.error(
|
logger.error(
|
||||||
'cuda engine Configure(CUDA_CONF_EXPORT_ALGORITHMS) '
|
'cuda engine Configure(CUDA_CONF_EXPORT_ALGORITHMS) '
|
||||||
'failed: ' + pplcommon.GetRetCodeStr(status))
|
'failed: ' + pplcommon.GetRetCodeStr(status))
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
if import_algo_file is not None:
|
if import_algo_file is not None:
|
||||||
status = cuda_engine.Configure(pplnn.CUDA_CONF_IMPORT_ALGORITHMS,
|
status = cuda_engine.Configure(pplnn.CUDA_CONF_IMPORT_ALGORITHMS,
|
||||||
@ -90,7 +90,7 @@ def register_engines(device_id: int,
|
|||||||
logger.error(
|
logger.error(
|
||||||
'cuda engine Configure(CUDA_CONF_IMPORT_ALGORITHMS) '
|
'cuda engine Configure(CUDA_CONF_IMPORT_ALGORITHMS) '
|
||||||
'failed: ' + pplcommon.GetRetCodeStr(status))
|
'failed: ' + pplcommon.GetRetCodeStr(status))
|
||||||
sys.exit(-1)
|
sys.exit(1)
|
||||||
|
|
||||||
engines.append(pplnn.Engine(cuda_engine))
|
engines.append(pplnn.Engine(cuda_engine))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user