示例#1
0
def main():
    print_header()

    print("[main]: initializing...")
    print("")

    app_data = {}

    app_data['app'] = app
    app_data['app_name'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)
    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_unsharp, app, app_data, g_size,
                               [1, t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)

    elif app_data['mode'] == 'tune':
        print("Tuning")
        auto_tune(app_data)
    else:
        create_lib(build_unsharp, app, app_data)
        min_avg = 100000
        for i in range(0, 10000000):
            min_avg = min(min_avg, unsharp_mask(app_data))

        print("minimum average ", min_avg)

    return
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)
    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_pyramid, app, app_data, g_size, [t1, t2])
                    for t in range (0, 0):
                        print ("Running for iteration #", t)
                        pyramid_blending(app_data)
    elif app_data['mode'] == 'tune' or app_data['mode'] == 'tune_execute':
        auto_tune(app_data)
        pass
    else:
        create_lib(build_pyramid, app, app_data)
        min_avg = 100000
        for r in range (0,5):
            min_avg = min (min_avg, pyramid_blending(app_data))
        print ("Minimum Average Time ", min_avg)

    return
示例#3
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)
    #print ('app_data', app_data)
    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7, 10, 15]:
            create_lib(build_nlmeans, app, app_data, g_size)
            for t in range(0, 5):
                print("Running for iteration #", t)
                nlmeans(app_data)
    elif app_data['mode'] == 'tune':
        auto_tune(pipe_data, app_data)
        pass
    else:
        create_lib(build_nlmeans, app, app_data)
        for i in range(0, 5):
            nlmeans(app_data)

    return
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_harris, app, app_data, g_size, [t1, t2])
                    for t in range (0, 0):
                        print ("Running for iteration #", t)
                        harrispipe(app_data)
    elif app_data['mode'] == 'tune':
        pass
    else:
        create_lib(build_harris, app, app_data)
        _m = 10000000
        for i in range (0,5):
            _m = min (_m, harrispipe(app_data))
        print ("min time is ", _m)
    return
示例#5
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_harris, app, app_data, g_size, [t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)
                        harrispipe(app_data)
    elif app_data['mode'] == 'tune':
        print("Tuning")
        auto_tune(app_data)
    else:
        create_lib(build_harris, app, app_data)
        _m = 10000000
        nsamples = 5
        for i in range(0, nsamples):
            _m = min(_m, harrispipe(app_data))
        print("[main] Minimum of averaged times across ", nsamples,
              "samples: ", _m, " ms")
    return
示例#6
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_campipe, app, app_data, g_size, [t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)
                        campipe(app_data)
    elif app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        # create shared lib
        create_lib(build_campipe, app, app_data)
        min_avg = 100000
        nsamples = 5
        print("[main] Benchmarking (%d samples)" % nsamples)
        for t in range(0, nsamples):
            # execute the compiled pipeline
            min_avg = min(min_avg, campipe(app_data))

        print("[main] Minimum of averaged times across ", nsamples,
              "samples: ", min_avg, " ms")

    return
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7, 9, 11, 200]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_interpolate, app, app_data, g_size,
                               [1, t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)
                        interpolate(app_data)
    elif app_data['mode'] == 'tune':
        pass
    else:
        create_lib(build_interpolate, app, app_data)
        _min_time = 10000
        for t in range(0, 5):
            _min_time = min(_min_time, interpolate(app_data))
        print("Minimum Time = ", _min_time)

    return
示例#8
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_campipe, app, app_data, g_size, [t1, t2])
                    for t in range (0, 0):
                        print ("Running for iteration #", t)
                        campipe(app_data)
    elif app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        # create shared lib
        create_lib(build_campipe, app, app_data)
        min_avg = 100000
        for t in range (0, 5):
            # execute the compiled pipeline
            min_avg = min (min_avg, campipe(app_data))
        
        print ("Minimum Average ", min_avg)

    return
示例#9
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7, 9, 11, 200]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_interpolate, app, app_data, g_size,
                               [1, t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)
                        interpolate(app_data)
    elif app_data['mode'] == 'tune':
        print("Tuning")
        auto_tune(app_data)
    else:
        create_lib(build_interpolate, app, app_data)
        min_avg = 10000
        nsamples = 5
        print("[main] Benchmarking (%d samples)" % nsamples)
        for t in range(0, nsamples):
            min_avg = min(min_avg, interpolate(app_data))

        print("[main] Minimum of averaged times across ", nsamples, "runs: ",
              min_avg, " ms")

    return
示例#10
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_bilateral, app, app_data, g_size,
                               [1, t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)
                        bilateralgrid(app_data)
    elif app_data['mode'] == 'tune':
        print("Tuning")
        auto_tune(app_data)
    else:
        create_lib(build_bilateral, app, app_data)
        min_avg = 10000
        # input ("wait to run amplxe " + str(os.getpid()))
        # input ("wwww")
        nsamples = 5
        print("[main] Benchmarking (%d samples)" % nsamples)
        for t in range(0, nsamples):
            min_avg = min(min_avg, bilateralgrid(app_data))
        print("[main] Minimum of averaged times across ", nsamples,
              "samples: ", min_avg, " ms")

    return
