Skip to content
Snippets Groups Projects
Commit c37d7822 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Fix reference to 'dev.device_type' in pyopencl.characterize.

parent 0101210a
No related branches found
No related tags found
No related merge requests found
......@@ -97,13 +97,13 @@ def simultaneous_work_items_on_local_access(dev):
return 32
if dev.device_type == cl.device_type.GPU:
if dev.type == cl.device_type.GPU:
from warnings import warn
warn("wildly guessing conflicting local access size on '%s'"
% dev,
CLCharacterizationWarning)
return 16
elif dev.device_type == cl.device_type.CPU:
elif dev.type == cl.device_type.CPU:
return 1
else:
from warnings import warn
......@@ -140,13 +140,13 @@ def local_memory_bank_count(dev):
return 32
if dev.device_type == cl.device_type.GPU:
if dev.type == cl.device_type.GPU:
from warnings import warn
warn("wildly guessing conflicting local access size on '%s'"
% dev,
CLCharacterizationWarning)
return 16
elif dev.device_type == cl.device_type.CPU:
elif dev.type == cl.device_type.CPU:
return dev.local_mem_size / local_memory_access_granularity(dev)
else:
from warnings import warn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment