!6295 Initialize the aicpu environment in the script to avoid manual setting of the environment

Merge pull request !6295 from 张毅辉/zyh_profiling_set_aicpu_env
pull/6295/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 6e2bdded15

@ -107,6 +107,7 @@ class Profiler:
os.environ['PROFILING_MODE'] = 'true'
os.environ['MINDDATA_PROFILING_DIR'] = self._output_path
os.environ['DEVICE_ID'] = self._dev_id
os.environ['AICPU_PROFILING_MODE'] = 'true'
# use context interface to open profiling, for the new mindspore version(after 2020.5.21)
context.set_context(enable_profiling=True, profiling_options="training_trace:task_trace")

Loading…
Cancel
Save