Hi Karl, Karl Rupp <r...@iue.tuwien.ac.at> writes: > > 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! > > Hmm, it's not very satisfactory if we don't yet know what the issue was...
Well, I'm pretty sure that the issue originated somewhere in the pointer handling in boost::python or the Python garbage collector, since I didn't do any deletion or freeing myself (as the lifetime of any objects created by pyviennacl is tied to objects created in Python, and so that has to be handled by Python). It just seemed to me that writing return value policies for boost::python in a blind attempt to keep objects around -- or trying to debug the garbage collector -- was too much of a distraction, especially given that I had this alternative available.. > Hmm, I created a C++ test case for x *= a, but everything worked out. I > also checked the corresponding scheduler code, there's also nothing > suspicious. The internal memory error looks as if 'x' or 'a' is not > created properly. Do other operations with Scalars work? Hmm. Any operation involving a (GPU) Scalar and some higher-dimensional object (matrix or vector) fails. However, scalar arithmetic (eg, a += b for scalar a and b) succeeds in PyViennaCL, but this doesn't go via ViennaCL; it seemed overkill for something that CPUs are pretty good at, and is well-supported in Python anyway. But both vector and scalar seem to be constructed correctly -- I can get access to the underlying ViennaCL objects using the `vcl_leaf' attribute. For example (GPU scalar b, vector x): >>> b.vcl_leaf.to_host() 0.04000000000000001 >>> x.vcl_leaf.as_ndarray() array([ 5., 5., 5., 5., 5.]) I'll dig around some more... Cheers, 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 ViennaCL-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viennacl-devel