Skip to content

task: module CLI patching methods#319

Open
jharlow-intel wants to merge 1 commit intomasterfrom
task/SAT-8469
Open

task: module CLI patching methods#319
jharlow-intel wants to merge 1 commit intomasterfrom
task/SAT-8469

Conversation

@jharlow-intel
Copy link
Copy Markdown
Contributor

@jharlow-intel jharlow-intel commented May 8, 2026

adds python -m mkl_fft patch install/uninstall/status methods, and also python -m mkl_fft with_patch
Convenience 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

@jharlow-intel jharlow-intel self-assigned this May 8, 2026
Copilot AI review requested due to automatic review settings May 8, 2026 17:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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|status for persistent patch management via a .pth file.
  • 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.

Comment thread README.md
Comment thread mkl_fft/with_patch.py
Comment thread mkl_fft/with_patch.py
Comment thread mkl_fft/patch.py
Comment thread mkl_fft/patch.py
Comment thread mkl_fft/patch.py
Comment thread mkl_fft/patch.py
Comment thread mkl_fft/__main__.py
Comment thread README.md
Comment thread mkl_fft/__main__.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants