diff --git a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py index bc2313448eb29a4b4eae2577acd0696d911d0044..9cb31b5603e7cf07c894c3fe7760ae26fc087499 100644 --- a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py +++ b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/dump/utils.py @@ -146,6 +146,10 @@ def set_dump_path(fpath=None, dump_tag='ptdbg_dump'): return check_file_valid(fpath) real_path = os.path.realpath(fpath) + if not os.path.exists(real_path): + os.makedirs(real_path) + os.chmod(real_path, 0o750) + print_info_log("create a directory named '{}' as dump_path.".format(real_path)) if not os.path.isdir(real_path): print_error_log( "set_dump_path '{}' error, the path is not a directory please set a valid directory.".format(real_path))