Received from Freddie Witherden on Sat, Oct 13, 2012 at 08:49:06AM EDT:
> On 11/10/12 13:19, Lev Givon wrote:
> > The current CUBLAS wrappers use the v2 interface because NVIDIA
> > dropped the v1 interfaces in the early 4.x shared libraries. I tried
> > to maintain v1-like Python interface to avoid breaking code that was
> > using it via the admittedly crude expedient of maintaining a global
> > library context variable to pass to the v2 function interfaces. Rather
> > than continue to propagate this situation, I'm going to modify the
> > wrapper to expose the v2 interface outright.
>
> Okay. This is good to know. It is my contention that the .errcheck
> attrbiute could also be used to greatly simplify some of the code --
> especially with regards to error handling.
Thanks for the suggestion - I'll try it out.
> Also, on a more general note do you know if calls such as:
>
> alpha = c_double(x)
> cublasCall(..., byref(alpha))
>
> are safe when used in conjunction with streams? (I am wondering if
> alpha could be GC'ed after cublasCall returns but before the stream has
> executed the call, resulting in undefined behaviour when the CUDA driver
> attempts to read/copy byref(alpha) onto the device.)
>
> Regards, Freddie.
Not sure; I would ordinarily suggest turning to the NVIDIA forums, but
they still seem to be down. One possible way to avoid such an
occurrence might be to temporarily disable GC until the stream
synchronizes.
L.G.
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda