8000 fix linux PGO wheel build by davidhewitt · Pull Request #1557 · pydantic/pydantic-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix linux PGO wheel build #1557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 26, 2024
Merged

fix linux PGO wheel build #1557

merged 8 commits into from
Nov 26, 2024

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Changes CI to use the same PGO-optimized wheel build steps for both codspeed and release. I have a concern that the PGO step may not be working as intended; running the wheel through codspeed will be a good sanity check.

Related issue number

N/A

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Copy link
codspeed-hq bot commented Nov 26, 2024

CodSpeed Performance Report

Merging #1557 will not alter performance

Comparing dh/codspeed-wheel (e3d7857) with main (83ff1cf)

Summary

✅ 155 untouched benchmarks

@davidhewitt davidhewitt changed the title ci: reuse PGO wheel build for codspeed fix linux PGO wheel build Nov 26, 2024
@davidhewitt davidhewitt added the Full Build cause CI to do a full build label Nov 26, 2024
@davidhewitt davidhewitt marked this pull request as ready for review November 26, 2024 12:27
Copy link
Contributor Author
@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

The fact that this shows no perf diff is a good thing; this demonstrates that the PGO wheels are now correctly working.

(Previous commits on this branch did show a perf regression until the fix was added.)

Comment on lines +22 to +26
- name: prepare profiling directory
shell: bash
# making this ahead of the compile ensures that the local user can write to this
# directory; the maturin action (on linux) runs in docker so would create as root
run: mkdir -p ${{ github.workspace }}/profdata
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This turned out to be the critical change; as per the comment without this the linux jobs (which are built inside manylinux docker containers) were failing to write out their profiling information.

Copy link
Member

Choose a reason for hiding this comment

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

is there a way to build with "require profiling information" so build fails if it can't be found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The annoying thing is that the build already emits profiling information for the proc macros, so there will always be some. I'm also not sure of a way to enforce.

At least with the way CI is now set up, if the PGO breaks we will see codspeed regressions.

Copy link
Member
@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

looks good in principle to me.

Comment on lines +22 to +26
- name: prepare profiling directory
shell: bash
# making this ahead of the compile ensures that the local user can write to this
# directory; the maturin action (on linux) runs in docker so would create as root
run: mkdir -p ${{ github.workspace }}/profdata
Copy link
Member

Choose a reason for hiding this comment

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

is there a way to build with "require profiling information" so build fails if it can't be found?

@davidhewitt davidhewitt merged commit 49bcd51 into main Nov 26, 2024
29 checks passed
@davidhewitt davidhewitt deleted the dh/codspeed-wheel branch November 26, 2024 12:47
@davidhewitt davidhewitt added the backport-2.27 Needs backport to 2.27 label Dec 18, 2024
davidhewitt added a commit that referenced this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.27 Needs backport to 2.27 Full Build cause CI to do a full build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0