Beispiel #1
0
def time(ATLdir, ARCH, pre, blas, N, M, lda, rout, cc=None, ccf=None, opt=""):
    
    l1blas = kernels.GetFKOlevel1Blas()
    l2blas = kernels.GetLevel2Blas()
    l3blas = kernels.GetLevel3Blas()
   
    if blas in l1blas:
        return l1cmnd.time(ATLdir, ARCH, pre, blas, N, rout, cc, ccf, opt)
    elif blas in l2blas:
        return l2cmnd.time(ATLdir, ARCH, pre, blas, N, M, lda, rout, cc, ccf, opt)
    elif blas in l3blas:
        return l3cmnd.time(ATLdir, ARCH, pre, blas, N, 1, rout, cc, ccf, opt)
    elif blas in kernels.GetAllFKOGEMM():
        return l3cmnd.time(ATLdir, ARCH, pre, blas, N, 1, rout, cc, ccf, opt)
    else:
        print "UNKNOWN KERNEL [FOR CMND] !!! "
        return [-1, -1]
Beispiel #2
0
def time(ATLdir, ARCH, pre, blas, N, M, lda, rout, cc=None, ccf=None, opt=""):

    l1blas = kernels.GetFKOlevel1Blas()
    l2blas = kernels.GetLevel2Blas()
    l3blas = kernels.GetLevel3Blas()

    if blas in l1blas:
        return l1cmnd.time(ATLdir, ARCH, pre, blas, N, rout, cc, ccf, opt)
    elif blas in l2blas:
        return l2cmnd.time(ATLdir, ARCH, pre, blas, N, M, lda, rout, cc, ccf,
                           opt)
    elif blas in l3blas:
        return l3cmnd.time(ATLdir, ARCH, pre, blas, N, 1, rout, cc, ccf, opt)
    elif blas in kernels.GetAllFKOGEMM():
        return l3cmnd.time(ATLdir, ARCH, pre, blas, N, 1, rout, cc, ccf, opt)
    else:
        print "UNKNOWN KERNEL [FOR CMND] !!! "
        return [-1, -1]
Beispiel #3
0
mf = -1
if TEST:
    i = l2cmnd.test(ATLdir,
                    ARCH,
                    pre,
                    blas,
                    N,
                    M,
                    lda,
                    file,
                    cc=CC,
                    ccf=CCF,
                    opt=opt)
    if i: PF = "FAIL"
    else:
        PF = "PASS"
        [t0, mf] = l2cmnd.time(ATLdir,
                               ARCH,
                               pre,
                               blas,
                               N,
                               M,
                               lda,
                               file,
                               cc=CC,
                               ccf=CCF,
                               opt=opt)
else:
    PF = "SKIP"
print "%s%s-%s: time=%e, mflop=%.2f -- %s " % (pre, blas, file, t0, mf, PF)
Beispiel #4
0
pre = sys.argv[1]
blas = sys.argv[2]
file = sys.argv[3]
if nargs > 4:
    N = int(sys.argv[4])
    if nargs > 5:
        M = int(sys.argv[5])
        if nargs > 6:
            lda = int(sys.argv[6])
            if nargs > 7:
                TEST = sys.argv[7]
                if nargs > 8:
                    uopt = sys.argv[8]

# opt = "-X 1 -Y 1 " + uopt
# opt = "-X 1 -Y 1 -Fx 16 -Fy 16 " + uopt
# opt = "-X 1 -Y 1 -Fx 32 -Fy 32 " + uopt
opt = uopt
t0 = -1
mf = -1
if TEST:
    i = l2cmnd.test(ATLdir, ARCH, pre, blas, N, M, lda, file, cc=CC, ccf=CCF, opt=opt)
    if i:
        PF = "FAIL"
    else:
        PF = "PASS"
        [t0, mf] = l2cmnd.time(ATLdir, ARCH, pre, blas, N, M, lda, file, cc=CC, ccf=CCF, opt=opt)
else:
    PF = "SKIP"
print "%s%s-%s: time=%e, mflop=%.2f -- %s " % (pre, blas, file, t0, mf, PF)