From 2df64e8c28df91ff12b48595f1c9e81bf74ab91c Mon Sep 17 00:00:00 2001 From: "[6~" Date: Mon, 21 Oct 2019 12:13:21 -0500 Subject: [PATCH] Fix incompatibility with pymbolic diff mapper changes --- loopy/transform/diff.py | 13 +++++++++++-- setup.py | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/loopy/transform/diff.py b/loopy/transform/diff.py index d4dcb3701..21e610755 100644 --- a/loopy/transform/diff.py +++ b/loopy/transform/diff.py @@ -37,7 +37,7 @@ from loopy.diagnostic import LoopyError # {{{ diff mapper -def func_map(i, func, args): +def func_map(i, func, args, allowed_nonsmoothness): if func.name == "exp": return var("exp")(*args) elif func.name == "log": @@ -62,8 +62,17 @@ def func_map(i, func, args): class LoopyDiffMapper(DifferentiationMapper, RuleAwareIdentityMapper): - def __init__(self, rule_mapping_context, diff_context, diff_inames): + def __init__(self, rule_mapping_context, diff_context, diff_inames, + allowed_nonsmoothness=None): RuleAwareIdentityMapper.__init__(self, rule_mapping_context) + DifferentiationMapper.__init__( + self, + + # This is actually ignored because we + # override map_variable below. + variable=None, + + allowed_nonsmoothness=None) self.diff_context = diff_context self.diff_inames = diff_inames self.diff_iname_exprs = tuple(var(diname) for diname in diff_inames) diff --git a/setup.py b/setup.py index c579bccf1..75d8b340e 100644 --- a/setup.py +++ b/setup.py @@ -90,7 +90,7 @@ setup(name="loo.py", install_requires=[ "pytools>=2018.4", - "pymbolic>=2019.1", + "pymbolic>=2019.2", "genpy>=2016.1.2", "cgen>=2016.1", "islpy>=2019.1", -- GitLab