| 121 | return [x for x in l1 if x not in l2] |
| 122 | |
| 123 | def parseCSV(csv_file, isBenchmark): |
| 124 | nonlocal note_worthy_statistics |
| 125 | map_out = dict() |
| 126 | csvOpener = open(csv_file, "r", encoding="utf8") |
| 127 | csvData = csvOpener.read().split("\n") |
| 128 | headerInfo = csvData[0].split(",") |
| 129 | designNameIdx = findIdx(headerInfo, "design") |
| 130 | if isBenchmark: |
| 131 | note_worthy_statistics = diff_list( |
| 132 | diff_list(diff_list(headerInfo, ignore_list), critical_statistics), |
| 133 | base_configs, |
| 134 | ) |
| 135 | |
| 136 | remover = 0 |
| 137 | size = len(base_configs) |
| 138 | while remover < size: |
| 139 | if base_configs[remover] not in headerInfo: |
| 140 | missing_configs.append(base_configs[remover]) |
| 141 | base_configs.pop(remover) |
| 142 | remover -= 1 |
| 143 | size -= 1 |
| 144 | remover += 1 |
| 145 | |
| 146 | if designNameIdx == -1: |
| 147 | print("Invalid report. No design name was found.") |
| 148 | exit(-1) |
| 149 | for i in range(1, len(csvData)): |
| 150 | if len(csvData[i]): |
| 151 | entry = csvData[i].split(",") |
| 152 | designName = entry[designNameIdx] |
| 153 | for idx in range(len(headerInfo)): |
| 154 | if idx != designNameIdx: |
| 155 | if designName not in map_out.keys(): |
| 156 | map_out[designName] = dict() |
| 157 | if isBenchmark: |
| 158 | map_out[designName]["Status"] = "PASSED" |
| 159 | else: |
| 160 | map_out[designName]["Status"] = "----" |
| 161 | map_out[designName][headerInfo[idx]] = str(entry[idx]) |
| 162 | return map_out |
| 163 | |
| 164 | def configurationMismatch(benchmark, regression_results): |
| 165 | nonlocal configuration_mismatches |