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
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
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
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
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
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
def load_tests(loader, tests, pattern): return load_testsuite(loader, os.path.dirname(__file__))
def load_tests(loader, tests, pattern): suite = TestSuite() suite.addTests(load_testsuite(loader, dirname(__file__))) return suite
def load_tests(loader, tests, pattern): ensure_supported_ccs_initialized() return load_testsuite(loader, os.path.dirname(__file__))
def load_tests(loader, tests, pattern): return SerialSuite(load_testsuite(loader, os.path.dirname(__file__)))