OpenCL PoW fix
- previous commit created some problems, now it should work
This commit is contained in:
parent
8d829b587e
commit
9263f53d86
|
@ -26,12 +26,11 @@ except:
|
||||||
libAvailable = False
|
libAvailable = False
|
||||||
|
|
||||||
def initCL():
|
def initCL():
|
||||||
global ctx, queue, program, enabledGpus, hash_dt, vendors
|
global ctx, queue, program, hash_dt
|
||||||
gpus = []
|
del enabledGpus[:]
|
||||||
|
del vendors[:]
|
||||||
|
del gpus[:]
|
||||||
ctx = False
|
ctx = False
|
||||||
enabledGpus = []
|
|
||||||
vendors = []
|
|
||||||
hash_dt = None
|
|
||||||
try:
|
try:
|
||||||
hash_dt = numpy.dtype([('target', numpy.uint64), ('v', numpy.str_, 73)])
|
hash_dt = numpy.dtype([('target', numpy.uint64), ('v', numpy.str_, 73)])
|
||||||
try:
|
try:
|
||||||
|
@ -52,10 +51,10 @@ def initCL():
|
||||||
logger.info("Loaded OpenCL kernel")
|
logger.info("Loaded OpenCL kernel")
|
||||||
else:
|
else:
|
||||||
logger.info("No OpenCL GPUs found")
|
logger.info("No OpenCL GPUs found")
|
||||||
enabledGpus = []
|
del enabledGpus[:]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("OpenCL fail: ", exc_info=True)
|
logger.error("OpenCL fail: ", exc_info=True)
|
||||||
enabledGpus = []
|
del enabledGpus[:]
|
||||||
|
|
||||||
def openclAvailable():
|
def openclAvailable():
|
||||||
return (len(gpus) > 0)
|
return (len(gpus) > 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user