Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Open
@sobolevn

Description

@sobolevn
Issue body actions

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-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.