Hi Ewald, Ewald Zietsman <[email protected]> writes: > I'm trying to figure out exactly why I'm getting the above error. I'm > assuming I'm trying to allocate too big a chunk of memory at a time, I got > around this before by splitting the problem into smaller bits and doing > them one by one and concatenating the results. Now I'd like to figure out > what is the limits of the hardware. Can I do this via the pyopencl api?
I've previously gotten this error for accessing out-of-bounds memory on the GPU, less so for running out of memory. I'm mentioning this to suggest that you keep causes other than 'out of memory' in mind, as out-of-memory errors generally raise different codes. To answer your actual question, it turns out that finding out how much memory is available in a single chunk is actually not very easy, and since CL allows allocating memory lazily, even alloc-and-fail loops aren't bulletproof unless you actually access that memory. The best guess comes from a combination of http://documen.tician.de/pyopencl/runtime.html#pyopencl.device_info.GLOBAL_MEM_SIZE and http://documen.tician.de/pyopencl/runtime.html#pyopencl.device_info.MAX_MEM_ALLOC_SIZE HTH, Andreas
pgp13ZkHnGWWE.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
