MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AnalyzeTestError

Function AnalyzeTestError

tensorflow/lite/experimental/ruy/test.h:1289–1313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287
1288template <typename TestSetType>
1289void AnalyzeTestError(const TestSetType& test_set, int first_bad_result_index,
1290 ErrorAnalysis* error_analysis) {
1291 const auto& good_matrix = test_set.results[0]->storage_matrix.matrix;
1292 const auto& bad_matrix =
1293 test_set.results[first_bad_result_index]->storage_matrix.matrix;
1294 GetMatrixStats(good_matrix, &error_analysis->stats_good);
1295 GetMatrixStats(bad_matrix, &error_analysis->stats_bad);
1296 bool found_first_error = false;
1297 for (int row = 0; row < good_matrix.layout.rows; row++) {
1298 for (int col = 0; col < good_matrix.layout.cols; col++) {
1299 if (Element(good_matrix, row, col) != Element(bad_matrix, row, col)) {
1300 if (!found_first_error) {
1301 found_first_error = true;
1302 error_analysis->row_of_first_error = row;
1303 error_analysis->col_of_first_error = col;
1304 error_analysis->first_error_good_value =
1305 Element(good_matrix, row, col);
1306 error_analysis->first_error_bad_value = Element(bad_matrix, row, col);
1307 }
1308 error_analysis->error_rows.insert(row);
1309 error_analysis->error_cols.insert(col);
1310 }
1311 }
1312 }
1313}
1314
1315template <typename LhsScalar, typename RhsScalar, typename SpecType>
1316void ComputeAccumRangeBeforeMultiplier(

Callers 1

VerifyTestResultsMethod · 0.85

Calls 3

GetMatrixStatsFunction · 0.85
ElementFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected