Changes in / [b9c432ac:332c10d] in sasview


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/gpu_options.py

    r104613f r895703d  
    257257        #The same block of code as for OK but it is needed if we want to have 
    258258        #active response to Test button 
    259         import numpy as np 
    260259        no_opencl_msg = False 
    261260        if self.sas_opencl: 
     
    270269        try: 
    271270            env = sasmodels.kernelcl.environment() 
    272             dtype64 = np.dtype('float64') 
    273             dtype32 = np.dtype('float32') 
    274             if dtype64 in env.context: 
    275                 ctx = env.context[dtype64].devices[0] 
    276             else: 
    277                 ctx = env.context[dtype32].devices[0] 
    278             clinfo = (ctx.platform.vendor, 
    279                         ctx.platform.version, 
    280                         ctx.vendor, 
    281                         ctx.name, 
    282                         ctx.version) 
     271            clinfo = [(ctx.devices[0].platform.vendor, 
     272                       ctx.devices[0].platform.version, 
     273                       ctx.devices[0].vendor, 
     274                       ctx.devices[0].name, 
     275                       ctx.devices[0].version) 
     276                      for ctx in env.context] 
    283277        except Exception: 
    284278            clinfo = None 
Note: See TracChangeset for help on using the changeset viewer.