Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Tools/cases_generator/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Uop:
properties: Properties
_size: int = -1
implicitly_created: bool = False
replicated = 0
replicated: int = 0
replicates: "Uop | None" = None
# Size of the instruction(s), only set for uops containing the INSTRUCTION_SIZE macro
instruction_size: int | None = None
Expand Down Expand Up @@ -866,6 +866,11 @@ def make_uop(
inputs: list[parser.InputEffect],
uops: dict[str, Uop],
) -> Uop:
replicated = 0
for anno in op.annotations:
if anno.startswith("replicate"):
replicated = int(anno[10:-1])
break
result = Uop(
name=name,
context=op.context,
Expand All @@ -875,12 +880,9 @@ def make_uop(
local_stores=find_variable_stores(op),
body=op.block,
properties=compute_properties(op),
replicated=replicated,
)
for anno in op.annotations:
if anno.startswith("replicate"):
result.replicated = int(anno[10:-1])
break
else:
if result.replicated == 0:
return result
for oparg in range(result.replicated):
name_x = name + "_" + str(oparg)
Expand Down
Loading