From d811139b92b1ceb5628b4dbc7197a7b035b47e78 Mon Sep 17 00:00:00 2001 From: Jordan Harlow <109105754+jharlow-intel@users.noreply.github.com> Date: Wed, 27 May 2026 08:17:34 -0600 Subject: [PATCH] chore: update README for patch method --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 5902d19a..57f260e4 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,31 @@ Where `` should be the latest version from https://software.repos --- +# Patching Mechanisms + +`mkl_umath` provides a convenient programmatic patch method to enable MKL-accelerated umath operations in NumPy. + +## Programmatic Quickstart + +```python +import mkl_umath +import numpy + +mkl_umath.patch_numpy_umath() +print(mkl_umath.is_patched()) +# run your accelerated numpy workloads here! +mkl_umath.restore_numpy_umath() +``` + +```python +import mkl_umath +import numpy +with mkl_umath.mkl_umath(): + # run your accelerated workloads here! + pass +``` +--- + ## Building Intel(R) C compiler and Intel(R) OneAPI Math Kernel Library (OneMKL) are required to build `mkl_umath` from source.