@@ -17,10 +17,10 @@ def tileInRange( tileMin, tileMax, rangeMin, rangeMax):
17
17
valid = True
18
18
else :
19
19
valid = False
20
- #print "Range [%4ux%4u]: [%4u,%4u] is %s b/c" \
21
- # % (rangeMin, rangeMax, tileMin, tileMax, "valid" if valid else "INVALID" )
22
- #print "if ( %i<0 or (%u >= %u and %u>0) and %u <= %u" \
23
- # %( tileMax, tileMax, rangeMax, rangeMax, tileMin, rangeMin )
20
+ #print( "Range [%4ux%4u]: [%4u,%4u] is %s b/c" \
21
+ # % (rangeMin, rangeMax, tileMin, tileMax, "valid" if valid else "INVALID" ))
22
+ #print( "if ( %i<0 or (%u >= %u and %u>0) and %u <= %u" \
23
+ # %( tileMax, tileMax, rangeMax, rangeMax, tileMin, rangeMin ))
24
24
return valid
25
25
26
26
@@ -159,15 +159,15 @@ def __init__( \
159
159
####################################
160
160
# order
161
161
for order in orderList :
162
- #print precision + "gemm" + "_" + order
162
+ #print( precision + "gemm" + "_" + order)
163
163
kernel .order = order
164
164
self .logic += indent (1 ) + "if (order == " + order + ") {\n "
165
165
transList = transDict [precision ]
166
166
167
167
####################################
168
168
# transA
169
169
for transA in transList :
170
- #print precision + "gemm" + "_" + order + "_" + transA
170
+ #print( precision + "gemm" + "_" + order + "_" + transA)
171
171
kernel .transA = transA
172
172
self .logic += indent (2 ) + "if (transA == "
173
173
if transA == "N" :
@@ -194,7 +194,7 @@ def __init__( \
194
194
####################################
195
195
# beta
196
196
for beta in betaList :
197
- #print precision + "gemm" + "_" + order + "_" + transA + "_" + transB + "_B" + str(beta)
197
+ #print( precision + "gemm" + "_" + order + "_" + transA + "_" + transB + "_B" + str(beta) )
198
198
kernel .beta = beta
199
199
self .logic += indent (4 ) + "if ( "
200
200
if beta == 0 :
@@ -212,7 +212,7 @@ def __init__( \
212
212
fallbackTile = sizeEvent [1 ]
213
213
validTiles = sizeEvent [2 ]
214
214
self .logic += indent (5 )+ "if ( M*N >= " + str (sizeMin )+ "*" + str (sizeMin ) + ") {\n "
215
- #print precision + "gemm" + "_" + order + "_" + transA + "_" + transB + "_B" + str(beta) + "_" + str(sizeMin) + "->" + str(sizeMax)
215
+ #print( precision + "gemm" + "_" + order + "_" + transA + "_" + transB + "_B" + str(beta) + "_" + str(sizeMin) + "->" + str(sizeMax) )
216
216
217
217
####################################
218
218
# valid tiles
@@ -234,7 +234,7 @@ def __init__( \
234
234
####################################
235
235
# fallback tile - TODO all tiles begin added
236
236
self .logic += indent (6 )+ "// fallback tile\n "
237
- #print "\nFallback[%i, %i]"%(sizeMin, sizeMax)
237
+ #print( "\nFallback[%i, %i]"%(sizeMin, sizeMax) )
238
238
kernel .workGroupNumRows = fallbackTile [0 ]
239
239
kernel .workGroupNumCols = fallbackTile [1 ]
240
240
kernel .microTileNumRows = fallbackTile [2 ]
@@ -387,7 +387,7 @@ def __init__(self):
387
387
self .betaInitialized = False
388
388
389
389
def newPrecision (self , precision ):
390
- #print "KernelSelectionSpecific: " + precision + "gemm"
390
+ #print( "KernelSelectionSpecific: " + precision + "gemm")
391
391
if self .precisionInitialized :
392
392
self .logic += self .zeroIndent + self .tab + self .tab + "}\n " # 2 tabs
393
393
self .logic += self .zeroIndent + self .tab + "}\n " # 1 tab
@@ -621,7 +621,7 @@ def writeToFile(self):
621
621
# Main
622
622
################################################################################
623
623
def writeKernelSelection ():
624
- print "AutoGemm.py: Generating kernel selection."
624
+ print ( "AutoGemm.py: Generating kernel selection." )
625
625
if not os .path .exists ( Common .getIncludePath () ):
626
626
os .makedirs ( Common .getIncludePath () )
627
627
@@ -680,5 +680,4 @@ def writeKernelSelection():
680
680
AutoGemmParameters .setArchitecture (sys .argv [2 ])
681
681
writeKernelSelection ()
682
682
else :
683
- print "USAGE: python KernelSelection.py output_path architecture"
684
-
683
+ print ("USAGE: python KernelSelection.py output_path architecture" )
0 commit comments