githubharald / GPUImageProcessingArticle

https://medium.com/@harald_scheidl/15e34b787480
13 stars 9 forks source link

clCreateImage failed: IMAGE_FORMAT_NOT_SUPPORTED #1

Open aniltirli opened 3 years ago

aniltirli commented 3 years ago

error at line 28

pyopencl 2019.1.2 python 3.9.0 and 3.5.2 Ubuntu 16.04 Intel(R) HD Graphics Haswell GT2 Mobile

Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/anil/.vscode/extensions/ms-python.python-2020.12.424452561/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module> cli.main() File "/home/anil/.vscode/extensions/ms-python.python-2020.12.424452561/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main run() File "/home/anil/.vscode/extensions/ms-python.python-2020.12.424452561/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file runpy.run_path(target_as_str, run_name=compat.force_str("__main__")) File "/usr/local/lib/python3.9/runpy.py", line 268, in run_path return _run_module_code(code, init_globals, run_name, File "/usr/local/lib/python3.9/runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/anil/workspace_vscode/GPUImageProcessingArticle/main.py", line 64, in <module> main() File "/home/anil/workspace_vscode/GPUImageProcessingArticle/main.py", line 55, in main dilate = applyMorphOp(img, MorphOp.DILATE) File "/home/anil/workspace_vscode/GPUImageProcessingArticle/main.py", line 28, in applyMorphOp imgInBuf = cl.Image(context, cl.mem_flags.READ_ONLY, cl.ImageFormat(cl.channel_order.LUMINANCE, cl.channel_type.UNORM_INT8), shape=shape) # holds a gray-valued image of given shape File "/home/anil/.local/lib/python3.9/site-packages/pyopencl/__init__.py", line 962, in image_init image_old_init(self, context, flags, format, desc, hostbuf) pyopencl._cl.RuntimeError: clCreateImage failed: IMAGE_FORMAT_NOT_SUPPORTED

Vibhuarvind commented 3 years ago

AttributeError: 'NoneType' object has no attribute 'T'

in applyMorphOp(imgIn, op) 17 18 # (2) get shape of input image, allocate memory for output to which result can be copied to ---> 19 shape = imgIn.T.shape 20 imgOut = np.empty_like(imgIn) 21
arpithbioelectronica commented 2 years ago

Greetings,

I ran into the following error. Could someone point me in the right direction please?

`Traceback (most recent call last):

File ~/morp.py:75 in main()

File ~/morp.py:66 in main dilate = applyMorphOp(img, MorphOp.DILATE)

File ~/morp.py:39 in applyMorphOp imgInBuf = cl.Image(context, cl.mem_flags.READ_ONLY, cl.ImageFormat(cl.channel_order.LUMINANCE, cl.channel_type.UNORM_INT8), shape=shape) # holds a gray-valued image of given shape

File /opt/anaconda3/lib/python3.9/site-packages/pyopencl/init.py:1020 in image_init image_old_init(self, context, flags, format, desc, hostbuf)

RuntimeError: clCreateImage failed: IMAGE_FORMAT_NOT_SUPPORTED`