mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Diff device sections on mismatch in nvbench_compare.py (#278)
This commit is contained in:
committed by
GitHub
parent
7feda2cf3a
commit
98d701c054
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user