Description
nvbench-compare-robust --display explain emits GitHub Markdown pipe tables where some generated table cells contain literal | characters.
For example:
| ... | Ref [Lo | Ce | Hi] | Cmp [Lo | Ce | Hi] | ... |
| ... | [5.472 | 6.016 | 6.208] us | [5.536 | 6.112 | 6.240] us | ... |
In Markdown tables, | is a column delimiter, so GitHub renders these rows with extra columns and the table is mis-formatted.
Discovered while working on NVIDIA/cccl#10636
Suggested Fix
- For NVBench-generated interval notation, use a terminal- and Markdown-safe separator:
Ref [Lo / Ce / Hi]
Cmp [Lo / Ce / Hi]
[5.472 / 6.016 / 6.208] us
- Separately, sanitize/escape user-controlled or benchmark-controlled strings when emitting Markdown table cells. Axis names and axis values can contain literal
|, so headers/cells derived from benchmark metadata should be escaped for Markdown table output, e.g. | -> \U00002758. The \U+2758 corresponds to Unicode symbol ❘.
Description
nvbench-compare-robust --display explainemits GitHub Markdown pipe tables where some generated table cells contain literal|characters.For example:
In Markdown tables,
|is a column delimiter, so GitHub renders these rows with extra columns and the table is mis-formatted.Discovered while working on NVIDIA/cccl#10636
Suggested Fix
|, so headers/cells derived from benchmark metadata should be escaped for Markdown table output, e.g.| -> \U00002758. The\U+2758corresponds to Unicode symbol ❘.