Changeset 104613f in sasview for src/sas/sasgui
- Timestamp:
- Mar 29, 2019 1:16:28 PM (6 years ago)
- Branches:
- master
- Children:
- b9c432ac
- Parents:
- 09d7021
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/gpu_options.py
r895703d r104613f 257 257 #The same block of code as for OK but it is needed if we want to have 258 258 #active response to Test button 259 import numpy as np 259 260 no_opencl_msg = False 260 261 if self.sas_opencl: … … 269 270 try: 270 271 env = sasmodels.kernelcl.environment() 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] 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) 277 283 except Exception: 278 284 clinfo = None
Note: See TracChangeset
for help on using the changeset viewer.