diff --git a/debug/accuracy_tools/atat/pytorch/common/file_check.py b/debug/accuracy_tools/atat/pytorch/common/file_check.py index d47869921ec60d0ac1b72163c577c53cd410d8e9..95285e017faed0746b7a190b0ab30834cad6777a 100644 --- a/debug/accuracy_tools/atat/pytorch/common/file_check.py +++ b/debug/accuracy_tools/atat/pytorch/common/file_check.py @@ -280,10 +280,10 @@ def create_directory(dir_path): def check_path_before_create(path): if len(os.path.realpath(path)) > Const.DIRECTORY_LENGTH or len(os.path.basename(path)) > \ Const.FILE_NAME_LENGTH: - raise FileCheckException(FileCheckException.INVALID_PATH_ERROR, 'The file path length exceeds limit.') + raise FileCheckException(FileCheckException.ILLEGAL_PATH_ERROR, 'The file path length exceeds limit.') if not re.match(Const.FILE_PATTERN, os.path.realpath(path)): - raise FileCheckException(FileCheckException.INVALID_PATH_ERROR, + raise FileCheckException(FileCheckException.ILLEGAL_PATH_ERROR, 'The file path {} contains special characters.'.format(path)) diff --git a/debug/accuracy_tools/atat/pytorch/common/utils.py b/debug/accuracy_tools/atat/pytorch/common/utils.py index 821ce4a7a30f32bd3930ebf9972d635bef4bd908..e0dbb790500d2fb06f9141ad160b789552062f43 100644 --- a/debug/accuracy_tools/atat/pytorch/common/utils.py +++ b/debug/accuracy_tools/atat/pytorch/common/utils.py @@ -102,6 +102,7 @@ def seed_all(seed=1234, mode=False): torch.backends.cudnn.deterministic = True torch.backends.cudnn.enable = False torch.backends.cudnn.benchmark = False + os.environ['HCCL_DETERMINISTIC'] = True else: torch_npu.npu.manual_seed_all(seed) torch_npu.npu.manual_seed(seed)