GPU Selection works when len(answers)>ngpus
Fixes TypeError: sequence item 0: expected str instance, int found
triggered by
in pyopencl v2020.2.2
MODIFY
tinygrad/tensor.py
tinygrad/tensor.py
@@ -15,8 +15,8 @@ def require_init_gpu():
try:
# for Macbook 16 inch
cl_ctx = cl.create_some_context(answers=[0,2])
- except cl._cl.RuntimeError:
- cl_ctx = cl.create_some_context(answers=[0,0])
+ except (cl._cl.RuntimeError, TypeError):
+ cl_ctx = cl.create_some_context(interactive=False)
cl_queue = cl.CommandQueue(cl_ctx)
# **** start with two base classes ****

GPU Selection works when len(answers)>ngpus (#64)

Fixes TypeError: sequence item 0: expected str instance, int found
triggered by https://github.com/inducer/pyopencl/blob/v2020.2.2/pyopencl/__init__.py#L1500
in pyopencl v2020.2.2