Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython Integration #77

Open
mattpaletta opened this issue Nov 28, 2018 · 0 comments
Open

Cython Integration #77

mattpaletta opened this issue Nov 28, 2018 · 0 comments

Comments

@mattpaletta
Copy link

Hi @hughperkins, great project! I'm trying to use it in one of my Python projects, so I can call OpenCL code in Python using pyopencl. I had a look at the test files that are written in Python for ideas on how to integrate this into my project, but many of them weren't patched, and I didn't like having to write manual offsets for pyopencl calls. So, that led me to using the cocl_py though make, then taking the generated .o files, and calling them through a cython wrapper from python.

You can see the inprogress work here: https://github.com/mattpaletta/cuckoostash

I was able to get the code compiling, however, I am stuck on an issue when I run it:

Python 3.6.2rc2 (v3.6.2rc2:8913311345, Jul  7 2017, 00:35:45) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pycuckoo import PyCuckoo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(cuckoostash/pycuckoo.cpython-36m-darwin.so, 2): Symbol not found: _configureKernel
  Referenced from:cuckoostash/pycuckoo.cpython-36m-darwin.so
  Expected in: flat namespace
 in cuckoostash/pycuckoo.cpython-36m-darwin.so

I assume that has to do with the correct libraries not being included when cython builds the wrapper for Python. Do you have any insights into what I'm missing such that coriander can be included as a library in another independent C++/Python project? I tried running the executable from coco_py, and that works fine on my machine, so that leads me to believe it must just be compilation parameters. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant