Changeset 3492 for proto/RE


Ignore:
Timestamp:
Sep 15, 2013, 11:50:02 AM (6 years ago)
Author:
linmengl
Message:

added GPU script, modify Makefile to -DUSE_S2P_AVX2

Location:
proto/RE
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • proto/RE/output/src/Makefile

    r3480 r3492  
    1919
    2020
    21 
    22 
    2321all:    $(SRCFILE)
    2422        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS)
    2523
    2624avx2:   $(SRCFILE)
    27         $(CC) -DBLOCK_SIZE=256 -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=core-avx2 -m64 -mavx2 -fabi-version=6
     25        $(CC) -DUSE_S2P_AVX2 -DBLOCK_SIZE=256 -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=core-avx2 -m64 -mavx2 -fabi-version=6
    2826
    2927avx:    $(SRCFILE)
  • proto/RE/performance/perf.py

    r3484 r3492  
    3838                results_file = open(outputpath+'/'+execution.stat,'r')
    3939                one=int(results_file.read())
    40                 results_file.close()
    41         # if not os.path.exists(outputpath+'/'+execution.stat):         
    42         #       one=execute_one(execution,1)
    43         #       results_file = open(outputpath+'/'+execution.stat,'w')
    44         #       results_file.write(str(one))
    45         #       results_file.close()
    46         # else:
    47         #       results_file = open(outputpath+'/'+execution.stat,'r')
    48         #       one=int(results_file.read())
    49         #       results_file.close()
    50 
     40                results_file.close()   
    5141       
    5242        return one,one,one,one
     
    6757
    6858
    69 def execute_one(execution, count):
     59def execute_one(execution, count):     
    7060        outputpath = 'output/'+execution.file.description+'/'+execution.expression.description+'/'+execution.program
    7161        log_file = open('perflog.txt', 'a')
     
    10797                shutil.copyfile(re_home+'output/src/re.cpp', outputpath+'/re.cpp')
    10898                shutil.copyfile(re_home+'performance/GPU_fixer.py', outputpath+'/GPU_fixer.py')
    109                 shutil.copyfile(re_home+'performance/Regxp.cl', outputpath+'/Regxp.cl')
    110                 p = Popen(['python '+outputpath+'/GPU_fixer.py '+outputpath+'/re.cpp'] ,shell=True)
    111                 p.wait()
     99                shutil.copyfile(re_home+'performance/Regxp.cl.template', outputpath+'/Regxp.cl.template')
     100                call('python '+outputpath+'/GPU_fixer.py '+outputpath+'/re.cpp', shell=True)
     101                call('python %s %s %s' % (re_home + '/performance/Regxp_cl_fixer.py', outputpath+'/re.cpp', outputpath+'/Regxp.cl.template'), shell=True)
     102                return
    112103        if execution.program=='grep':
    113104                escaped_e = escape_quotes(execution.expression.expression)
     
    230221expressions.append(Expression('(^|[^A-Z0-9:])([A-F0-9]{1,4}:){7}[A-F0-9]{1,4}($|[^A-Z0-9:])', 'IPv6', ('reb',)))
    231222
    232 programs = ['bitstreams', 'grep', 'nrgrep112']#, 'agrep', 'pcregrep']
    233 #programs = ['bitstreams','grep']
    234 #programs = ['bitstreams_avx2']
     223# programs = ['bitstreams', 'grep', 'nrgrep112']#, 'agrep', 'pcregrep']
     224# programs = ['bitstreams', 'bitstreams_avx2']
     225programs = ['bitstreams', 'bitstreams_avx2']
     226# programs = ['gpu']
    235227
    236228#stats = ['cycles:u', 'instructions:u', 'cache-misses:u', 'L1-dcache-load-misses:u', 'L1-dcache-store-misses:u', 'L1-dcache-prefetch-misses:u', 'L1-icache-load-misses:u']
    237 stats = ['cycles:u','instructions:u','branch-misses:u','cpu-clock','task-clock']
     229stats = ['cycles:u','instructions:u','branch-misses:u']
    238230
    239231
     
    256248                if match:
    257249                        for program in programs:
    258                                 for stat in stats:
     250                                for stat in stats:                                     
    259251                                        executions.append(Execution(stat, program, file, expression))
    260252csv_output = StringIO.StringIO()
Note: See TracChangeset for help on using the changeset viewer.