Skip to content

Commit 70945ce

Browse files
Diff device sections on mismatch in nvbench_compare.py
1 parent 7feda2c commit 70945ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/nvbench_compare.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66
import sys
77

8+
import jsondiff
89
import tabulate
910
from colorama import Fore
1011
from nvbench_json import reader
@@ -371,9 +372,13 @@ def main():
371372
global all_devices
372373
all_devices = cmp_root["devices"]
373374

374-
# This is blunt but works for now:
375375
if ref_root["devices"] != cmp_root["devices"]:
376376
print("Device sections do not match.")
377+
print(
378+
jsondiff.diff(
379+
ref_root["devices"], cmp_root["devices"], syntax="symmetric"
380+
)
381+
)
377382
sys.exit(1)
378383

379384
compare_benches(

0 commit comments

Comments
 (0)