diff --git a/debug/accuracy_tools/api_accuracy_checker/compare/algorithm.py b/debug/accuracy_tools/api_accuracy_checker/compare/algorithm.py index b314dd3125ecb8a6f8cffc994edb174327bf67d4..f4e73d7433eac0f6c64c9a7f8f7dd7591ec7d5f0 100644 --- a/debug/accuracy_tools/api_accuracy_checker/compare/algorithm.py +++ b/debug/accuracy_tools/api_accuracy_checker/compare/algorithm.py @@ -142,11 +142,11 @@ def flatten_compare_result(result): def compare_core(bench_out, npu_out, alg): msg = "" if not isinstance(bench_out, type(npu_out)): - return [(CompareConst.NAN, "bench and npu output type is different.")], False, CompareConst.NA, CompareConst.NA + return [(CompareConst.NAN, "bench and npu output type is different.")], False, CompareConst.NA, CompareConst.NA, CompareConst.NA if isinstance(bench_out, (list, tuple)): compare_result, test_success, bench_dtype, npu_dtype, shape = [], True, [], [], [] if len(bench_out) != len(npu_out): - return [(CompareConst.NAN, "bench and npu output structure is different")], False, CompareConst.NA, CompareConst.NA + return [(CompareConst.NAN, "bench and npu output structure is different")], False, CompareConst.NA, CompareConst.NA, CompareConst.NA for b_out_i, n_out_i in zip(bench_out, npu_out): compare_result_i, test_success_i, bench_dtype_i, npu_dtype_i, shape_i = compare_core(b_out_i, n_out_i, alg) compare_result.append(compare_result_i) diff --git a/debug/accuracy_tools/api_accuracy_checker/compare/compare.py b/debug/accuracy_tools/api_accuracy_checker/compare/compare.py index dc403cc2be87df50f51b6c50ac87d9c28c91deaf..f3e8a4cf494f8f3d8b36c189c7679314dc802733 100644 --- a/debug/accuracy_tools/api_accuracy_checker/compare/compare.py +++ b/debug/accuracy_tools/api_accuracy_checker/compare/compare.py @@ -74,7 +74,7 @@ class Comparator: console.print(table_detail) def write_csv_title(self): - summary_test_rows = [[self.COLUMN_API_NAME, self.COLUMN_FORWARD_SUCCESS, self.COLUMN_BACKWARD_SUCCESS]] + summary_test_rows = [[self.COLUMN_API_NAME, self.COLUMN_FORWARD_SUCCESS, self.COLUMN_BACKWARD_SUCCESS, "Message"]] write_csv(summary_test_rows, self.save_path) detail_test_rows = [[ @@ -96,6 +96,8 @@ class Comparator: name = test_result[0] df_row = list(test_result[:3]) + if test_result[1] == "SKIP" or test_result[2] == "SKIP": + df_row.append(test_result[3]) if self.stack_info: stack_info = "\n".join(self.stack_info[name]) df_row.append(stack_info) diff --git a/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py b/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py index 33e2e5adf5e46e9c82a7ed334c29a72814b3bc0e..ff0c4917c7ef2014dec3c113ec64fd7ebdd7716a 100644 --- a/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py +++ b/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py @@ -113,7 +113,7 @@ def run_ut(forward_file, backward_file, out_path, save_error_data): f"'int32_to_int64' list in accuracy_tools/api_accuracy_check/common/utils.py file.") else: print_error_log(f"Run {api_full_name} UT Error: %s" % str(err)) - + compare.write_summary_csv((api_full_name, "SKIP", "SKIP", str(err))) compare.print_pretest_result()