@@ -17,10 +17,10 @@ def tileInRange( tileMin, tileMax, rangeMin, rangeMax):
1717 valid = True
1818 else :
1919 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 ))
2424 return valid
2525
2626
@@ -159,15 +159,15 @@ def __init__( \
159159 ####################################
160160 # order
161161 for order in orderList :
162- #print precision + "gemm" + "_" + order
162+ #print( precision + "gemm" + "_" + order)
163163 kernel .order = order
164164 self .logic += indent (1 ) + "if (order == " + order + ") {\n "
165165 transList = transDict [precision ]
166166
167167 ####################################
168168 # transA
169169 for transA in transList :
170- #print precision + "gemm" + "_" + order + "_" + transA
170+ #print( precision + "gemm" + "_" + order + "_" + transA)
171171 kernel .transA = transA
172172 self .logic += indent (2 ) + "if (transA == "
173173 if transA == "N" :
@@ -194,7 +194,7 @@ def __init__( \
194194 ####################################
195195 # beta
196196 for beta in betaList :
197- #print precision + "gemm" + "_" + order + "_" + transA + "_" + transB + "_B" + str(beta)
197+ #print( precision + "gemm" + "_" + order + "_" + transA + "_" + transB + "_B" + str(beta) )
198198 kernel .beta = beta
199199 self .logic += indent (4 ) + "if ( "
200200 if beta == 0 :
@@ -212,7 +212,7 @@ def __init__( \
212212 fallbackTile = sizeEvent [1 ]
213213 validTiles = sizeEvent [2 ]
214214 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) )
216216
217217 ####################################
218218 # valid tiles
@@ -234,7 +234,7 @@ def __init__( \
234234 ####################################
235235 # fallback tile - TODO all tiles begin added
236236 self .logic += indent (6 )+ "// fallback tile\n "
237- #print "\nFallback[%i, %i]"%(sizeMin, sizeMax)
237+ #print( "\nFallback[%i, %i]"%(sizeMin, sizeMax) )
238238 kernel .workGroupNumRows = fallbackTile [0 ]
239239 kernel .workGroupNumCols = fallbackTile [1 ]
240240 kernel .microTileNumRows = fallbackTile [2 ]
@@ -387,7 +387,7 @@ def __init__(self):
387387 self .betaInitialized = False
388388
389389 def newPrecision (self , precision ):
390- #print "KernelSelectionSpecific: " + precision + "gemm"
390+ #print( "KernelSelectionSpecific: " + precision + "gemm")
391391 if self .precisionInitialized :
392392 self .logic += self .zeroIndent + self .tab + self .tab + "}\n " # 2 tabs
393393 self .logic += self .zeroIndent + self .tab + "}\n " # 1 tab
@@ -621,7 +621,7 @@ def writeToFile(self):
621621# Main
622622################################################################################
623623def writeKernelSelection ():
624- print "AutoGemm.py: Generating kernel selection."
624+ print ( "AutoGemm.py: Generating kernel selection." )
625625 if not os .path .exists ( Common .getIncludePath () ):
626626 os .makedirs ( Common .getIncludePath () )
627627
@@ -680,5 +680,4 @@ def writeKernelSelection():
680680 AutoGemmParameters .setArchitecture (sys .argv [2 ])
681681 writeKernelSelection ()
682682 else :
683- print "USAGE: python KernelSelection.py output_path architecture"
684-
683+ print ("USAGE: python KernelSelection.py output_path architecture" )
0 commit comments