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

pyopencl cache doesn't care about #incude #18

Closed
petRUShka opened this issue Jun 7, 2013 · 3 comments
Closed

pyopencl cache doesn't care about #incude #18

petRUShka opened this issue Jun 7, 2013 · 3 comments

Comments

@petRUShka
Copy link

I share some code between opencl files. Because of OpenCL 1.1 format easiest way is inclusion common cl code into both of cl files like this:

common.cl

void test(void){
  return;
}

kernel.cl:

#include "common.cl"

__kernel void test_kernel(__global int *result)
{
  test()
}

If I modify test in common.cl pyopencl doesn't see it and use cached version of common.cl. Even if I delete test from common.cl pyopencl doesn't see it. It's quite dangerous because for example I spent a lot of time trying to find an error that was in this cache issue.

@inducer
Copy link
Owner

inducer commented Jun 7, 2013

It tries to detect changed include files:

https://github.com/inducer/pyopencl/blob/master/pyopencl/cache.py#L146

It's apparently failing to do so in your case. Can you shove some print statements into this code to figure out what's going wrong?

@petRUShka
Copy link
Author

I understand the reason! I collect my cl files in cl/ subdir of project root. So I call build with argument "-I /home/user/opencl/cl", and your cache subsystem doesn't see it. So cache subsystem should care about -I option to fix this issue.

@inducer
Copy link
Owner

inducer commented Jun 7, 2013

It also does try to see -I options. :)

It already understands ["-I/some/where"] (note:no space!) and ["-I", "/some/where"]. 15bc505 adds handling for your style. See if that fixes it. Repopen if not.

@inducer inducer closed this as completed Jun 7, 2013
inducer added a commit that referenced this issue Oct 21, 2019
Implement get_async

Closes #18

See merge request inducer/pyopencl!91
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

2 participants