Skip to content

Conversation

davidhewitt
Copy link
Collaborator

Closes #209

Copy link

codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

codspeed-hq bot commented Jul 23, 2025

CodSpeed Performance Report

Merging #210 will not alter performance

Comparing dh/windows-arm-builds (32d89e0) with main (c6758ed)

Summary

✅ 70 untouched

@davidhewitt davidhewitt force-pushed the dh/windows-arm-builds branch from 38119dc to 24ec109 Compare July 23, 2025 12:26
@davidhewitt davidhewitt force-pushed the dh/windows-arm-builds branch from c62b2ff to 561bd7b Compare July 23, 2025 12:39
@jessekrubin
Copy link
Contributor

hi @davidhewitt,

I have a possibly stupid question...

I was poking around and have noticed that in this repo as well as others the pydantic-et-al team does "PGO" builds.

What/why is that? When should it be used? When should it not be used?

-jesse

@davidhewitt
Copy link
Collaborator Author

PGO is profile guided optimization. By running the test suite with special instrumentation the compiler can record the hot paths and then optimize the final artifact to make those as efficient as possible.

@davidhewitt
Copy link
Collaborator Author

On pydantic-core we saw up to 30% performance gains in benchmarks by enabling.

@MugundanMCW
Copy link

Hi @davidhewitt,

  • The wheel build is currently failing on windows-11-arm GA runners because the cachedir contains x64 Python installations, which causes linker conflicts.
  • I resolved this issue by explicitly removing all cached x64 Python variants before the build, which allowed the build to succeed. Here’s the step I added in CI:

        - name: Remove cached x64 Python for windows-11-arm
          if: matrix.os == 'windows-11-arm'
          run: Remove-Item -Recurse -Force "C:\hostedtoolcache\windows\Python\*\x64"
          shell: pwsh

  • Note: This issue only occurs on GitHub’s windows-11-arm runners. It does not happen on a local Windows ARM64 setup, since no x64 Python installations are present there.

@jessekrubin
Copy link
Contributor

Hi @davidhewitt!

Thanks for the explanation! Does that mean you are getting a build that is optimized for your test suite? Ie your test suite should ideally be representative of real world use cases?

How difficult is it to set up pgo builds?

@davidhewitt
Copy link
Collaborator Author

Does that mean you are getting a build that is optimized for your test suite? Ie your test suite should ideally be representative of real world use cases?

Yep exactly. The more comprehensive your test suite the better :)

How difficult is it to set up pgo builds?

At the moment, quite painful - the best examples are the build scripts here, in pydantic core, and also my discussion in PyO3/maturin#1840

@davidhewitt davidhewitt force-pushed the dh/windows-arm-builds branch from 32d89e0 to 9a378a2 Compare October 7, 2025 13:15
@davidhewitt davidhewitt changed the title ci: add (PGO) builds for windows 11 arm ci: add builds for windows 11 arm Oct 7, 2025
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.

Wheel for windows arm64
3 participants