ilp64 = offload = precision = flags = threshold = 0 sync = jit = 1 alpha = beta = 1 cacheline = 64 prefetch = -1 wrap = 1 malloc = -1 mnklist = list() # optional argument(s) if 2 < argc: ilp64 = int(sys.argv[2]) if 3 < argc: offload = int(sys.argv[3]) if 4 < argc: cacheline = libxsmm_utilities.sanitize_alignment(int(sys.argv[4])) if 5 < argc: precision = int(sys.argv[5]) if 6 < argc: prefetch = int(sys.argv[6]) if 7 < argc: threshold = int(sys.argv[7]) if 8 < argc: sync = int(sys.argv[8]) if 9 < argc: jit = int(sys.argv[9]) if 10 < argc: flags = int(sys.argv[10]) if 11 < argc: alpha = int(sys.argv[11]) if 12 < argc:
if __name__ == "__main__": argc = len(sys.argv) if (1 < argc): # required argument(s) filename = sys.argv[1] # optional argument(s) if (2 < argc): ilp64 = int(sys.argv[2]) else: ilp64 = 0 if (3 < argc): big = int(sys.argv[3]) else: big = 0 if (4 < argc): offload = int(sys.argv[4]) else: offload = 0 if (5 < argc): alignment = libxsmm_utilities.sanitize_alignment(int(sys.argv[5])) else: alignment = 64 if (6 < argc): prefetch = int(sys.argv[6]) else: prefetch = 0 if (7 < argc): threshold = int(sys.argv[7]) else: threshold = 0 if (8 < argc): sync = int(sys.argv[8]) else: sync = 0 if (9 < argc): jit = int(sys.argv[9]) else: jit = 0 if (10 < argc): flags = int(sys.argv[10]) else: flags = 0 if (11 < argc): alpha = int(sys.argv[11]) else: alpha = 1 if (12 < argc): beta = int(sys.argv[12]) else: beta = 1
# default configuration if no arguments are given ilp64 = offload = precision = flags = threshold = 0 sync = jit = 1 alpha = beta = 1 cacheline = 64 prefetch = -1 wrap = 1 mnklist = list() # optional argument(s) if (2 < argc): ilp64 = int(sys.argv[2]) if (3 < argc): offload = int(sys.argv[3]) if (4 < argc): cacheline = libxsmm_utilities.sanitize_alignment(int(sys.argv[4])) if (5 < argc): precision = int(sys.argv[5]) if (6 < argc): prefetch = int(sys.argv[6]) if (7 < argc): threshold = int(sys.argv[7]) if (8 < argc): sync = int(sys.argv[8]) if (9 < argc): jit = int(sys.argv[9]) if (10 < argc): flags = int(sys.argv[10]) if (11 < argc): alpha = int(sys.argv[11]) if (12 < argc):
############################################################################### from string import Template import libxsmm_utilities import sys, fnmatch if __name__ == "__main__": argc = len(sys.argv) if (1 < argc): # required argument(s) filename = sys.argv[1] # optional argument(s) precision = int(sys.argv[2]) if (2 < argc) else 0 ilp64 = int(sys.argv[3]) if (3 < argc) else 0 alignment = libxsmm_utilities.sanitize_alignment(int(sys.argv[4])) if (4 < argc) else 64 row_major = int(sys.argv[5]) if (5 < argc) else 0 prefetch = int(sys.argv[6]) if (6 < argc) else 0 threshold = int(sys.argv[7]) if (7 < argc) else 0 jit = int(sys.argv[8]) if (8 < argc) else 0 flags = int(sys.argv[9]) if (9 < argc) else 0 alpha = int(sys.argv[10]) if (10 < argc) else 1 beta = int(sys.argv[11]) if (11 < argc) else 1 mnklist = libxsmm_utilities.load_mnklist(sys.argv[12:], threshold) if (12 < argc) else list() template = Template(open(filename, "r").read()) maxmnk = libxsmm_utilities.max_mnk(mnklist, threshold) maxdim = int(maxmnk ** (1.0 / 3.0) + 0.5) avgdim = int(0.5 * maxdim + 0.5) avgm = libxsmm_utilities.median(list(map(lambda mnk: mnk[0], mnklist)), avgdim, False)
## Hans Pabst (Intel Corp.) ############################################################################### from string import Template import libxsmm_utilities import sys, fnmatch if __name__ == "__main__": argc = len(sys.argv) if (1 < argc): # required argument(s) filename = sys.argv[1] # optional argument(s) row_major = int(sys.argv[2]) if (2 < argc) else 0 alignment = libxsmm_utilities.sanitize_alignment(int(sys.argv[3])) if (3 < argc) else 64 aligned_stores = libxsmm_utilities.sanitize_alignment(int(sys.argv[4])) if (4 < argc) else 1 aligned_loads = libxsmm_utilities.sanitize_alignment(int(sys.argv[5])) if (5 < argc) else 1 prefetch = int(sys.argv[6]) if (6 < argc) else 0 jit = int(sys.argv[7]) if (7 < argc) else 0 threshold = int(sys.argv[8]) if (8 < argc) else 0 beta = int(sys.argv[9]) if (9 < argc) else 1 mnklist = libxsmm_utilities.load_mnklist(sys.argv[10:], 0, threshold) if (10 < argc) else list() template = Template(open(filename, "r").read()) maxmnk = libxsmm_utilities.max_mnk(mnklist, threshold) maxdim = int(maxmnk ** (1.0 / 3.0) + 0.5) avgdim = int(0.5 * maxdim + 0.5) avgm = libxsmm_utilities.median(map(lambda mnk: mnk[0], mnklist), avgdim, False) avgn = libxsmm_utilities.median(map(lambda mnk: mnk[1], mnklist), avgdim, False)
if __name__ == "__main__": argc = len(sys.argv) if (1 < argc): # required argument(s) filename = sys.argv[1] # optional argument(s) if (2 < argc): precision = int(sys.argv[2]) else: precision = 0 if (3 < argc): ilp64 = int(sys.argv[3]) else: ilp64 = 0 if (4 < argc): offload = int(sys.argv[4]) else: offload = 0 if (5 < argc): alignment = libxsmm_utilities.sanitize_alignment(int(sys.argv[5])) else: alignment = 64 if (6 < argc): prefetch = int(sys.argv[6]) else: prefetch = 0 if (7 < argc): threshold = int(sys.argv[7]) else: threshold = 0 if (8 < argc): sync = int(sys.argv[8]) else: sync = 0 if (9 < argc): jit = int(sys.argv[9]) else: jit = 0 if (10 < argc): flags = int(sys.argv[10]) else: flags = 0 if (11 < argc): alpha = int(sys.argv[11]) else: alpha = 1 if (12 < argc): beta = int(sys.argv[12]) else: beta = 1
## Hans Pabst (Intel Corp.) ############################################################################### from string import Template import libxsmm_utilities import sys, fnmatch if __name__ == "__main__": argc = len(sys.argv) if (1 < argc): # required argument(s) filename = sys.argv[1] # optional argument(s) precision = int(sys.argv[2]) if (2 < argc) else 0 ilp64 = int(sys.argv[3]) if (3 < argc) else 0 alignment = libxsmm_utilities.sanitize_alignment(int( sys.argv[4])) if (4 < argc) else 64 row_major = int(sys.argv[5]) if (5 < argc) else 0 prefetch = int(sys.argv[6]) if (6 < argc) else 0 threshold = int(sys.argv[7]) if (7 < argc) else 0 jit = int(sys.argv[8]) if (8 < argc) else 0 flags = int(sys.argv[9]) if (9 < argc) else 0 alpha = int(sys.argv[10]) if (10 < argc) else 1 beta = int(sys.argv[11]) if (11 < argc) else 1 mnklist = libxsmm_utilities.load_mnklist( sys.argv[12:], threshold) if (12 < argc) else list() template = Template(open(filename, "r").read()) maxmnk = libxsmm_utilities.max_mnk(mnklist, threshold) maxdim = int(maxmnk**(1.0 / 3.0) + 0.5) avgdim = int(0.5 * maxdim + 0.5)