Changeset b297ba9 in sasmodels for sasmodels/kernelcuda.py
- Timestamp:
- Mar 20, 2019 7:03:50 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4e28511
- Parents:
- 0d362b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcuda.py
rfa26e78 rb297ba9 59 59 60 60 import os 61 import warnings62 61 import logging 63 62 import time … … 110 109 111 110 def use_cuda(): 111 # type: None -> bool 112 """Returns True if CUDA is the default compute engine.""" 112 113 sas_opencl = os.environ.get("SAS_OPENCL", "CUDA").lower() 113 114 return HAVE_CUDA and sas_opencl.startswith("cuda") … … 136 137 if not HAVE_CUDA: 137 138 raise RuntimeError("CUDA startup failed with ***" 138 + CUDA_ERROR + "***; using C compiler instead")139 + CUDA_ERROR + "***; using C compiler instead") 139 140 reset_environment() 140 141 if ENV is None: … … 198 199 """ 199 200 for match in FUNCTION_PATTERN.finditer(source): 200 print(match.group('qualifiers').replace('\n',r'\n'), match.group('function'), '(') 201 print(match.group('qualifiers').replace('\n', r'\n'), 202 match.group('function'), '(') 201 203 return source 202 204 … … 260 262 261 263 def release(self): 264 """Free the CUDA device associated with this context.""" 262 265 if self.context is not None: 263 266 self.context.pop()
Note: See TracChangeset
for help on using the changeset viewer.