Hi all,
So I've uploaded PyViennaCL packages which don't have the shared_ptr
troubles that my previous ones did (in the end, I split what used to be
a single Python extension into many smaller extensions under one package
namespace). These packages seem mostly to work, and (for instance), pass
my blas3_prod and blas3_solve tests. Try them out, if you can!
There still seems to be something weird going on, though:
$ python3 tests/pyviennacl/vector_operations.py
----------------------------------------------
----------------------------------------------
## Test :: vector operations
----------------------------------------------
----------------------------------------------
*** Using float numeric type ***
# Testing setup:
eps: 0.001
Now using A=vector, B=vector, C=vector
Test: initialisation of vector with CPU scalar passed
Test: initialisation of vector with ndarray passed
Test: initialisation of vector with Vector passed
Test: negation passed
Test: in-place scale (multiplication) passed
Test: in-place add passed
ERROR 2013-12-21 22:55:43,949 pyviennacl.pycore 2759 execute
EXCEPTION EXECUTING: InplaceAdd(Vector, Mul(Vector, Scalar)=>Vector)=>Vector
Traceback (most recent call last):
File "tests/pyviennacl/vector_operations.py", line 458, in <module>
sys.exit(test())
File "tests/pyviennacl/vector_operations.py", line 444, in test
test_vector_slice(run_test, epsilon, p.float32, 11)
File
"/home/toby/src/viennacl/pyviennacl-dev/tests/pyviennacl/test_common.py", line
124, in test_vector_slice
dtype = dtype)
File "tests/pyviennacl/vector_operations.py", line 109, in run_test
vcl_A += alpha * vcl_B
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 530, in
__iadd__
op.execute()
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 2101, in
execute
self._result = s.execute()
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 2757, in
execute
self.vcl_statement.execute()
RuntimeError: ViennaCL: Internal memory error: unknown memory handle
(memory_read)!
This seems to be reproducible where something like this happens:
$ python3
Python 3.3.3 (default, Dec 8 2013, 15:11:36)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyviennacl as p
>>> x = p.Vector(5, 2.0, dtype=p.float32)
>>> y = p.Vector(5, 0.3, dtype=p.float32)
>>> a = p.Scalar(p.float32(2.0))
>>> b = p.HostScalar(p.float32(5.0))
>>> x *= a
ERROR 2013-12-21 23:13:14,927 pyviennacl.pycore 2759 execute
EXCEPTION EXECUTING: Assign(Vector, Mul(Vector, Scalar)=>Vector)=>NoResult
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 571, in
__imul__
return op.result
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 2090, in
result
self.execute()
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 2101, in
execute
self._result = s.execute()
File "/usr/lib/python3/dist-packages/pyviennacl/pycore.py", line 2757, in
execute
self.vcl_statement.execute()
RuntimeError: ViennaCL: Internal memory error: unknown memory handle
(memory_read)!
>>> x.value
array([ 2., 2., 2., 2., 2.], dtype=float32)
>>> y *= b
>>> y.value
array([ 1.5, 1.5, 1.5, 1.5, 1.5], dtype=float32)
I haven't yet written up a pure C++ test case, but it seems to be the
case that performing arithmetic operations via the scheduler using
device scalars on (device) vectors and matrices results in memory
errors; if this isn't because of my code reorganisation, then it's a
regression. Unless someone beats me to it, I'll check the C++ case
sometime tomorrow or the day after.
Operations like this via the scheduler work fine right now:
>>> x += y
>>> x.value
array([ 3.5, 3.5, 3.5, 3.5, 3.5], dtype=float32)
Best,
Toby
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-devel