facebookresearch / spdl

Scalable and Performant Data Loading
BSD 2-Clause "Simplified" License
44 stars 2 forks source link

Revert "Merge SPDL_HOLD_GIL and NB_FREE_THREADED macro (#223)" #241

Closed mthrok closed 1 month ago

mthrok commented 1 month ago

This reverts commit fe21d111c8bd1f12777f6715b784ad7fbe690398.

In Python 3.13 there are three kinds of mode

  1. Built with GIL enabled
  2. Built with GIL disabled, executed with GIL enabled
  3. Built with GIL disabled, executed with GIL disabled

The runtime GIl is determined either by flag -Xgil, env var PYTHON_GIL, or whether a module complied with GIL enabled is imported or not.

So keeping a separate SPDL_HOLD_GIL option, allows to support all the build modes.

facebook-github-bot commented 1 month ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 month ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.