Hi Berat,
> This time i used "pip install pyviennacl". The installation is OK. I
> used Karl's blog to test the installation. When I tried to convert,
> numpy array x to Vector(x), I got the same error message:
>
> ERROR MESSAGE:
> >>> gpu_x = pyviennacl.Vector(x)
> Traceback (most recent call last):
> File "<pyshell#7>", line 1, in <module>
> gpu_x = pyviennacl.Vector(x)
> File "C:\Python34\lib\site-packages\pyviennacl\pycore.py", line 820,
> in __init__
> self._init_leaf(args, kwargs)
> File "C:\Python34\lib\site-packages\pyviennacl\pycore.py", line 1172,
> in _init_leaf
> self.vcl_leaf = get_leaf(vcl_type)
> File "C:\Python34\lib\site-packages\pyviennacl\pycore.py", line 1148,
> in get_leaf
> return vcl_t(args[0])
> RuntimeError: ViennaCL: FATAL ERROR: You requested to create a ViennaCL
> type using double precision. However, double precision is not supported
> by your device.
>
> Then, I used numpy.float32, voila. It seems OK now.
Yep, your OpenCL device still does not provide double precision support ;-)
(This usually indicates that you have low-end hardware, so you're
unlikely to see any performance benefits from using OpenCL)
> Before I attach the test result, I would like to ask an important
> question: How can I create a CompressedMatrix of float32 type?
>
> A = p.CompressedMatrix(5, 5) is creating a matrix with double precision.
> Is there any parameter that I can use to create a matrix with single
> precision floating number?
Have you tried A = p.CompressedMatrix( shape=(size, size),
dtype=numpy.float32)?
If this does not work, let me quote from the sources:
A sparse matrix instance can be constructed in a number of ways:
* as an empty instance, with no parameters;
* by passing a 2-tuple representing the shape or a 3-tuple representing
both the shape and the number of nonzeros, to pre-allocate memory;
* from a 3-tuple of lists representing (rows, cols, values);
* from a :class:`Matrix` instance;
* from another sparse matrix instance;
* from an expression resulting in a :class:`Matrix` or sparse matrix;
* from a NumPy :class`ndarray`;
* from a SciPy sparse matrix.
Your easiest pick most likely is to set up a proper SciPy sparse matrix
with single precision and then create the PyViennaCL matrix.
Best regards,
Karli
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
ViennaCL-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-support