Skip to content

Conversation

alonme
Copy link
Contributor

@alonme alonme commented Nov 29, 2024

fix 'Uops Executed' display in summarize_stats.py and some type hints

return gc_stats

def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]:
def get_optimization_stats(self) -> dict[Doc, tuple[int, int | None]]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also unrelated, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is related, as the fix for the issue is to treat the value returned from this function as a doc and not a str, so it makes the patch clearer

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 18, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

),
Doc(
"Uops executed",
UOPS_EXECUTED_LABEL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? It only had two uses.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the code to work correctly the 2 instances must match - its not just any string, its used as an identifier.

Is there any con in moving to a const?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants