Skip to content

Commit

Permalink
better viz for ilp
Browse files Browse the repository at this point in the history
  • Loading branch information
oflatt committed Feb 27, 2025
1 parent 872458b commit 0d9c78e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infra/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,18 @@ def make_ilp(json, output, benchmark_suite_folder):

plt.xlabel('Size of egraph')
plt.ylabel('Extraction Time')
plt.gca().xaxis.set_major_formatter(mticker.FuncFormatter(format_k))
plt.title('ILP Extraction vs eggcc Extraction')
plt.legend()
plt.grid(True, linestyle='--', linewidth=0.5)

plt.savefig(output)


# Format x-axis labels to be in "k" format
def format_k(x, pos):
return f"{int(x / 1000)}k"

def make_jitter(profile, upper_x_bound, output):
# Prepare the data for the jitter plot
# first y label is empty, underneath the first benchmark
Expand Down Expand Up @@ -335,7 +340,10 @@ def make_macros(profile, benchmark_suites, output_file):
if benchmark == 'raytrace':
continue
ilp_all = ilp_all + get_ilp_test_times(profile, benchmark)

ilp_all_above_100k = list(filter(lambda x: x["egraph_size"] > 100000, ilp_all))
out.write(format_latex_macro_percent("PercentILPTimeout", len(list(filter(lambda x: x["ilp_time"] == None, ilp_all))) / len(ilp_all)))
out.write(format_latex_macro_percent("PercentILPTimeoutAbove100k", len(list(filter(lambda x: x["ilp_time"] == None, ilp_all_above_100k))) / max(len(ilp_all_above_100k), 1)))


def get_code_size(benchmark, suites_path):
Expand Down

0 comments on commit 0d9c78e

Please sign in to comment.