Skip to content

Fix Uop.replicated definition in cases_generator/analyzer.py #134294

Open
@sobolevn

Description

@sobolevn

Bug report

It is now defined as:

And used as:

for anno in op.annotations:
if anno.startswith("replicate"):
result.replicated = int(anno[10:-1])
break
else:
return result

But, right now replicated is a class-level variable of a dataclass, because it does not have an annotation, see:

>>> from dataclasses import dataclass
>>> @dataclass
... class Uop:
...     replicated = 0
...     
>>> Uop(replicated=1)
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    Uop(replicated=1)
    ~~~^^^^^^^^^^^^^^
TypeError: Uop.__init__() got an unexpected keyword argument 'replicated'

I have a PR with the fix.

Refs 626c414

Linked PRs

Metadata

Metadata

Assignees

Labels

buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions