コード例 #1
0
ファイル: cmnd.py プロジェクト: leitao/math-atlas
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]
コード例 #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]
コード例 #3
0
ファイル: TestTime3.py プロジェクト: leitao/math-atlas
pre = sys.argv[1]
blas = sys.argv[2]
file = sys.argv[3]

if nargs > 4:
    NB = int(sys.argv[4])
    if nargs > 5:
        beta = int(sys.argv[5])
        if nargs > 6:
            TEST = sys.argv[6]
            if nargs > 7:
                uopt = sys.argv[7]

# 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 = l3cmnd.test(ATLdir, ARCH, pre, blas, NB, beta, file, cc=CC, ccf=CCF, opt=opt)
    # i = cmnd.test(ATLdir, ARCH, pre, blas, NB, 0, 0, file, cc=CC, ccf=CCF, opt=teopt)
    if i:
        PF = "FAIL"
    else:
        PF = "PASS"
        [t0, mf] = l3cmnd.time(ATLdir, ARCH, pre, blas, NB, beta, 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)
コード例 #4
0
ファイル: TestTime3.py プロジェクト: rdolbeau/math-atlas
t0 = -1
mf = -1
if TEST:
    i = l3cmnd.test(ATLdir,
                    ARCH,
                    pre,
                    blas,
                    NB,
                    beta,
                    file,
                    cc=CC,
                    ccf=CCF,
                    opt=opt)
    #i = cmnd.test(ATLdir, ARCH, pre, blas, NB, 0, 0, file, cc=CC, ccf=CCF, opt=teopt)
    if i: PF = "FAIL"
    else:
        PF = "PASS"
        [t0, mf] = l3cmnd.time(ATLdir,
                               ARCH,
                               pre,
                               blas,
                               NB,
                               beta,
                               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)