forked from mindspore-Ecosystem/mindspore
!15704 Remove builtin Profiler in model scaffolding.
From: @c_34 Reviewed-by: @zhanlijun88688,@oacjiewen,@kingxian Signed-off-by: @kingxian
This commit is contained in:
commit
dbb79b3e49
|
@ -18,7 +18,6 @@
|
||||||
import os
|
import os
|
||||||
import functools
|
import functools
|
||||||
from mindspore import context
|
from mindspore import context
|
||||||
from mindspore.profiler import Profiler
|
|
||||||
from .config import config
|
from .config import config
|
||||||
|
|
||||||
_global_sync_count = 0
|
_global_sync_count = 0
|
||||||
|
@ -102,14 +101,9 @@ def moxing_wrapper(pre_process=None, post_process=None):
|
||||||
if pre_process:
|
if pre_process:
|
||||||
pre_process()
|
pre_process()
|
||||||
|
|
||||||
if config.enable_profiling:
|
# Run the main function
|
||||||
profiler = Profiler()
|
|
||||||
|
|
||||||
run_func(*args, **kwargs)
|
run_func(*args, **kwargs)
|
||||||
|
|
||||||
if config.enable_profiling:
|
|
||||||
profiler.analyse()
|
|
||||||
|
|
||||||
# Upload data to train_url
|
# Upload data to train_url
|
||||||
if config.enable_modelarts:
|
if config.enable_modelarts:
|
||||||
if post_process:
|
if post_process:
|
||||||
|
|
Loading…
Reference in New Issue