- Timestamp:
- Mar 30, 2019 5:32:56 AM (6 years ago)
- Branches:
- master
- Children:
- 4688acf
- Parents:
- b9c432ac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/gpu_options.py
r104613f r4ecf91a 24 24 import sasmodels.model_test 25 25 import sasmodels.sasview_model 26 from sasmodels.generate import F32, F64 26 27 27 28 from sas.sasgui.guiframe.documentation_window import DocumentationWindow … … 257 258 #The same block of code as for OK but it is needed if we want to have 258 259 #active response to Test button 259 import numpy as np 260 260 261 no_opencl_msg = False 261 262 if self.sas_opencl: … … 270 271 try: 271 272 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) 273 ctx = env.context[F64].devices[0] 274 clinfo = ('64bit: ', ctx.platform.vendor, 275 ctx.platform.version, 276 ctx.vendor, 277 ctx.name, 278 ctx.version) 279 if F32 in env.context: 280 ctx32 = env.context[F32].devices[0] 281 if ctx32 != ctx: 282 clinfo += ('32bit: ', ctx32.platform.vendor, 283 ctx32.platform.version, 284 ctx32.vendor, 285 ctx32.name, 286 ctx32.version) 283 287 except Exception: 284 288 clinfo = None
Note: See TracChangeset
for help on using the changeset viewer.