Skip to content

Commit

Permalink
Make sure the section0 timing isright.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Aug 11, 2023
1 parent caad210 commit 5704c4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devito/operator/wgpu_operator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from math import prod
import timeit
from typing import cast

from cffi import FFI
from wgpu.backends.rs_ffi import lib as wgpulib
from devito import Operator
from devito.ir.ietxdsl import transform_devito_to_iet_ssa, iet_to_standard_mlir, finalize_module_with_globals
from devito.logger import perf
Expand Down Expand Up @@ -115,6 +118,7 @@ def f(*args, **kwargs):
gpuargs.append(buf)
with self._profiler.timer_on('wgpu-apply'):
res = interpreter.run_ssacfg_region(func.body, gpuargs)
wgpulib.wgpuDevicePoll(wgpuf.device._internal, True, FFI.NULL)
e = self._profiler.py_timers['wgpu-apply']
c_double_p = ctypes.POINTER(ctypes.c_double)
ctypes.cast(args[-1], c_double_p).contents.value = e
Expand Down

0 comments on commit 5704c4f

Please sign in to comment.