Skip to content
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

[shortfin] Fix issues with free threaded Python builds. #226

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

stellaraccident
Copy link
Contributor

@stellaraccident stellaraccident commented Sep 26, 2024

  • Fixes a method signature issue that manifested on 3.13 generally (not FT related).
  • Bumps nanobind to a recent HEAD commit to pick up free threaded support.
  • Adds nanobind option to enable free threading if building for a CPython with it enabled.
  • Adds a README stanza advising on how to acquire a free threaded CPython.
  • Makes fastapi tests skip if deps not met (not yet available / hard to install).
  • Adds an LSAN exclusion for something unrelated that has snuck in.
  • Sets FT CMAKE_BUILD_TYPE=Debug in the CI.

Note that on the large NUMA system I was testing on, the CPU test which creates an executor on each NUMA node for all processes exceeded the default file handle ulimit, requiring it to be increased. I assume that the FT CPython internally uses more synchronization handles and it just happened to go over budget. This resulted in fixing iree-org/iree#18609, which was causing an assert to be hit in this specific RESOURCE_EXHAUSTED scenario.

* Bumps nanobind to a recent HEAD commit to pick up free threaded support.
* Adds nanobind option to enable free threading if building for a CPython with it enabled.
* Adds a README stanza advising on how to acquire a free threaded CPython.
* Makes fastapi tests skip if deps not met (not yet available / hard to install).

Note that on the large NUMA system I was testing on, the CPU test which creates an executor on each NUMA node for all processes exceeded the default file handle ulimit, requiring it to be increased. I assume that the FT CPython internally uses more synchronization handles and it just happened to go over budget. This resulted in fixing iree-org/iree#18609, which was causing an assert to be hit in this specific RESOURCE_EXHAUSTED scenario.
@stellaraccident stellaraccident merged commit fe5af6b into main Sep 26, 2024
8 checks passed
@stellaraccident stellaraccident deleted the shortfin_py_free_threaded branch September 26, 2024 21:07
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