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

Use loopy executor in eager call_loopy

parent 3a464ecf
No related branches found
No related tags found
No related merge requests found
...@@ -268,17 +268,17 @@ class PyOpenCLArrayContext(ArrayContext): ...@@ -268,17 +268,17 @@ class PyOpenCLArrayContext(ArrayContext):
def call_loopy(self, t_unit, **kwargs): def call_loopy(self, t_unit, **kwargs):
try: try:
t_unit = self._loopy_transform_cache[t_unit] executor = self._loopy_transform_cache[t_unit]
except KeyError: except KeyError:
orig_t_unit = t_unit orig_t_unit = t_unit
t_unit = self.transform_loopy_program(t_unit) executor = self.transform_loopy_program(t_unit).executor(self.context)
self._loopy_transform_cache[orig_t_unit] = t_unit self._loopy_transform_cache[orig_t_unit] = executor
del orig_t_unit del orig_t_unit
evt, result = t_unit(self.queue, **kwargs, allocator=self.allocator) evt, result = executor(self.queue, **kwargs, allocator=self.allocator)
if self._wait_event_queue_length is not False: if self._wait_event_queue_length is not False:
prg_name = t_unit.default_entrypoint.name prg_name = executor.t_unit.default_entrypoint.name
wait_event_queue = self._kernel_name_to_wait_event_queue.setdefault( wait_event_queue = self._kernel_name_to_wait_event_queue.setdefault(
prg_name, []) prg_name, [])
......
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