Diff device sections on mismatch in nvbench_compare.py (#278)

This commit is contained in:
Bernhard Manfred Gruber
2025-10-15 14:58:08 +02:00
committed by GitHub
parent 7feda2cf3a
commit 98d701c054

View File

@@ -5,6 +5,7 @@ import math
import os
import sys
import jsondiff
import tabulate
from colorama import Fore
from nvbench_json import reader
@@ -371,9 +372,13 @@ def main():
global all_devices
all_devices = cmp_root["devices"]
# This is blunt but works for now:
if ref_root["devices"] != cmp_root["devices"]:
print("Device sections do not match.")
print(
jsondiff.diff(
ref_root["devices"], cmp_root["devices"], syntax="symmetric"
)
)
sys.exit(1)
compare_benches(