from the doc: http://documen.tician.de/pycuda/driver.html#global-device-memory
Their is the pycuda.driver.mem_get_info fct that return a tuple (memory free,total memory) Here I have: >>> import pycuda.autoinit >>> (1129689088, 1341325312) Now you take the free part, divide it by the number of matrix to keep on the gpu(2 or 3 if you create a new matrix for the output) then take the root square. this give me: import math math.sqrt(pycuda.driver.mem_get_info()[0]/3) #19405.232000674456 Don't forget that this is a maximum, their is many possible reason it won't work with that size. So try lower then that. Fred On Wed, Jul 21, 2010 at 10:05 PM, arief nur andono <ariefnurand...@gmail.com> wrote: > i tried to multiply array from numpy in pycuda but when i raise the number > of array > memory error appear > > do you know how to know maximum nxn array i can multiply automatically?? > my gpu 9800gtx memory 512MB > > _______________________________________________ > PyCUDA mailing list > PyCUDA@tiker.net > http://lists.tiker.net/listinfo/pycuda > > _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda