How to use the mkl.domain_set_num_threads function in mkl

To help you get started, we’ve selected a few mkl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IntelPython / mkl_fft / mkl_fft / _scipy_fft_backend.py View on Github external
def __exit__(self, *args):
        # restore default
        max_num_threads = mkl.domain_get_max_threads(domain='fft')
        mkl.domain_set_num_threads(max_num_threads, domain='fft')
github IntelPython / mkl_fft / mkl_fft / _scipy_fft_backend.py View on Github external
def __enter__(self):
        try:
            mkl.domain_set_num_threads(self.n_threads, domain='fft')
        except:
            raise ValueError("Class argument {} result in invalid number of threads {}".format(self.workers, self.n_threads))

mkl

Intel® oneAPI Math Kernel Library

MPL-2.0
Latest version published 24 days ago

Package Health Score

64 / 100
Full package analysis