Пример #1
0
    if os.path.isfile (sim_file) is False:
      print "The file " + sim_file + " doesn't exist."
      continue

    # read in the referenced IPC
    ipc_alone = get.get_ipc_alone (workload_dir, sim_index)
    stat_share_design = get.get_stat (sim_file)
    ipc_share_design = get.get_ipc_share (stat_share_design)
    (ws_design, hs_design, uf_design) = get.cmp_metric (ipc_alone, ipc_share_design)
    _ws_per_workload [num_sim_file] = ws_design
    _hs_per_workload [num_sim_file] = hs_design
    _uf_per_workload [num_sim_file] = uf_design

    num_sim_file = num_sim_file + 1
    total_num = total_num + 1
  ws_plt = ws_plt + [get.cmp_geo_avg (_ws_per_workload)]
  hs_plt = hs_plt + [get.cmp_geo_avg (_hs_per_workload)]
  uf_plt = uf_plt + [get.cmp_geo_avg (_uf_per_workload)]
  para_value_plt = para_value_plt + [dir]
  num_value = num_value + 1 # increase the number of value being swept

print "number of value : " + str (num_value)
print "total files: " + str (total_num)
print ws_plt
print hs_plt
print uf_plt
plt.figure(1)
plt.subplot(3,1,1)
plt.plot (para_value_plt, ws_plt, 'co')
plt.subplot(3,1,2)
plt.plot (para_value_plt, hs_plt, 'gv')
Пример #2
0
  #uf_norm = uf_norm + uf_design/uf_baseline
  # enable the code above to use reference IPC as ipc_alone


  # profile sum of l1miss
  l1miss_new = get.get_l1miss_sum (stat_share_baseline)
  l1miss_aggr = l1miss_new + l1miss_aggr

# Average l1 miss per cycle
L1MPC_avg = float(l1miss_aggr) / (num_sim*NODE*ACTIVE_CYCLE)
print "Average L1MPC = " + str("%.3f"%L1MPC_avg)

#print "--- Arithmetic Average ---"
#print "Average Normalized Weighted Speedup (>1 is good) = " + str("%.3f"%(ws_norm/num_sim))
#print "Average Normalized Harmonic Speedup (>1 is good) = " + str("%.3f"%(hs_norm/num_sim))
#print "Average Normalized Unfairness (<1 is good) = " + str("%.3f"%(uf_norm/num_sim))

geo_avg_ws = get.cmp_geo_avg(ws_norm_raw)
geo_avg_hs = get.cmp_geo_avg(hs_norm_raw)
geo_avg_uf = get.cmp_geo_avg(uf_norm_raw)

print "--- Best case --- "
print "max_ws, max_hs, min_uf : " + str("%.3f / "%max_ws) + str("%.3f / "%max_hs) + str("%.3f"%min_uf)
print "--- Geometric Average --- "
print ws_norm_raw
print uf_norm_raw
print "Geometric Average (ws, hs, uf): " + str("%.3f / "%geo_avg_ws) + str("%.3f / "%geo_avg_hs) + str("%.3f"%geo_avg_uf)