2022-09-27 10:41:12 +08:00
|
|
|
from tokenize import Double
|
|
|
|
import pyinfinitensor # import getPerfConv, getPerfMatmul
|
|
|
|
|
|
|
|
|
2023-03-27 21:28:49 +08:00
|
|
|
# FIXME: change API from getPerfOpDevice(...) to getPerfOp(device='dev', ...)
|
|
|
|
def getPerfConvCuda(n, c, h, w, f, r, s, padh, padw, strideh, stridew, dilationh, dilationw, group, name=""):
|
|
|
|
return pyinfinitensor.getPerfConvCuda(n, c, h, w, f, r, s, padh, padw,
|
2022-10-07 16:03:11 +08:00
|
|
|
strideh, stridew, dilationh, dilationw, group, name)
|
2022-09-27 10:41:12 +08:00
|
|
|
|
|
|
|
|
2023-03-27 21:28:49 +08:00
|
|
|
def getPerfConvTransposed2dCuda(n, c, h, w, f, r, s, padh, padw, strideh, stridew, dilationh, dilationw, oph, opw, group):
|
|
|
|
return pyinfinitensor.getPerfConvTransposed2dCuda(n, c, h, w, f, r, s, padh, padw, strideh, stridew, dilationh, dilationw, oph, opw, group)
|
2022-09-27 10:41:12 +08:00
|
|
|
|
|
|
|
|
2023-03-27 21:28:49 +08:00
|
|
|
def getPerfMatmulCuda(b, m, n, k, name=""):
|
|
|
|
return pyinfinitensor.getPerfMatmulCuda(b, m, n, k, name)
|
|
|
|
|
|
|
|
|
|
|
|
def getPerfConvMkl(n, c, h, w, f, r, s, padh, padw, strideh, stridew, dilationh, dilationw, group, name=""):
|
|
|
|
return pyinfinitensor.getPerfConvMkl(n, c, h, w, f, r, s, padh, padw,
|
|
|
|
strideh, stridew, dilationh, dilationw, group)
|
|
|
|
|
|
|
|
|
|
|
|
def getPerfConvTransposed2dMkl(n, c, h, w, f, r, s, padh, padw, strideh, stridew, dilationh, dilationw, oph, opw, group):
|
|
|
|
return pyinfinitensor.getPerfConvTransposed2dMkl(n, c, h, w, f, r, s, padh, padw, strideh, stridew, dilationh, dilationw, oph, opw, group)
|
|
|
|
|
|
|
|
|
|
|
|
def getPerfMatmulMkl(b, m, n, k, name=""):
|
|
|
|
return pyinfinitensor.getPerfMatmulMkl(b, m, n, k)
|