Problem
Older NVBench jsonbin output can contain sidecar filenames that are not relative to the JSON file location, see #404. This makes post-processing fragile when benchmarks are launched from one working directory but the JSON output is written elsewhere.
Desired Tool
Add a script that rewrites existing NVBench JSON files so that jsonbin sidecar filenames are normalized relative to the JSON file’s directory.
The tool should:
- Read an NVBench JSON file.
- Locate jsonbin sidecar summaries, including sample time and frequency sidecars.
- Resolve existing sidecar files from candidate locations.
- Rewrite filename fields to paths relative to the JSON file directory.
- Preserve all other JSON content.
- Provide a dry-run mode.
- Support either in-place update with backup or writing to a separate output file.
Ambiguity Handling
Some files may be resolvable from multiple locations. The tool should avoid guessing silently. Possible options:
nvbench-normalize-jsonbin result.json --dry-run
nvbench-normalize-jsonbin result.json --in-place
nvbench-normalize-jsonbin result.json --output normalized.json
nvbench-normalize-jsonbin result.json --sidecar-root /path/to/use
If multiple candidates match, the tool should report the ambiguity and require --sidecar-root or another explicit resolution option.
Acceptance Criteria
- Normalized JSON works when moved together with its sidecar directories.
- Missing sidecars are reported clearly.
- Ambiguous sidecar resolution is not silently guessed.
- Existing valid JSON-relative sidecar paths are left unchanged.
- Tests cover current JSON-relative files and older launch-directory-relative files.
Motivation
This complements the jsonbin sidecar path fixes (#405 and change to nvbench-compare in #386) for newly generated output while providing a migration path for previously collected benchmark data.
Problem
Older NVBench jsonbin output can contain sidecar filenames that are not relative to the JSON file location, see #404. This makes post-processing fragile when benchmarks are launched from one working directory but the JSON output is written elsewhere.
Desired Tool
Add a script that rewrites existing NVBench JSON files so that jsonbin sidecar filenames are normalized relative to the JSON file’s directory.
The tool should:
Ambiguity Handling
Some files may be resolvable from multiple locations. The tool should avoid guessing silently. Possible options:
If multiple candidates match, the tool should report the ambiguity and require
--sidecar-rootor another explicit resolution option.Acceptance Criteria
Motivation
This complements the
jsonbinsidecar path fixes (#405 and change tonvbench-comparein #386) for newly generated output while providing a migration path for previously collected benchmark data.