File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ class Uop:
182
182
properties : Properties
183
183
_size : int = - 1
184
184
implicitly_created : bool = False
185
- replicated = 0
185
+ replicated : int = 0
186
186
replicates : "Uop | None" = None
187
187
# Size of the instruction(s), only set for uops containing the INSTRUCTION_SIZE macro
188
188
instruction_size : int | None = None
@@ -866,6 +866,11 @@ def make_uop(
866
866
inputs : list [parser .InputEffect ],
867
867
uops : dict [str , Uop ],
868
868
) -> Uop :
869
+ replicated = 0
870
+ for anno in op .annotations :
871
+ if anno .startswith ("replicate" ):
872
+ replicated = int (anno [10 :- 1 ])
873
+ break
869
874
result = Uop (
870
875
name = name ,
871
876
context = op .context ,
@@ -875,12 +880,9 @@ def make_uop(
875
880
local_stores = find_variable_stores (op ),
876
881
body = op .block ,
877
882
properties = compute_properties (op ),
883
+ replicated = replicated ,
878
884
)
879
- for anno in op .annotations :
880
- if anno .startswith ("replicate" ):
881
- result .replicated = int (anno [10 :- 1 ])
882
- break
883
- else :
885
+ if result .replicated == 0 :
884
886
return result
885
887
for oparg in range (result .replicated ):
886
888
name_x = name + "_" + str (oparg )
You can’t perform that action at this time.
0 commit comments