Skip to content
Snippets Groups Projects
Commit 402f38ab authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

fixed advectiona autotuning

parent 4415f3d4
No related branches found
No related tags found
1 merge request!19Resolve "Fine to coarse grid filters"
Pipeline #19950 passed
......@@ -61,7 +61,7 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel):
vboundaries = (velocity.global_lboundaries[-1], velocity.global_rboundaries[-1])
eps = npw.finfo(precision).eps
dt = velocity_cfl
dt = velocity_cfl * velocity.space_step[-1]
make_offset, offset_dtype = self.make_array_offset()
make_strides, strides_dtype = self.make_array_strides(position.dim,
......@@ -84,7 +84,7 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel):
target_args['P_offset'] = make_offset(position.sdata.offset, position.dtype)
isolation_params['V_base'] = dict(count=velocity.npoints,
dtype=velocity.dtype, fill=0.05)
dtype=velocity.dtype, fill=1.00)
isolation_params['P_base'] = dict(count=position.npoints,
dtype=position.dtype, fill=0.00)
......@@ -194,7 +194,7 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel):
Vr = extra_kwds['Vr']
is_bilevel = extra_kwds['is_bilevel']
if is_bilevel is not None and local_work_size is not None:
if (is_bilevel is not None) and (local_work_size is not None):
local_work_size[0] = is_bilevel[-1]
## Get compile time OpenCL known variables
......@@ -241,3 +241,4 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel):
'known_args')
return self.custom_hash(*tuple(extra_kwds[kwd] for kwd in kwds),
mesh_info_vars=extra_kwds['mesh_info_vars'])
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