示例#11
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune+':
        for g_size in [3, 5, 7]:
            for t1 in [8, 16, 32, 64, 128, 256]:
                for t2 in [8, 16, 32, 64, 128, 256]:
                    create_lib(build_bilateral, app, app_data, g_size, [1, t1, t2])
                    for t in range (0, 0):
                        print ("Running for iteration #", t)
                        bilateralgrid(app_data)
    elif app_data['mode'] == 'tune':
        pass
    else:
        create_lib(build_bilateral, app, app_data)
        _min_time = 10000
        input ("wait to run amplxe " + str(os.getpid()))
        input ("wwww")
        for t in range(0, 5):
            _min_time = min (_min_time, bilateralgrid(app_data))
        print ("Minimum Time = ", _min_time)

    return
示例#12
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)
    if app_data['mode'] == 'tune' or app_data['mode'] == 'tune_execute':
        auto_tune(app_data)
        pass
    else:
        create_lib(build_pyramid, app, app_data)
        pyramid_blending(app_data)

    return
示例#13
0
文件: main.py 项目: bollu/polymage
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        create_lib(build_harris, app, app_data)
        harrispipe(app_data)

    return
示例#14
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        create_lib(build_harris, app, app_data)
        harrispipe(app_data)

    return
示例#15
0
文件: main.py 项目: bollu/polymage
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        #auto_tune(pipe_data,app_data)
        pass
    else:
        create_lib(build_bilateral, app, app_data)
        bilateralgrid(app_data)

    return
示例#16
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        #auto_tune(pipe_data,app_data)
        pass
    else:
        create_lib(build_maxfilter, app, app_data)
        maxfilter(app_data)

    return
示例#17
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        print("Tuning...")
        #auto_tune(app_data)
    else:
        create_lib(build_laplacian, app, app_data)
        for i in range(0, 5):
            laplacian(app_data)

    return
示例#18
0
文件: main.py 项目: bollu/polymage
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        # create shared lib
        create_lib(build_campipe, app, app_data)
        # execute the compiled pipeline
        campipe(app_data)

    return
示例#19
0
def main():
    print_header()

    app_data = {}
    app_data['ROOT'] = ROOT

    # init all the required data
    init_all(app_data)

    print_config(app_data)

    app_name = "nas_mg_class_"+app_data['prob_class']
    app_data['app'] = app_name
    if app_data['mode'] == 'tune':
        #app_tune(app_data)
        pass
    else:
        #-------------------------------------------------------------------
        # setting up residual norm computation
        create_lib(None, "norm", app_data)
        # setting up multigrid v-cycle computation
        create_lib(build_mg3p, app_name, app_data)
        # setting up standalone version of residual computation
        create_lib(build_resid, "resid", app_data)
        #-------------------------------------------------------------------
        init_norm(app_data)
        multigrid(app_data)
        verify_norm(app_data)
        #-------------------------------------------------------------------

    return
示例#20
0
def main():
    print_header()
    
    print("[main]: initializing...")
    print("")

    app_data = {}

    app_data['app'] = app
    app_data['app_name'] = app
    app_data['ROOT'] = ROOT

    init_all(app_data)
    print_config(app_data)
    if app_data['mode'] == 'tune':
        print("Tuning")
        auto_tune(app_data)
    else:
        create_lib(build_unsharp, app, app_data)
        unsharp_mask(app_data)

    return
示例#21
0
def main():
    print_header()

    print("[main]: initializing...")
    print("")

    app_data = {}

    app_data['app'] = app
    app_data['app_name'] = app
    app_data['ROOT'] = ROOT

    g_sizes = [3, 5, 7]
    tile_sizes = [8, 16, 32, 64]  #, 128, 256]

    init_all(app_data)
    print_config(app_data)
    if app_data['mode'] == 'tune+':
        for g_size in g_sizes:
            for t1 in tile_sizes:
                for t2 in tile_sizes:
                    create_lib(build_mfd, app, app_data, g_size, [1, t1, t2])
                    for t in range(0, 0):
                        print("Running for iteration #", t)

    elif app_data['mode'] == 'tune':
        print("Tuning")
        auto_tune(app_data)
    else:
        create_lib(build_mfd, app, app_data)
        min_avg = 100000
        nsamples = 5
        for i in range(0, nsamples):
            min_avg = min(min_avg, minifluxdiv(app_data))
        print("[main] Minimum of averaged times across ", nsamples,
              "samples: ", min_avg, " ms")

    return
示例#22
0
文件: main.py 项目: bollu/polymage
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    # init all the required data
    init_all(app_data)

    print_config(app_data)
    if app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        #-------------------------------------------------------------------
        create_lib(None, "norm", app_data)
        create_lib(build_mg_cycle, app_data['cycle_name'], app_data)
        #-------------------------------------------------------------------
        init_norm(app_data)
        multigrid(app_data)
        #-------------------------------------------------------------------

    return
示例#23
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    # init all the required data
    init_all(app_data)

    print_config(app_data)
    if app_data['mode'] == 'tune':
        auto_tune(app_data)
    else:
        #-------------------------------------------------------------------
        create_lib(None, "norm", app_data)
        create_lib(build_mg_cycle, app_data['cycle_name'], app_data)
        #-------------------------------------------------------------------
        init_norm(app_data)
        multigrid(app_data)
        #-------------------------------------------------------------------

    return
示例#24
0
def main():
    print_header()

    app_data = {}
    app_data['app'] = app
    app_data['ROOT'] = ROOT

    # init all the required data
    init_all(app_data)
    print_config(app_data)

    if app_data['mode'] == 'tune':
        print("Tuning...")
        auto_tune(app_data)
    else:
        #-------------------------------------------------------------------
        create_lib(None, "norm", app_data)
        create_lib(build_jacobi, app, app_data)
        #-------------------------------------------------------------------
        init_norm(app_data)
        exec_jacobi(app_data)
        #-------------------------------------------------------------------

    return