def newthread(exception_queue): try: devices = range(driver.get_device_count()) for _ in range(2): for d in devices: cuda.select_device(d) cuda.close() except Exception as e: exception_queue.put(e)
def newthread(): devices = range(driver.get_device_count()) print('Devices', devices) for _ in range(2): for d in devices: cuda.select_device(d) print('Selected device', d) cuda.close() print('Closed device', d)
def newthread(exception_queue): try: devices = range(driver.get_device_count()) for _ in range(2): for d in devices: cuda.select_device(d) cuda.close() except Exception as e: exception_queue.put(e)
def setUp(self): self.assertTrue(driver.get_device_count()) device = driver.get_device() ccmajor, _ = device.compute_capability if ccmajor >= 2: self.ptx = ptx2 else: self.ptx = ptx1 self.context = device.get_or_create_context()
def setUp(self): self.assertTrue(driver.get_device_count()) device = driver.get_device() ccmajor, _ = device.compute_capability if ccmajor >= 2: self.ptx = ptx2 else: self.ptx = ptx1 self.context = device.get_or_create_context()
def newthread(): devices = range(driver.get_device_count()) print('Devices', devices) for _ in range(2): for d in devices: cuda.select_device(d) print('Selected device', d) cuda.close() print('Closed device', d)
def newthread(exception_queue): try: devices = range(driver.get_device_count()) print('Devices', devices) for _ in range(2): for d in devices: cuda.select_device(d) print('Selected device', d) cuda.close() print('Closed device', d) except Exception as e: exception_queue.put(e)
def newthread(exception_queue): try: devices = range(driver.get_device_count()) print('Devices', devices) for _ in range(2): for d in devices: cuda.select_device(d) print('Selected device', d) cuda.close() print('Closed device', d) except Exception as e: exception_queue.put(e)