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

Disable kernel caching from within pyopencl code #678

Open
Novermars opened this issue Mar 7, 2023 · 1 comment
Open

Disable kernel caching from within pyopencl code #678

Novermars opened this issue Mar 7, 2023 · 1 comment

Comments

@Novermars
Copy link

Novermars commented Mar 7, 2023

Is your feature request related to a problem? Please describe.
When debugging an OpenCL implementation, I like to use pyopencl for my reproducers for other teams and easy testing. Since the default behavior is caching, this causes some surprises when tuning for example an OpenCL compiler, running the same code but expecting different results due to the tuning.

Describe the solution you'd like
Add a keyword argument to pyopencl.Program.build(...) called 'cached', which is a bool. If true, use caching even if PYOPENCL_NO_CACHE is not set, possible print a warning about this. If false, don't use caching, even if PYOPENCL_NO_CACHE was set, possibly print a warning about this.

Describe alternatives you've considered

Additional context

@inducer
Copy link
Owner

inducer commented Mar 7, 2023

I'm supportive of this suggestion, including the warnings you describe. I would be happy to consider a PR along these lines.

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

No branches or pull requests

2 participants