From c37d782290c906745227174b4254096bc73fd871 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 23 Jul 2011 15:27:40 -0500 Subject: [PATCH] Fix reference to 'dev.device_type' in pyopencl.characterize. --- pyopencl/characterize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyopencl/characterize.py b/pyopencl/characterize.py index 448dc339..8a7987e4 100644 --- a/pyopencl/characterize.py +++ b/pyopencl/characterize.py @@ -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 -- GitLab