Skip to content

nvbench-compare-robust --display explain emits invalid Markdown tables in which cells contain | #453

Description

@oleksandr-pavlyk

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

  1. 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
  1. 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 ❘.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

  • Status
    In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions