Skip to content

Python CPU test - basic scenario#4

Merged
r1viollet merged 3 commits intomainfrom
r1viollet/python_cpu
Aug 4, 2023
Merged

Python CPU test - basic scenario#4
r1viollet merged 3 commits intomainfrom
r1viollet/python_cpu

Conversation

@r1viollet
Copy link
Copy Markdown
Collaborator

@r1viollet r1viollet commented Aug 1, 2023

Description

When moving to the docker implementation of tests, we removed the python test.
This adds it back in.

Naming adjustment: ensure we explicitly have the unit in the EXECUTION_TIME_SEC variable.

Comment thread scenarios/python_cpu/expected_profile.json
Comment thread scenarios/python_cpu/Dockerfile
Comment thread scenarios/python_cpu/expected_profile.json
Comment thread scenarios/python_cpu/expected_profile.json
Comment thread scenarios/python_cpu/main.py Outdated
while time() < end:
a()
b()
print(x)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I assume this is needed to avoid the compiler optimizing away the writes to x?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, locals would be optimized without a usage in more recent python versions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Might want to add a comment explaining this.

Copy link
Copy Markdown

@danielsn danielsn left a comment

Choose a reason for hiding this comment

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

Its nice to have a test for this. I had a minor ⛏️ about commenting the need for the print(x) but otherwise LGTM.

@r1viollet r1viollet merged commit 85c6537 into main Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants