Skip to content
Snippets Groups Projects
Commit f18517d5 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Add a meaningless int to source code to defeat implementation caches.

parent 9975aa8c
No related branches found
No related tags found
No related merge requests found
...@@ -371,6 +371,11 @@ def _create_built_program_from_source_cached(ctx, src, options, devices, cache_d ...@@ -371,6 +371,11 @@ def _create_built_program_from_source_cached(ctx, src, options, devices, cache_d
already_built = False already_built = False
if to_be_built_indices: if to_be_built_indices:
# defeat implementation caches:
from uuid import uuid4
src = src + "\n\n__constant int pyopencl_defeat_cache_%s = 0;" % (
uuid4().hex)
prg = _cl._Program(ctx, src) prg = _cl._Program(ctx, src)
prg.build(options, [devices[i] for i in to_be_built_indices]) prg.build(options, [devices[i] for i in to_be_built_indices])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment