Skip to content

Commit

Permalink
Added missing parameter on test results
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-2105 committed May 16, 2022
1 parent 1d5cae6 commit d6e4ac4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def evaluate(num_ms, dn_bw, rn_bw, M, N, K, tolerance=DEFAULT_TOLERANCE, generat
print(f' - Speedup of the generated tile: {speedup}')
print(f' - Pass the test (tolerance={tolerance}) ? => {passed}')

EvaluationUtils.save_densegemm_results_csv(passed, M, N, K, generatedtile, generatedtile_cycles, min_tile, min_cycles, speedup, tolerance)
EvaluationUtils.save_densegemm_results_csv(passed, M, N, K, generator, generatedtile, generatedtile_cycles, min_tile, min_cycles, speedup, tolerance)

return passed

Expand Down
10 changes: 6 additions & 4 deletions stonne/tests/TileGenerator/MyGenerator/EvaluationUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def check_assertions(stderr):
return True if match else False


def save_densegemm_results_csv(passed, M, N, K, generatedtile, generatedtile_cycles, min_tile, min_cycles, speedup, tolerance):
fields = ['PASSED', 'M', 'N', 'K', 'GEN-T_M', 'GEN-T_N', 'GEN-T_K', 'GEN-CYCLES', 'MIN-T_M', 'MIN-T_N', 'MIN-T_K',
def save_densegemm_results_csv(passed, M, N, K, generator, generatedtile, generatedtile_cycles, min_tile, min_cycles, speedup, tolerance):
fields = ['PASSED', 'M', 'N', 'K', 'GENERATOR', 'GEN-T_M', 'GEN-T_N', 'GEN-T_K', 'GEN-CYCLES', 'MIN-T_M', 'MIN-T_N', 'MIN-T_K',
'MIN-CYCLES', 'SPEEDUP', 'TOLERANCE']
with open(DENSEGEMM_CSV_FILENAME, 'a') as csvfile:
writer = csv.DictWriter(csvfile, fieldnames=fields)
Expand All @@ -51,6 +51,7 @@ def save_densegemm_results_csv(passed, M, N, K, generatedtile, generatedtile_cyc
'M': M,
'N': N,
'K': K,
'GENERATOR': generator,
'GEN-T_M': generatedtile[0],
'GEN-T_N': generatedtile[1],
'GEN-T_K': generatedtile[2],
Expand All @@ -63,8 +64,8 @@ def save_densegemm_results_csv(passed, M, N, K, generatedtile, generatedtile_cyc
'TOLERANCE': tolerance})


def save_sparsedense_results_csv(passed, M, N, K, generatedtile, generatedtile_cycles, min_tile, min_cycles, speedup, tolerance):
fields = ['PASSED', 'M', 'N', 'K', 'GEN-T_N', 'GEN-T_K', 'GEN-CYCLES', 'MIN-T_N', 'MIN-T_K', 'MIN-CYCLES',
def save_sparsedense_results_csv(passed, M, N, K, generator, generatedtile, generatedtile_cycles, min_tile, min_cycles, speedup, tolerance):
fields = ['PASSED', 'M', 'N', 'K', 'GENERATOR', 'GEN-T_N', 'GEN-T_K', 'GEN-CYCLES', 'MIN-T_N', 'MIN-T_K', 'MIN-CYCLES',
'SPEEDUP', 'TOLERANCE']
with open(DENSEGEMM_CSV_FILENAME, 'a') as csvfile:
writer = csv.DictWriter(csvfile, fieldnames=fields)
Expand All @@ -78,6 +79,7 @@ def save_sparsedense_results_csv(passed, M, N, K, generatedtile, generatedtile_c
'M': M,
'N': N,
'K': K,
'GENERATOR': generator,
'GEN-T_N': generatedtile[0],
'GEN-T_K': generatedtile[1],
'GEN-CYCLES': generatedtile_cycles,
Expand Down

0 comments on commit d6e4ac4

Please sign in to comment.