Exemple #1
0
def prepare_daal_threads(num_threads=-1):
    try:
        if num_threads > 0:
            set_daal_num_threads(num_threads)
        import daal4py
        num_threads = daal4py.num_threads()
    except ImportError:
        num_threads = 1

    return num_threads
Exemple #2
0
def prepare_daal(num_threads=-1):
    try:
        if num_threads > 0:
            set_daal_num_threads(num_threads)
        import daal4py
        num_threads = daal4py.num_threads()
        daal_version = daal4py._get__daal_run_version__()
    except ImportError:
        num_threads = 1
        daal_version = None

    return num_threads, daal_version