Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #4
0
 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()
Beispiel #5
0
 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)
Beispiel #7
0
 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)