diff --git a/llvm/projects/soc_simulator/src/driver_new_config_fp16_repl.py b/llvm/projects/soc_simulator/src/driver_new_config_fp16_repl.py index f53573f7cde9420400194827d55d84d69e2ace5b..fa4868b0cc691d76966c1d9e95485c1f45606737 100644 --- a/llvm/projects/soc_simulator/src/driver_new_config_fp16_repl.py +++ b/llvm/projects/soc_simulator/src/driver_new_config_fp16_repl.py @@ -256,7 +256,7 @@ class Driver: has_quantized = False for layer_ind, (hardware, layer) in enumerate(curr_conf_results): - if len(layer) == 1 and layer[0][2].find("softmax") != -1: continue + if layer[0][2].find("softmax") != -1: continue fp16_layer = [] #print(layer_ind, hardware, layer) layer_table_data = self.__tensor_layers[layer_ind] @@ -330,7 +330,7 @@ class Driver: elif Driver.is_fc(layer_name): rows_a = layer_data["RA"] cols_a = layer_data["CA"] - rows_b = cols_ + rows_b = layer_data["RB"] cols_b = layer_data["CB"] else: print("PROMISE can't run whatever this layer is.") @@ -427,7 +427,8 @@ class Driver: def get_final_times_energies_conf(curr_conf, curr_conf_name): final_time = final_energy = 0 - + orig_ft = orig_fe = 0 + final_conf = [] # List (conf) of lists (layers) of tuples (operation data) #for hardware, layer in self.fp16_baseline: @@ -447,20 +448,25 @@ class Driver: #print(op_time, tensor_op) final_tensor_op = tensor_op #print(op_time > baseline_time) + if op_time > baseline_time: - #print("**************** BIGGER ******************") - #print(curr_conf_name) - #print(baseline_time, baseline_energy, baseline_op, layer_ind) - #print(op_time, tensor_op, layer_ind) + print("**************** BIGGER ******************") + print(curr_conf_name) + print(baseline_time, baseline_energy, baseline_op, layer_ind) + print(op_time, tensor_op, layer_ind) final_time += baseline_time final_energy += baseline_energy final_tensor_op = baseline_op else: final_time += op_time final_energy += op_energy + orig_ft += op_time + orig_fe += op_energy + final_conf_layer.append((None, None, final_tensor_op)) # Don't care about the times and energies when writing final_conf.append((hardware, final_conf_layer)) #print("\n") + print(curr_conf_name, orig_ft, orig_fe, final_time, final_energy) return final_time, final_energy, (curr_conf[0], final_conf) conf_index = 0