From: Tao Chenyang <cytao@fu...>  20140524 17:32:39

P.S. While preparing for the ‘minimal example’ I accidentally deleted the line viennacl::backend::finish(); after calling for data transfer. But the error will still occur even with this line. 在 2014年5月25日，上午1:10，Tao Chenyang <cytao@...> 写道： > Hi Karl, > Thanks for your prompt reply. > Please find the code and MATLAB mexw64 file for minimal replication of > the error at the end of this mail. > I found that the error occurs when you have initiated a data transfer from > main RAM to the GPU device before memory_read. If I comment line 108110 > in the example, then no error will occur. > Hope you guys will find this useful. > Best, > Chenyang Tao > 2014.05.25 > > demo : > >>> matlab_viennacl(rand(10, 5)); > m=10 k=5 > Tahiti > internal_size = 16384 > Unexpected Standard exception from MEX file. > What() is:ViennaCL: FATAL ERROR: CL_INVALID_VALUE. > If you think that this is a bug in ViennaCL, please report it at > viennaclsupport@... and supply at least the following > information: > ….. > > <matlab_viennacl_error.zip> > 在 2014年5月25日，上午12:17，Karl Rupp <rupp@...> 写道： > >> Hi, >> >> as for the reason why internal_size() is much larger, have a look at this thread in the sourceforge forums: >> https://sourceforge.net/p/viennacl/discussion/1143678/thread/8158624c/?limit=25 >> >> As for the invalid read, I'm a bit puzzled. Maybe this has to do with some of the context and device switches in matlab_viennacl.txt? We use the same code for the implementation of viennacl::copy() and viennacl::fast_copy() (see around line 1200 in viennacl/matrix.hpp), >> so I assume that the error happens earlier. Could you provide a minimal example reproducing the issue? >> >> Best regards, >> Karli >> >> >> >> On 05/24/2014 02:41 PM, Tao Chenyang wrote: >>> Sorry, I found that the internal_size() returned is correct. >>> But I do get an CL_INVALID_VALUE error message when I try to read internal_size() elements >>> from GPU using viennacl::backend::memory_read >>> >>> 在 2014年5月24日，下午8:05，Tao Chenyang <cytao@...> 写道： >>> >>>> Dear Vienna maintainer, >>>> I’m writing a matlab extension using viennacl and find that the internal_size() returned >>>> is incorrect. >>>> I’m running on Win 7 x64, using a AMD 7970 Graphic card. The viennaCL version I used >>>> is 1.5.2. My MATLAB version is 2013b. I used VS 2012 to compile the mex file. >>>> Enclosed is the MATLAB mex file along with the source code that generates the incorrect >>>> internal_size. >>>> Best, >>>> Chenyang Tao >>>> 2014.05.24 >>>> >>>> demo: >>>> >>>>>> matlab_viennacl(rand(10, 2)) >>>> >>>> Input Dimension: m=10 k=2 >>>> ViennaCL DImension: m=10 k=2 >>>> ViennaCL.InternalSize=16384, ActualInternalSize=20 >>>> >>>> <matlab_viennacl.zip> >>> >>> >>> >>>  >>> "Accelerate Dev Cycles with Automated CrossBrowser Testing  For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. >>> Get unparalleled scalability from the best Selenium testing platform available >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> _______________________________________________ >>> ViennaCLsupport mailing list >>> ViennaCLsupport@... >>> https://lists.sourceforge.net/lists/listinfo/viennaclsupport >>> >> > 