-
Notifications
You must be signed in to change notification settings - Fork 52
Use config-settings instead of env vars for acceleration compilation and wheel repair options #131
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks a lot @lxe for the PR! The PEP 517 implementation and config-settings approach make sense. |
|
Checking this out |
but then |
|
Looks like all the macos jobs are failing https://github.com/absadiki/pywhispercpp/actions/runs/17462051185/job/49588808069 This is because it's detecting CPU without GGML_MACHINE_SUPPORTS_i8mm support when compiling ggml. Something recently changed in the github action worker executors? |
|
The last successful one was https://github.com/absadiki/pywhispercpp/actions/runs/17568832696/job/50100390553?pr=131 And it's using Xcode 15 instead of 16... maybe that's the difference? I'm not sure , I don't have a mac to test this on |
|
I don’t have a Mac either, so I’m relying on GitHub Actions 😅. Could you please pull the latest commits from main so we can run CI with your PR? |
- Implement custom PEP 517 build backend to handle acceleration options
- Support CUDA, CoreML, Vulkan, OpenBLAS, and OpenVINO via --config-settings
- Usage: pip install . --config-settings="accel=cuda" or uv add . -Caccel=cuda
- Add wheel repair control via config-settings (repair=false to disable)
- Improve CMake build robustness:
- Clean corrupted CMake cache files automatically
- Filter environment variables to only pass safe, relevant ones
- Add alternative Python executable setting for better compatibility
- Update README with unified hardware acceleration documentation
- Remove legacy environment variable approach in favor of config-settings
Done! cc @absadiki |
|
Thanks a lot @lxe, the CI now passes cleanly, and the PEP 517 backend approach looks solid. However, I don’t see a reason for forcing the user to a limited "safe_env_vars" set. For example, I tried building with CUDA support, and, for some reason, CMake wasn’t able to detect my GPU architecture. I had to use CMAKE_CUDA_ARCHITECTURES as per the docs, but it never got applied because it wasn’t in safe_env_vars. So I’d suggest to:
This would make the backend more flexible and fully respect user-provided build options. while also supporting caching front-ends such as uv. what do you think ? |
Implement a PEP 517 build backend to handle acceleration and wheel repair options via
--config-settingsinstead of relying on env variables. This works much better with caching front-ends such as uv.Usage:
pip install . --config-settings="accel=cuda"oruv add . -Caccel=cuda