From 0a8b715be5b5ece516f9a82c205fa8f56ae7e183 Mon Sep 17 00:00:00 2001 From: liguanchi <14255978+VolKano@user.noreply.gitee.com> Date: Wed, 29 May 2024 09:35:31 +0800 Subject: [PATCH 1/3] g --- debug/accuracy_tools/atat/pytorch/common/file_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug/accuracy_tools/atat/pytorch/common/file_check.py b/debug/accuracy_tools/atat/pytorch/common/file_check.py index d47869921e..95285e017f 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)) -- Gitee From 4ea400534292815a148fe64c76b8fd1b774721dc Mon Sep 17 00:00:00 2001 From: liguanchi <14255978+VolKano@user.noreply.gitee.com> Date: Wed, 29 May 2024 09:51:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9file=5Fcheck=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E6=8C=87=E5=90=91=E5=AD=97=E6=AE=B5=20INVALID=5FPATH?= =?UTF-8?q?=5FERROR=20=E2=86=92=20ILLEGAL=5FPATH=5FERROR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debug/accuracy_tools/atat/pytorch/common/file_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug/accuracy_tools/atat/pytorch/common/file_check.py b/debug/accuracy_tools/atat/pytorch/common/file_check.py index d47869921e..95285e017f 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)) -- Gitee From 4e0fcda3998ae0e4f5264926642b266622a9df43 Mon Sep 17 00:00:00 2001 From: liguanchi <14255978+VolKano@user.noreply.gitee.com> Date: Wed, 29 May 2024 10:13:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=9C=A8105=E8=A1=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=86os.environ['HCCL=5FDETERMINISTIC']=20=3D=20True?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debug/accuracy_tools/atat/pytorch/common/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/debug/accuracy_tools/atat/pytorch/common/utils.py b/debug/accuracy_tools/atat/pytorch/common/utils.py index 821ce4a7a3..e0dbb79050 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) -- Gitee