コード例 #1
0
def load_tests(loader, tests, pattern):

    suite = SerialSuite()
    this_dir = dirname(__file__)

    if roc.is_available():
        suite.addTests(load_testsuite(loader, join(this_dir, 'hsadrv')))
        suite.addTests(load_testsuite(loader, join(this_dir, 'hsapy')))

    else:
        print("skipped HSA tests")
    return suite
コード例 #2
0
ファイル: __init__.py プロジェクト: EGQM/numba
def load_tests(loader, tests, pattern):

    suite = SerialSuite()
    this_dir = dirname(__file__)
    suite.addTests(load_testsuite(loader, join(this_dir, 'nocuda')))
    if cuda.is_available():
        gpus = cuda.list_devices()
        if gpus and gpus[0].compute_capability >= (2, 0):
            suite.addTests(load_testsuite(loader, join(this_dir, 'cudadrv')))
            suite.addTests(load_testsuite(loader, join(this_dir, 'cudapy')))
        else:
            print("skipped CUDA tests because GPU CC < 2.0")
    else:
        print("skipped CUDA tests")
    return suite
コード例 #3
0
def load_tests(loader, tests, pattern):
    suite = unittest.TestSuite()
    this_dir = dirname(__file__)
    suite.addTests(load_testsuite(loader, join(this_dir, "nocuda")))
    if cuda.is_available():
        suite.addTests(load_testsuite(loader, join(this_dir, "cudasim")))
        gpus = cuda.list_devices()
        if gpus and gpus[0].compute_capability >= (2, 0):
            suite.addTests(load_testsuite(loader, join(this_dir, "cudadrv")))
            suite.addTests(load_testsuite(loader, join(this_dir, "cudapy")))
        else:
            print("skipped CUDA tests because GPU CC < 2.0")
    else:
        print("skipped CUDA tests")
    return suite
コード例 #4
0
ファイル: __init__.py プロジェクト: Alexhuszagh/numba
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(load_testsuite(loader, dirname(__file__)))
    # Numba CUDA tests are located in a separate directory:
    cuda_dir = join(dirname(dirname(__file__)), 'cuda/tests')
    suite.addTests(loader.discover(cuda_dir))
    return suite
コード例 #5
0
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(load_testsuite(loader, dirname(__file__)))
    # Numba CUDA tests are located in a separate directory:
    cuda_dir = join(dirname(dirname(__file__)), 'cuda/tests')
    suite.addTests(loader.discover(cuda_dir))
    return suite
コード例 #6
0
ファイル: __init__.py プロジェクト: zhaijf1992/numba
def load_tests(loader, tests, pattern):
    suite = unittest.TestSuite()
    this_dir = dirname(__file__)
    ensure_supported_ccs_initialized()
    suite.addTests(load_testsuite(loader, join(this_dir, 'nocuda')))
    if cuda.is_available():
        suite.addTests(load_testsuite(loader, join(this_dir, 'cudasim')))
        gpus = cuda.list_devices()
        if gpus and gpus[0].compute_capability >= (2, 0):
            suite.addTests(load_testsuite(loader, join(this_dir, 'cudadrv')))
            suite.addTests(load_testsuite(loader, join(this_dir, 'cudapy')))
        else:
            print("skipped CUDA tests because GPU CC < 2.0")
    else:
        print("skipped CUDA tests")
    return suite
コード例 #7
0
def load_tests(loader, tests, pattern):
    suite = unittest.TestSuite()
    this_dir = dirname(__file__)
    suite.addTests(load_testsuite(loader, join(this_dir, 'nocuda')))
    if cuda.is_available():
        # Ensure that cudart.so is loaded and the list of supported compute
        # capabilities in the nvvm module is populated before a fork. This is
        # needed because some compilation tests don't require a CUDA context,
        # but do use NVVM to compile, and it is required that libcudart.so
        # should be loaded before a fork (note that the requirement is not
        # explicitly documented).
        cuda.cudadrv.nvvm.get_supported_ccs()
        suite.addTests(load_testsuite(loader, join(this_dir, 'cudasim')))
        gpus = cuda.list_devices()
        if gpus and gpus[0].compute_capability >= (2, 0):
            suite.addTests(load_testsuite(loader, join(this_dir, 'cudadrv')))
            suite.addTests(load_testsuite(loader, join(this_dir, 'cudapy')))
        else:
            print("skipped CUDA tests because GPU CC < 2.0")
    else:
        print("skipped CUDA tests")
    return suite
コード例 #8
0
def load_tests(loader, tests, pattern):
    return load_testsuite(loader, os.path.dirname(__file__))
コード例 #9
0
ファイル: __init__.py プロジェクト: MatthieuDartiailh/numba
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(load_testsuite(loader, dirname(__file__)))
    return suite
コード例 #10
0
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(load_testsuite(loader, dirname(__file__)))
    return suite
コード例 #11
0
ファイル: __init__.py プロジェクト: zhaijf1992/numba
def load_tests(loader, tests, pattern):
    ensure_supported_ccs_initialized()
    return load_testsuite(loader, os.path.dirname(__file__))
コード例 #12
0
ファイル: __init__.py プロジェクト: Alexhuszagh/numba
def load_tests(loader, tests, pattern):
    return SerialSuite(load_testsuite(loader, os.path.dirname(__file__)))