Browse Source

!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
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
6e2bdded15
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      mindspore/profiler/profiling.py

+ 1
- 0
mindspore/profiler/profiling.py View File

@@ -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