Skip to content

Commit

Permalink
Invoker and scan caches: use no in-memory cache
Browse files Browse the repository at this point in the history
The chance of immediate reuse is low, but the chance of memory clutter is high
  • Loading branch information
inducer committed Jul 26, 2023
1 parent c00bf07 commit ed12f4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyopencl/invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ def _check_arg_size(function_name, num_cl_args, arg_types, devs):

invoker_cache = WriteOncePersistentDict(
"pyopencl-invoker-cache-v41",
key_builder=_NumpyTypesKeyBuilder())
key_builder=_NumpyTypesKeyBuilder(),
in_mem_cache_size=0)


def generate_enqueue_and_set_args(function_name,
Expand Down
3 changes: 2 additions & 1 deletion pyopencl/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,8 @@ def finish_setup(self) -> None:

generic_scan_kernel_cache = WriteOncePersistentDict(
"pyopencl-generated-scan-kernel-cache-v1",
key_builder=_NumpyTypesKeyBuilder())
key_builder=_NumpyTypesKeyBuilder(),
in_mem_cache_size=0)


class GenericScanKernel(GenericScanKernelBase):
Expand Down

0 comments on commit ed12f4d

Please sign in to comment.