MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / print_table

Function print_table

tests/test_metal_python_ref_compare.cpp:445–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445static void print_table(const std::string & title, const std::vector<metric_row> & rows) {
446 fprintf(stderr, "\n%s\n", title.c_str());
447 fprintf(stderr, "| tensor | shape | max abs diff | mean abs diff | mean rel err | cosine | note |\n");
448 fprintf(stderr, "|--------|-------|--------------|---------------|--------------|--------|------|\n");
449 for (const auto & row : rows) {
450 if (!row.measured) {
451 fprintf(stderr, "| %s | %s | n/a | n/a | n/a | n/a | %s |\n",
452 row.tensor.c_str(), row.shape.c_str(), row.note.c_str());
453 continue;
454 }
455 fprintf(stderr, "| %s | %s | %.6e | %.6e | %.6e | %.8f | %s |\n",
456 row.tensor.c_str(), row.shape.c_str(), row.max_abs,
457 row.mean_abs, row.mean_rel, row.cosine, row.note.c_str());
458 }
459}
460
461static void print_summary(const backend_run & run) {
462 fprintf(stderr, "\n=== %s vs Python ===\n", run.backend.c_str());

Callers 1

print_summaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected