From 96d008486d17ce2d50263e1d2e2f9c074413e05c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 27 Aug 2018 19:30:03 -0500 Subject: [PATCH 1/3] Add missing loopy kernel version spec --- sumpy/p2e.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sumpy/p2e.py b/sumpy/p2e.py index e9037a3f..5cf623ce 100644 --- a/sumpy/p2e.py +++ b/sumpy/p2e.py @@ -27,6 +27,7 @@ from six.moves import range import numpy as np import loopy as lp +from loopy.version import MOST_RECENT_LANGUAGE_VERSION from sumpy.tools import KernelCacheWrapper @@ -159,7 +160,8 @@ class P2EFromSingleBox(P2EBase): assumptions="nsrc_boxes>=1", silenced_warnings="write_race(write_expn*)", default_offset=lp.auto, - fixed_parameters=dict(dim=self.dim)) + fixed_parameters=dict(dim=self.dim), + version=MOST_RECENT_LANGUAGE_VERSION) loopy_knl = self.expansion.prepare_loopy_kernel(loopy_knl) loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr") @@ -265,7 +267,8 @@ class P2EFromCSR(P2EBase): assumptions="ntgt_boxes>=1", silenced_warnings="write_race(write_expn*)", default_offset=lp.auto, - fixed_parameters=dict(dim=self.dim)) + fixed_parameters=dict(dim=self.dim), + version=MOST_RECENT_LANGUAGE_VERSION) loopy_knl = self.expansion.prepare_loopy_kernel(loopy_knl) loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr") -- GitLab From 03538743f34dc2bd07a6b9ed9a1435eded60aa1f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 27 Aug 2018 19:31:11 -0500 Subject: [PATCH 2/3] Add missing r'' for escapes, fix indentation --- sumpy/kernel.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sumpy/kernel.py b/sumpy/kernel.py index 40e82dc7..12255a93 100644 --- a/sumpy/kernel.py +++ b/sumpy/kernel.py @@ -269,12 +269,12 @@ class Kernel(object): return expr def get_global_scaling_const(self): - """Return a global scaling constant of the kernel. - Typically, this ensures that the kernel is scaled so that - :math:`\mathcal L(G)(x)=C\delta(x)` with a constant of 1, where - :math:`\mathcal L` is the PDE operator associated with the kernel. - Not to be confused with *rscale*, which keeps expansion - coefficients benignly scaled. + r"""Return a global scaling constant of the kernel. + Typically, this ensures that the kernel is scaled so that + :math:`\mathcal L(G)(x)=C\delta(x)` with a constant of 1, where + :math:`\mathcal L` is the PDE operator associated with the kernel. + Not to be confused with *rscale*, which keeps expansion + coefficients benignly scaled. """ raise NotImplementedError @@ -302,7 +302,7 @@ class ExpressionKernel(Kernel): def __init__(self, dim, expression, global_scaling_const, is_complex_valued): - """ + r""" :arg expression: A :mod:`pymbolic` expression depending on variables *d_1* through *d_N* where *N* equals *dim*. (These variables match what is returned from -- GitLab From 962a155fc23a42777450a29471e091aacb576e54 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 27 Aug 2018 19:45:41 -0500 Subject: [PATCH 3/3] Fix make_kernel(version->lang_version) --- sumpy/p2e.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sumpy/p2e.py b/sumpy/p2e.py index 5cf623ce..daa7d93d 100644 --- a/sumpy/p2e.py +++ b/sumpy/p2e.py @@ -161,7 +161,7 @@ class P2EFromSingleBox(P2EBase): silenced_warnings="write_race(write_expn*)", default_offset=lp.auto, fixed_parameters=dict(dim=self.dim), - version=MOST_RECENT_LANGUAGE_VERSION) + lang_version=MOST_RECENT_LANGUAGE_VERSION) loopy_knl = self.expansion.prepare_loopy_kernel(loopy_knl) loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr") @@ -268,7 +268,7 @@ class P2EFromCSR(P2EBase): silenced_warnings="write_race(write_expn*)", default_offset=lp.auto, fixed_parameters=dict(dim=self.dim), - version=MOST_RECENT_LANGUAGE_VERSION) + lang_version=MOST_RECENT_LANGUAGE_VERSION) loopy_knl = self.expansion.prepare_loopy_kernel(loopy_knl) loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr") -- GitLab