You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create an 1d image object from the dataIn array using pyopencl.image_from_array, but I receive the following errors:
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-69-07fda49d952e> in <module>()
----> 1 dataInImg = pyopencl.image_from_array(ctx, dataInCont)
/Users/recondev/.virtualenvs/ipythonenv/lib/python2.7/site-packages/pyopencl/__init__.pyc in image_from_array(ctx, ary, num_channels, mode, norm_int)
1178 ImageFormat(img_format, channel_type),
1179 shape=shape[::-1], pitches=strides[::-1][1:],
-> 1180 hostbuf=ary)
1181
1182 # }}}
/Users/recondev/.virtualenvs/ipythonenv/lib/python2.7/site-packages/pyopencl/__init__.pyc in image_init(self, context, flags, format, shape, pitches, hostbuf, is_array, buffer)
676 desc.buffer = buffer
677
--> 678 image_old_init(self, context, flags, format, desc, hostbuf)
679 else:
680 # legacy init for CL 1.1 and older
MemoryError: clCreateImage failed: mem object allocation failure
By reducing the array to a much smaller size (the original array contains 1728_256_13 complex64 values, and the reduced array contains only 1728 complex64 values), I was able to remove the errors.
What I am troubling getting my head around is that when I create an image from float32 (as compared to complex64) array, I am able to create an image containing much larger sized array. I am able to create an image containing 1728_256_13 float32 values (23003136 bytes). However, I keep failing to create an image containing 1728*256 complex64 values (2097152 bytes).
I wonder if this is an expected behavior and what is the reason behind it.
The text was updated successfully, but these errors were encountered:
I have a "complex-valued" array read from a Matlab data file .mat:
dataIn.dtype returns complex64
I am trying to create an 1d image object from the dataIn array using pyopencl.image_from_array, but I receive the following errors:
By reducing the array to a much smaller size (the original array contains 1728_256_13 complex64 values, and the reduced array contains only 1728 complex64 values), I was able to remove the errors.
What I am troubling getting my head around is that when I create an image from float32 (as compared to complex64) array, I am able to create an image containing much larger sized array. I am able to create an image containing 1728_256_13 float32 values (23003136 bytes). However, I keep failing to create an image containing 1728*256 complex64 values (2097152 bytes).
I wonder if this is an expected behavior and what is the reason behind it.
The text was updated successfully, but these errors were encountered: