@@ -55,24 +55,11 @@ def __init__(
5555 self .stride_support = stride_support
5656 self .swizzling_functor = swizzling_functor
5757
58- #
59- def is_complex (self ):
60- complex_operators = [
61- MathOperation .multiply_add_complex ,
62- MathOperation .multiply_add_complex_gaussian ,
63- ]
64- return self .tile_description .math_instruction .math_operation in complex_operators
6558
66- #
6759 def accumulator_type (self ):
68- accum = self .tile_description .math_instruction .element_accumulator
60+ return self .tile_description .math_instruction .element_accumulator
6961
70- if self .is_complex ():
71- return get_complex_from_real (accum )
7262
73- return accum
74-
75- #
7663 def core_name (self ):
7764 """ The basic operation kind is prefixed with a letter indicating the accumulation type. """
7865
@@ -112,7 +99,7 @@ def extended_name(self):
11299 else :
113100 extended_name = "${core_name}"
114101
115- extended_name = SubstituteTemplate (
102+ extended_name = substitute_template (
116103 extended_name ,
117104 {
118105 "element_a" : DataTypeNames [self .A .element ],
@@ -145,7 +132,7 @@ def configuration_name(self):
145132 else :
146133 configuration_name = "cutlass_${opcode_class}_${extended_name}_${threadblock}_${layout}_align${alignment}"
147134
148- return SubstituteTemplate (
135+ return substitute_template (
149136 configuration_name ,
150137 {
151138 "opcode_class" : opcode_class_name ,
@@ -258,14 +245,12 @@ def emit(self, operation):
258245 operation .iterator_algorithm
259246 ].capitalize (),
260247 "stride_support" : StrideSupportTag [operation .stride_support ],
261- "math_operator" : "cutlass::arch::OpMultiplyAddComplex"
262- if operation .is_complex ()
263- else MathOperationTag [operation .tile_description .math_instruction .math_operation ],
248+ "math_operator" : MathOperationTag [operation .tile_description .math_instruction .math_operation ],
264249 "align_a" : str (operation .A .alignment ),
265250 "align_b" : str (operation .B .alignment ),
266251 }
267252
268- return SubstituteTemplate (self .template , values )
253+ return substitute_template (self .template , values )
269254
270255
271256class EmitConv2dConfigurationLibrary :
@@ -340,7 +325,7 @@ def __init__(self, operation_path, configuration_name):
340325 def __enter__ (self ):
341326 self .configuration_file = open (self .configuration_path , "w" )
342327 self .configuration_file .write (
343- SubstituteTemplate (
328+ substitute_template (
344329 self .header_template , {"configuration_name" : self .configuration_name }
345330 )
346331 )
@@ -351,7 +336,7 @@ def __enter__(self):
351336 def emit (self , operation ):
352337 self .operations .append (operation )
353338 self .configuration_file .write (
354- SubstituteTemplate (
339+ substitute_template (
355340 self .instance_template ,
356341 {
357342 "configuration_name" : self .configuration_name ,
@@ -365,14 +350,14 @@ def emit(self, operation):
365350 def __exit__ (self , exception_type , exception_value , traceback ):
366351
367352 self .configuration_file .write (
368- SubstituteTemplate (
353+ substitute_template (
369354 self .configuration_header , {"configuration_name" : self .configuration_name }
370355 )
371356 )
372357
373358 for operation in self .operations :
374359 self .configuration_file .write (
375- SubstituteTemplate (
360+ substitute_template (
376361 self .configuration_instance ,
377362 {
378363 "configuration_name" : self .configuration_name ,
0 commit comments