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.
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 ifPYOPENCL_NO_CACHE
is not set, possible print a warning about this. If false, don't use caching, even ifPYOPENCL_NO_CACHE
was set, possibly print a warning about this.Describe alternatives you've considered
Additional context