task: module CLI patching methods#319
Open
jharlow-intel wants to merge 1 commit intomasterfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a user-facing CLI for enabling/disabling mkl_fft’s NumPy FFT patch, aiming to support both persistent patching (python -m mkl_fft patch ...) and one-shot execution (python -m mkl_fft with_patch ...) alongside updated README guidance.
Changes:
- Introduces
python -m mkl_fft patch install|uninstall|statusfor persistent patch management via a.pthfile. - Introduces
python -m mkl_fft with_patch <command> ...intended to run a single command with temporary patching. - Adds README documentation and unit tests for the persistent patch helper functions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents persistent patching, one-shot execution, and programmatic patch APIs. |
| mkl_fft/main.py | Adds python -m mkl_fft ... dispatcher for patch and with_patch subcommands. |
| mkl_fft/patch.py | Implements persistent patch install/uninstall/status via writing/removing a .pth file. |
| mkl_fft/with_patch.py | Implements “one-shot” patch execution by spawning a subprocess with modified environment. |
| mkl_fft/tests/test_cli.py | Adds tests for install_patch, uninstall_patch, and check_status using a mocked .pth path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds
python -m mkl_fft patch install/uninstall/statusmethods, and alsopython -m mkl_fft with_patchConvenience CLI functions that will make it way easier to let users have automagic mkl_fft optimizations in their workflows, such as if they want to run npbench suites but with mkl_fft optimizations.
Tested locally pretty exhaustively, everything worked pretty well. A lot of documentation is claude code and it was way too verbose. I deleted and edited a lot of it, but please take a look at it all and make sure it's correct.
If this gets merged, I'll do the same for mkl_random and mkl_umath