Ignore:
Timestamp:
Jun 14, 2016, 5:23:56 PM (8 years ago)
Author:
meunier
Message:
  • Improved scripts for simulations and graphes
  • Continued to clean up the lib nrc2 (from nrio2x.x to nrmem1.c)
  • Added a version (Fast - Parmerge - No stats)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/rosenfeld/scripts/create_graph.py

    r822 r823  
    1616import filecmp
    1717import random
     18import math
    1819
    1920from stack import Stack
     
    2324
    2425use_rand_images = True
    25 with_features = True
     26with_features = False
    2627
    27 threads = [1, 2, 4]
    28 nb_step = 0
     28threads = [1, 2, 4, 8, 16, 32, 64]
    2929use_dsk = True
    30 img_size = 1024
     30img_size = 2048
    3131granularity = 1
    3232rand_seed = 7
     
    4242# Each of these configuration must have been run with both features activated and deactivated
    4343configs = [
    44         {'SLOW':'1', 'FAST':'0', 'PARMERGE':'0', 'ARSP':'0'},
    45         {'SLOW':'0', 'FAST':'1', 'PARMERGE':'0', 'ARSP':'0'},
    4644        #{'SLOW':'1', 'FAST':'0', 'PARMERGE':'0', 'ARSP':'0'},
    4745        #{'SLOW':'0', 'FAST':'1', 'PARMERGE':'0', 'ARSP':'0'},
    4846        #{'SLOW':'0', 'FAST':'1', 'PARMERGE':'1', 'ARSP':'0'},
    49         #{'SLOW':'0', 'FAST':'1', 'PARMERGE':'1', 'ARSP':'1'},
     47        {'SLOW':'0', 'FAST':'1', 'PARMERGE':'1', 'ARSP':'1'},
    5048]
    5149
     
    5553    code = compile(f.read(), pyconf_file, 'exec')
    5654    exec(code)
     55
     56nb_step = 0
    5757
    5858if use_dsk:
     
    125125        plotter.add_x(X)
    126126        assert(nb_step == 4)
    127         YPAR1 = [float(exec_time[fconfig][thread]["NF"][density][0]) for density in range(0, 101)] # Parallel Labeling
    128         YPAR2 = [float(exec_time[fconfig][thread]["NF"][density][1]) for density in range(0, 101)] # Merging (Parallel or Pyramidal)
    129         YPTC2 = [float(exec_time[fconfig][thread]["NF"][density][2]) for density in range(0, 101)] # Parallel Transitive Closure
    130         YPAR3 = [float(exec_time[fconfig][thread]["NF"][density][3]) for density in range(0, 101)] # Parallel Relabeling
     127        YPAR1 = [float(int(exec_time[fconfig][thread]["NF"][density][0]) / math.pow(img_size, 2)) for density in range(0, 101)] # Parallel Labeling
     128        YPAR2 = [float(int(exec_time[fconfig][thread]["NF"][density][1]) / math.pow(img_size, 2)) for density in range(0, 101)] # Merging (Parallel or Pyramidal)
     129        YPTC2 = [float(int(exec_time[fconfig][thread]["NF"][density][2]) / math.pow(img_size, 2)) for density in range(0, 101)] # Parallel Transitive Closure
     130        YPAR3 = [float(int(exec_time[fconfig][thread]["NF"][density][3]) / math.pow(img_size, 2)) for density in range(0, 101)] # Parallel Relabeling
    131131
    132132        plotter.add_y(YPAR1)
     
    136136
    137137        if with_features:
    138             YPAR1f = [float(exec_time[fconfig][thread]["FT"][density][0]) for density in range(0, 101)] # Parallel Labeling
    139             YPAR2f = [float(exec_time[fconfig][thread]["FT"][density][1]) for density in range(0, 101)] # Merging (Parallel or Pyramidal)
     138            YPAR1f = [float(int(exec_time[fconfig][thread]["FT"][density][0]) / math.pow(img_size, 2)) for density in range(0, 101)] # Parallel Labeling
     139            YPAR2f = [float(int(exec_time[fconfig][thread]["FT"][density][1]) / math.pow(img_size, 2)) for density in range(0, 101)] # Merging (Parallel or Pyramidal)
    140140            deltaYPAR1 = [max(0, x - y) for x, y in zip (YPAR1f, YPAR1)]
    141141            deltaYPAR2 = [max(0, x - y) for x, y in zip (YPAR2f, YPAR2)]
Note: See TracChangeset for help on using the changeset viewer.