Dear Max, AMD does not enable double precision support in OpenCL kernels by default. Instead you need to add
#pragma OPENCL EXTENSION cl_amd_fp64 : enable to your kernel. This should work on the CPU but it will break the compilation on your GPU since it doesn't support double precision as far as I know. Jan On Thu, Aug 4, 2011 at 1:19 AM, M.Gelman <[email protected]> wrote: > Thanks for your suggestion. I was able to fix it by copying the > libOpenCL.so provided by the ati stream sdk to /usr/lib. > > However, running the benchmark-all.py. I get the following errors about a > "double" type not enabled. It looks to me like everything is working > otherwise, including the other tests. > > ('Execution time of test without OpenCL: ', 8.684561014175415, 's') > =============================================================== > ('Platform name:', 'ATI Stream') > ('Platform profile:', 'FULL_PROFILE') > ('Platform vendor:', 'Advanced Micro Devices, Inc.') > ('Platform version:', 'OpenCL 1.1 ATI-Stream-v2.3 (451)') > --------------------------------------------------------------- > ('Device name:', 'ATI RV710') > ('Device type:', 'GPU') > ('Device memory: ', 256, 'MB') > ('Device max clock speed:', 600, 'MHz') > ('Device compute units:', 2) > /usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/cache.py:343: > UserWarning: Build succeeded, but resulted in non-empty logs: > Build on <pyopencl.Device 'ATI RV710' at 0x21a9b20> succeeded, but said: > > /tmp/OCLQdtqga.cl(11): warning: double-precision constant is represented as > single-precision constant because double is not enabled > c[gid] = c[gid] * (a[gid] / 2.0); > ^ > > > warn("Build succeeded, but resulted in non-empty logs:\n"+message) > Execution time of test: 0.00788741 s > benchmark-all.py:70: DeprecationWarning: 'enqueue_read_buffer' has been > deprecated in version 2011.1. Please use enqueue_copy() instead. > cl.enqueue_read_buffer(queue, dest_buf, c).wait() > Results OK > =============================================================== > ('Platform name:', 'ATI Stream') > ('Platform profile:', 'FULL_PROFILE') > ('Platform vendor:', 'Advanced Micro Devices, Inc.') > ('Platform version:', 'OpenCL 1.1 ATI-Stream-v2.3 (451)') > --------------------------------------------------------------- > ('Device name:', 'Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz') > ('Device type:', 'CPU') > ('Device memory: ', 3072, 'MB') > ('Device max clock speed:', 2934, 'MHz') > ('Device compute units:', 8) > /usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/cache.py:343: > UserWarning: Build succeeded, but resulted in non-empty logs: > Build on <pyopencl.Device 'Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz' > at 0x21bb140> succeeded, but said: > > /tmp/OCLLl8sG4.cl(11): warning: double-precision constant is represented as > single-precision constant because double is not enabled > c[gid] = c[gid] * (a[gid] / 2.0); > ^ > > > warn("Build succeeded, but resulted in non-empty logs:\n"+message) > Execution time of test: 0.00134482 s > Results OK > > > On Wed, Aug 3, 2011 at 4:36 AM, Andreas Kloeckner <[email protected] > > wrote: > >> On Tue, 2 Aug 2011 19:05:33 -0400, "M.Gelman" <[email protected]> >> wrote: >> Non-text part: multipart/alternative >> > I have been trying to get pyopencl to work with my ati card and ati >> stream >> > for awhile. I followed the tutorial an was able to get a good >> compilation >> > using this script: >> > >> > python configure.py \ >> > --boost-inc-dir=/usr/include/boost \ >> > --boost-lib-dir=/usr/lib \ >> > --boost-python-libname=boost_python-mt-py26 \ >> > --cl-inc-dir=/opt/ati-stream-sdk-v2.3-lnx64/include \ >> > --cl-lib-dir=/opt/ati-stream-sdk-v2.3-lnx64/lib/x86_64 \ >> > --cl-libname=OpenCL >> > >> > However when I import pyopencl, I get: >> > >> > >>> import pyopencl >> > Traceback (most recent call last): >> > File "<stdin>", line 1, in <module> >> > File >> > >> "/usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/__init__.py", >> > line 4, in <module> >> > import pyopencl._cl as _cl >> > ImportError: >> > >> /usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/_cl.so: >> > symbol clEnqueueWriteBufferRect, version OPENCL_1.1 not defined in file >> > libOpenCL.so with link time reference >> > >> > Its something probably simple however, I cannot get passed it. >> > >> > Here are my env vars: >> > export ATISTREAMSDKROOT=/opt/ati-stream-sdk-v2.3-lnx64 >> > export ATISTREAMSDKSAMPLEROOT=/opt/ati-stream-sdk-v2.3-lnx64 >> > export LD_LIBRARY_PATH=$ATISTREAMSDKROOT/lib/x86_64:$LD_LIBRARY_PATH >> >> Your OpenCL header does not match your OpenCL library. Check with >> >> $ ldd >> >> /usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/_cl.so >> (one line) >> >> to see whether the library is the one you expect. >> >> HTH, >> Andreas >> >> PS: Please send email to pyopencl@, not pyopencl-owner@. >> > > > > -- > M.Gelman > (412)-540-5238 > LinkedIn Profile <http://www.linkedin.com/in/maxgelman> > > _______________________________________________ > PyOpenCL mailing list > [email protected] > http://lists.tiker.net/listinfo/pyopencl > >
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
