From 00bdbed355c101e361729231d0d7e57b57c0701c Mon Sep 17 00:00:00 2001 From: gitee Date: Tue, 5 Nov 2024 15:01:48 +0800 Subject: [PATCH 1/2] fix bug --- .../api_accuracy_checker/run_ut/run_overflow_check.py | 6 +++--- .../msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py index 20ec98a8e..2f247994c 100644 --- a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py +++ b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py @@ -81,11 +81,11 @@ def run_overflow_check(forward_file): except Exception as err: _, api_name, _ = api_full_name.split(Const.SEP) if "not implemented for 'Half'" in str(err): - logger.warning(f"API {api_name} not support half tensor in CPU, please add {api_name} to CONVERT_API " - f"'fp16_to_fp32' list in accuracy_tools/api_accuracy_check/common/utils.py file.") + logger.warning(f"API {api_name} not support half tensor in CPU. This API does not support overflow " + f"check, so it will be skipped.") elif "expected scalar type Long" in str(err): logger.warning(f"API {api_name} not support int32 tensor in CPU, please add {api_name} to CONVERT_API " - f"'int32_to_int64' list in accuracy_tools/api_accuracy_check/common/utils.py file.") + f"'int32_to_int64' list in accuracy_tools/msprobe/core/common/const.py file.") else: logger.error(f"Run {api_full_name} UT Error: %s" % str(err)) diff --git a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py index 54371a421..25235f65c 100644 --- a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py +++ b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py @@ -140,7 +140,7 @@ def run_api_offline(config, compare, api_name_set): except Exception as err: if "expected scalar type Long" in str(err): logger.warning(f"API {api_name} not support int32 tensor in CPU, please add {api_name} to CONVERT_API " - f"'int32_to_int64' list in accuracy_tools/api_accuracy_check/common/utils.py file.") + f"'int32_to_int64' list in accuracy_tools/msprobe/core/common/const.py file.") else: logger.error(f"Run {api_full_name} UT Error: %s" % str(err)) compare_alg_results = err_column.to_column_value(CompareConst.SKIP, str(err)) -- Gitee From 4f0961cd59d5654a9c6c6ae3455423250d59cfff Mon Sep 17 00:00:00 2001 From: gitee Date: Tue, 5 Nov 2024 15:34:03 +0800 Subject: [PATCH 2/2] fix bug --- .../pytorch/api_accuracy_checker/run_ut/run_overflow_check.py | 4 ++-- .../msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py index 2f247994c..a2371d503 100644 --- a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py +++ b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_overflow_check.py @@ -82,10 +82,10 @@ def run_overflow_check(forward_file): _, api_name, _ = api_full_name.split(Const.SEP) if "not implemented for 'Half'" in str(err): logger.warning(f"API {api_name} not support half tensor in CPU. This API does not support overflow " - f"check, so it will be skipped.") + "check, so it will be skipped.") elif "expected scalar type Long" in str(err): logger.warning(f"API {api_name} not support int32 tensor in CPU, please add {api_name} to CONVERT_API " - f"'int32_to_int64' list in accuracy_tools/msprobe/core/common/const.py file.") + "'int32_to_int64' list in accuracy_tools/msprobe/core/common/const.py file.") else: logger.error(f"Run {api_full_name} UT Error: %s" % str(err)) diff --git a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py index 25235f65c..b64b8080c 100644 --- a/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py +++ b/debug/accuracy_tools/msprobe/pytorch/api_accuracy_checker/run_ut/run_ut.py @@ -140,7 +140,7 @@ def run_api_offline(config, compare, api_name_set): except Exception as err: if "expected scalar type Long" in str(err): logger.warning(f"API {api_name} not support int32 tensor in CPU, please add {api_name} to CONVERT_API " - f"'int32_to_int64' list in accuracy_tools/msprobe/core/common/const.py file.") + "'int32_to_int64' list in accuracy_tools/msprobe/core/common/const.py file.") else: logger.error(f"Run {api_full_name} UT Error: %s" % str(err)) compare_alg_results = err_column.to_column_value(CompareConst.SKIP, str(err)) -- Gitee