Exemple #1
0
def get_exe_cmd(ex, nodist, nostream):
    if os.path.dirname(ex).endswith("sycl"):
        if not sycl_extention_available:
            return None
        if not check_version(req_version["sycl/" + os.path.basename(ex)],
                             get_daal_version()):
            return None
        if not check_device(req_device["sycl/" + os.path.basename(ex)],
                            availabe_devices):
            return None
        if not check_os(req_os["sycl/" + os.path.basename(ex)], system_os):
            return None

    if os.path.dirname(ex).endswith("examples"):
        if not check_version(req_version[os.path.basename(ex)],
                             get_daal_version()):
            return None
        if not check_library(req_library[os.path.basename(ex)]):
            return None
    if any(ex.endswith(x) for x in ['batch.py', 'stream.py']):
        return '"' + sys.executable + '" "' + ex + '"'
    if not nostream and ex.endswith('streaming.py'):
        return '"' + sys.executable + '" "' + ex + '"'
    if not nodist and ex.endswith('spmd.py'):
        if IS_WIN:
            return 'mpiexec -localonly -n 4 "' + sys.executable + '" "' + ex + '"'
        return 'mpirun -n 4 "' + sys.executable + '" "' + ex + '"'
    return None
Exemple #2
0
import os
import struct
import subprocess
import sys

from daal4py import __has_dist__
from daal4py.sklearn._utils import get_daal_version
from os.path import join as jp
from time import gmtime, strftime
from collections import defaultdict

print('Starting examples validation')
# First item is major version - 2021,
# second is minor+patch - 0110,
# third item is status - B
print('DAAL version:', get_daal_version())

exdir = os.path.dirname(os.path.realpath(__file__))

IS_WIN = False
IS_MAC = False
IS_LIN = False
system_os = "not_supported"
if 'linux' in sys.platform:
    IS_LIN = True
    system_os = "lnx"
elif sys.platform == 'darwin':
    IS_MAC = True
    system_os = "mac"
elif sys.platform in ['win32', 'cygwin']:
    IS_WIN = True