Hi,
Thank you very much again. I am sorry that I have created some problems
just before the week-end. However, there is a bug - to my definition - in
the system.
Everything has started when I created - accidentally - a CompressedMatrix
with double precision in a system that provides single precision, only. I
did not receive any error message when I created the matrix, though. The
following is from the early morning test today:
>>> import pyviennacl as p
>>> A = p.CompressedMatrix(5, 5)
>>> b = p.Vector(5, 3.142)
Traceback (most recent call last):
.
.
RuntimeError: ViennaCL: FATAL ERROR:
The error is detected when a vector is created, not when a CompressedMatrix
is created in the first line. After the first line, the system is silently
becoming unstable - (I think!). That was the origin of the problems that I
reported before the weekend. However, it took sometime to sort it out.
I read in your websites that you also support for Open MP for C++ version.
Is it also valid for python version?
Would it be possible for you to give me a link of the documentation that
you are quoting from above? The only source of documentation that I know of
is this :
http://viennacl.sourceforge.net/pyviennacl/doc/examples/sparse-matrices.html
and the information there is quite limited.
OK. I got the point: I am gonna upgrade my hardware if I want to achieve
some performance level with OpenCL! :o)
THANK YOU VERY MUCH AGAIN.
Have a nice Sunday.
Kind regards,
Berat
2015-05-23 23:54 GMT+02:00 Karl Rupp <[email protected]>:
> 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