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
ICC = 0
CALLREF=1
CALLATL=1
CALLFKO=1
CALLBLA=1
PROFILE=0
#PFLAGS = "-xP -O3 -mp1 -static"
#PFLAGS = "-xW -O3 -mp1 -static -Qoption,ld,-melf_i386 -Qoption,asm,--32"
PFLAGS = "-xW -O3 -mp1 -static"

# print 'l1atl = ', l1atl
for blas in l1routs:
   for pre in pres:
      if (CALLBLA != 0):
         [time,mf] = l1cmnd.time(ATLdir, ARCH, pre, blas, N, l1cblas[i], 
                                 opt=opt)
         assert(time > 0.0)
         print "CBL %20.20s : time=%f, mflop=%f" % (pre+l1cblas[i], time, mf)
         blaT.append(time)
         blaMF.append(mf)

      if (CALLREF != 0):
         [time,mf] = l1cmnd.time(ATLdir, ARCH, pre, blas, N, l1refs[i], opt=opt)
         assert(time > 0.0)
         print "REF %20.20s : time=%f, mflop=%f" % (pre+l1refs[i], time, mf)
         refT.append(time)
         refMF.append(mf)

         if ICC and PROFILE:
            [time,mf] = l1cmnd.time(ATLdir, ARCH, pre, blas, N, l1refs[i], 
                                    opt=opt, cc="iccprof", ccf=PFLAGS)
Beispiel #4
0
CALLATL = 1
CALLFKO = 1
CALLBLA = 1
PROFILE = 0
#PFLAGS = "-xP -O3 -mp1 -static"
#PFLAGS = "-xW -O3 -mp1 -static -Qoption,ld,-melf_i386 -Qoption,asm,--32"
PFLAGS = "-xW -O3 -mp1 -static"

# print 'l1atl = ', l1atl
for blas in l1routs:
    for pre in pres:
        if (CALLBLA != 0):
            [time, mf] = l1cmnd.time(ATLdir,
                                     ARCH,
                                     pre,
                                     blas,
                                     N,
                                     l1cblas[i],
                                     opt=opt)
            assert (time > 0.0)
            print "CBL %20.20s : time=%f, mflop=%f" % (pre + l1cblas[i], time,
                                                       mf)
            blaT.append(time)
            blaMF.append(mf)

        if (CALLREF != 0):
            [time, mf] = l1cmnd.time(ATLdir,
                                     ARCH,
                                     pre,
                                     blas,
                                     N,
Beispiel #5
0
nargs = len(sys.argv)
if nargs < 4:
   print 'USAGE: %s <pre> <blas> <file> [<N> <uopt> <TEST> <CC> <CCF>]' % sys.argv[0]
   sys.exit(1)

pre = sys.argv[1]
blas = sys.argv[2]
file = sys.argv[3]
if nargs > 4 :
   N = int(sys.argv[4])
   if nargs > 5 :
      TEST = int(sys.argv[5])
   if nargs > 6 :
      uopt = sys.argv[6]
      if nargs > 7 :
         CC = sys.argv[7]
         if nargs > 8 :
            CCF = 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
[t0,mf] = l1cmnd.time(ATLdir, ARCH, pre, blas, N, file, cc=CC, ccf=CCF, opt=opt)
if TEST:
   i = l1cmnd.test(ATLdir, ARCH, pre, blas, N, file, cc=CC, ccf=CCF, opt=teopt)
   if i : PF = "FAIL"
   else : PF = "PASS"
else : PF = "SKIP"
print "%s%s-%s : time=%e, mflop=%.2f -- %s" % (pre, blas, file, t0, mf, PF)