Clyther icon indicating copy to clipboard operation
Clyther copied to clipboard

compile-to-opencl-source fails

Open mdipierro opened this issue 13 years ago • 4 comments

Hello Sean,

I installed python2.7 and did a pip install clyther I am trying this code: http://srossross.github.com/Clyther/examples.html#compile-to-opencl-source and I get

Traceback (most recent call last): File "test1.py", line 32, in print generate_sin.compile(ctx, a=cl.global_memory(cl.cl_float2), source_only=True) File "/Library/Python/2.7/site-packages/clyther/cly_kernel.py", line 157, in compile cl_kernel = self.compile_or_cly(ctx, source_only=source_only, cly_meta=cly_meta, **kwargs) File "/Library/Python/2.7/site-packages/clyther/cly_kernel.py", line 207, in compile_or_cly program = self._compile(ctx, args, defaults, kernel_name, source) File "/Library/Python/2.7/site-packages/clyther/cly_kernel.py", line 261, in _compile raise CLComileError('\n'.join(log_lines), program) clyther.cly_kernel.CLComileError: <opencl.Device name='Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz' type=2L> No kernels or only kernel prototypes found

Any idea what I may be doing wrong?

mdipierro avatar Nov 06 '12 20:11 mdipierro

Hi, Sorry This does not give me enough information. Have you tried to run similar code using pure openCL or PyOpenCL?

srossross avatar Nov 08 '12 00:11 srossross

I'm having a similar but different issue. I haven't yet tried your suggestion yet though.

Does this help? python clytherWithKernel.py Traceback (most recent call last): File "clytherWithKernel.py", line 32, in print generate_sin.compile(ctx, a=cl.global_memory(cl.cl_float2), source_only=True) File "/usr/local/lib/python2.7/dist-packages/Clyther-0.4_beta-py2.7.egg/clyther/cly_kernel.py", line 157, in compile cl_kernel = self.compile_or_cly(ctx, source_only=source_only, cly_meta=cly_meta, **kwargs) File "/usr/local/lib/python2.7/dist-packages/Clyther-0.4_beta-py2.7.egg/clyther/cly_kernel.py", line 207, in compile_or_cly program = self._compile(ctx, args, defaults, kernel_name, source) File "/usr/local/lib/python2.7/dist-packages/Clyther-0.4_beta-py2.7.egg/clyther/cly_kernel.py", line 261, in _compile raise CLComileError('\n'.join(log_lines), program) clyther.cly_kernel.CLComileError: <opencl.Device name='Quadro K2000M' type=4L> /tmp/clyther_EtYG4z.cl:15:8: error: use of undeclared identifier 'cly_a_info' a[(cly_a_info.s7 + (gid * cly_a_info.s4))].x = ((r * 2.0) - 1.0); ^ /tmp/clyther_EtYG4z.cl:16:8: error: use of undeclared identifier 'cly_a_info' a[(cly_a_info.s7 + (gid * cly_a_info.s4))].y = native_sin(y); ^

justarandomuser avatar May 24 '13 12:05 justarandomuser

I also noticed that most of the clyther examples on the website are not yet self-contained, you often need to add required imports from other places to make them work, but otherwise it's been working well - assuming that you have an OpenCL runtime installed (AMD, INTEL or NVIDIA) and that you are able to run other CL code.

woncount avatar Jun 23 '13 19:06 woncount

I'm having the same issue, using Clyther-0.4-beta (on Windows). When I try to run "examples/conv.py", I get clyther.cly.kernel.CLComileError with "use of undeclared identifier 'cly_a_info'. Looking at the generated .cl file, it simply defines kernel setslice(). At no point is cly_a_info declared.

mabtjie avatar Jan 18 '14 04:01 mabtjie