<jupyter_start><jupyter_text>Dataframe : Execution Benchmarks run on single cycle memroy latency for all ISA's<jupyter_code>rows = []

for arch in zm_arch:
    for mem in zm_memory_models:
        for bm in execution_benchmarks :   
            for sys in zm_gem5_cpus:
                rows.append([arch,mem,bm, sys,
                                 gem5GetStat(arch+'/'+zm_config+'/'+mem+'/'+bm+'/'+sys, 'sim_ticks')/1000, #1000
                                 gem5GetStat(arch+'/'+zm_config+'/'+mem+'/'+bm+'/'+sys, 'sim_insts'),
                                 gem5GetStat(arch+'/'+zm_config+'/'+mem+'/'+bm+'/'+sys, 'sim_ops'),
                                 gem5GetStat(arch+'/'+zm_config+'/'+mem+'/'+bm+'/'+sys, 'sim_ticks'),
                                 gem5GetStat(arch+'/'+zm_config+'/'+mem+'/'+bm+'/'+sys, 'host_op_rate'),
                                 gem5GetStat(arch+'/'+zm_config+'/'+mem+'/'+bm+'/'+sys, 'system.cpu.num_mem_refs'),
                                ])
            
vrg_df = pd.DataFrame(rows, columns=['arch','mem','benchmark','cpu',
                                      'cycles', 
                                     'instructions', 
                                     'ops',
                                     'time','host_op_rate','mem_refs'
                                      ])

vrg_df['ipc'] = vrg_df['instructions']/vrg_df['cycles']
vrg_df['cpi']= 1/vrg_df['ipc']
vrg_df['percent_of_memrefs'] = vrg_df['mem_refs']/vrg_df['instructions']
vrg_df['percent_of_other'] = 1 - vrg_df['percent_of_memrefs']
vrg_df['expected_IPC']= 1/vrg_df['percent_of_other']+ (vrg_df['percent_of_memrefs']*2)

print(vrg_df)
#plotting all Benchmark
def doplot_benchmarks(benchmarks,benchmark_names,cpus,stat,mem,arch,norm=False):
    plt.figure()
    i = 0
    for bm in benchmarks:
        if norm:
            base = vrg_df[stat].iloc[0]
        else:
            base = 1
        for j,sys in enumerate(cpus):
            d = vrg_df[(vrg_df['cpu']==sys) & (vrg_df['benchmark']==bm) & (vrg_df['mem']==mem) 
                       & (vrg_df['arch']==arch)]
            plt.bar(i, d[stat]/base, color='C'+str(j))
            i += 1
        i += 1
        
    
    for i,sys in enumerate(cpus):
        plt.bar(0,0,color='C'+str(i), label=sys)
    new_names = benchmark_names + benchmark_names
    plt.xticks(np.arange(len(benchmark_names))*(len(cpus)+1)+i/2, benchmark_names, rotation=40, ha='right')<jupyter_output><empty_output><jupyter_text>IPC for SingleCycle Memory : ISA RISCV<jupyter_code>#plotting IPC for SingleCycle bandwidth for Timingsimple RISCV
benchmarks = execution_benchmarks
benchmark_names =  execution_benchmarks
cpus = ['Simple']
fig_size = plt.rcParams["figure.figsize"]
fig_size[0] = 10
fig_size[1] = 5
plt.rcParams["figure.figsize"] = fig_size
doplot_benchmarks(benchmarks,benchmark_names,cpus,'ipc','SingleCycle','RISCV',norm=False)
plt.ylabel('IPC')
plt.xlabel('Benchamrks')
plt.legend(loc=2, prop={'size': 8})
plt.title('IPC for SingleCycle Memory :ISA RISCV')
plt.tight_layout()
plt.savefig('IPC_execbenchmarks_SingleCycle_simple_RISCV.png', format='png', dpi=600)<jupyter_output><empty_output><jupyter_text>IPC for SingleCycle Memory : ISA ARM<jupyter_code>#plotting IPC for SingleCycle bandwidth for Timingsimple ARM-32
benchmarks = execution_benchmarks
benchmark_names =  execution_benchmarks
cpus = ['Simple']
fig_size = plt.rcParams["figure.figsize"]
fig_size[0] = 10
fig_size[1] = 5
plt.rcParams["figure.figsize"] = fig_size
doplot_benchmarks(benchmarks,benchmark_names,cpus,'ipc','SingleCycle','ARM-32',norm=False)
plt.ylabel('IPC')
plt.xlabel('Benchamrks')
plt.legend(loc=2, prop={'size': 8})
plt.title('IPC for SingleCycle Memory :ISA ARM32')
plt.tight_layout()
plt.savefig('IPC_execbenchmarks_SingleCycle_simple_ARM.png', format='png', dpi=600)<jupyter_output><empty_output><jupyter_text>IPC for SingleCycle Memory : ISA X86<jupyter_code>#plotting IPC for SingleCycle bandwidth for Timingsimple X86
benchmarks = execution_benchmarks
benchmark_names =  execution_benchmarks
cpus = ['Simple']
fig_size = plt.rcParams["figure.figsize"]
fig_size[0] = 10
fig_size[1] = 5
plt.rcParams["figure.figsize"] = fig_size
doplot_benchmarks(benchmarks,benchmark_names,cpus,'ipc','SingleCycle','X86',norm=False)
plt.ylabel('IPC')
plt.xlabel('Benchamrks')
plt.legend(loc=2, prop={'size': 8})
plt.title('IPC for SingleCycle Memory : ISA X86')
plt.tight_layout()
plt.savefig('IPC_execbenchmarks_SingleCycle_simple_X86.png', format='png', dpi=600)

#ERROR RATE GRAPH
#comparision between instruction mix and IPC.
benchmarks = execution_benchmarks
benchmark_names =  all_benchmarks_names
cpus = ['Simple']
fig_size = plt.rcParams["figure.figsize"]
fig_size[0] = 10
fig_size[1] = 5
plt.rcParams["figure.figsize"] = fig_size
doplot_graphs(benchmarks,benchmarks_names,cpus)
plt.ylabel('IPC')
plt.xlabel('% of mem inst')
plt.legend(loc=2, prop={'size': 8})
plt.title('IPC vs mem instructions ')
plt.tight_layout()
plt.savefig('IPC_vs_mem_inst.png', format='png', dpi=600)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15460852329038652, 'fraction_numerical': 0.017046580773042618, 'mean_word_length': 3.7335834896810507, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '218973', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1922, 'n_tokens_neox': 1811, 'n_words': 277, 'path': 'results-notebooks/microbm-experiments/IPC_InstructionMix.ipynb', 'repo_name': 'TCHERNET/parsec-tests2', 'size': '5045'}