File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,32 @@ The list of supported by `mkl_random.RandomState` constructor `brng` keywords is
6868
6969---
7070
71+ # Patching Mechanisms
72+
73+ ` mkl_random ` provides a convenient programmatic patch method to enable MKL-accelerated random operations in NumPy.
74+
75+ ## Programmatic Quickstart
76+
77+ ``` python
78+ import mkl_random
79+ import numpy
80+
81+ mkl_random.patch_numpy_random()
82+ print (mkl_random.is_patched())
83+ # run your accelerated numpy workloads here!
84+ mkl_random.restore_numpy_random()
85+ ```
86+
87+ ``` python
88+ import mkl_random
89+ import numpy
90+ with mkl_random.mkl_random():
91+ # run your accelerated workloads here!
92+ pass
93+ ```
94+
95+ ---
96+
7197To build ` mkl_random ` from sources on Linux:
7298 - install a recent version of MKL, if necessary;
7399 - execute ` source /path_to_oneapi/mkl/latest/env/vars.sh ` ;
You can’t perform that action at this time.
0 commit comments