pyinstaller / pyinstaller-hooks-contrib

Community maintained hooks for PyInstaller.
Other
96 stars 126 forks source link

hooks: torch: add support for MKL-enabled torch builds #713

Closed rokm closed 8 months ago

rokm commented 8 months ago

Add support for MKL-enabled torch builds on Windows (e.g., the nightly 2.3.0.dev20240308+cpu build). The torch hook now attempts to discover and collect DLLs from MKL and its dependencies (mkl, tbb, intel-openmp).

This should prevent frozen program from silently crashing due to missing MKL DLLs, which slip past PyInstaller's binary dependency analysis due to being dynamically loaded at run time.

Closes pyinstaller/pyinstaller#8348.

rokm commented 8 months ago

Who doesn't want an extra half a gigabyte added to their application's footprint... 🙄

A small price to pay for CPU-powered (or Intel GPU-powered, presumably) chatbots being faster at spewing inaccuracies...