Skip to content

Commit 8eca41f

Browse files
authored
Interpolate necessary functions in @easy_rule (#2790)
* Interpolate necessary functions * Bump patch * format
1 parent 2599a4b commit 8eca41f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/EnzymeCore/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "EnzymeCore"
22
uuid = "f151be2c-9106-41f4-ab19-57ee4f262869"
33
authors = ["William Moses <wmoses@mit.edu>", "Valentin Churavy <vchuravy@mit.edu>"]
4-
version = "0.8.16"
4+
version = "0.8.17"
55

66
[compat]
77
Adapt = "3, 4"

lib/EnzymeCore/src/easyrules.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Internal function.
6565
Turn both `a` and `::constraint` into `a::Annotation{<:constraint}` etc
6666
"""
6767
function _constrain_and_name(arg::Expr)
68-
Meta.isexpr(arg, :(::), 2) && return Expr(:(::), Symbol("ann_", arg.args[1]), :(Annotation{<:$(arg.args[2])})) # it is already fine.
69-
Meta.isexpr(arg, :(::), 1) && return Expr(:(::), Symbol("ann_", gensym()), :(Annotation{<:$(arg.args[1])})) # add name
68+
Meta.isexpr(arg, :(::), 2) && return Expr(:(::), Symbol("ann_", arg.args[1]), :($(Annotation){<:$(arg.args[2])})) # it is already fine.
69+
Meta.isexpr(arg, :(::), 1) && return Expr(:(::), Symbol("ann_", gensym()), :($(Annotation){<:$(arg.args[1])})) # add name
7070
# Meta.isexpr(arg, :(...), 1) &&
7171
# return Expr(:(...), _constrain_and_name(arg.args[1], :Annotation))
7272
return error("malformed arguments: $arg")
@@ -479,7 +479,7 @@ function scalar_rrule_expr(__source__, f, call, setup_stmts, inputs, input_names
479479

480480
PT = EnzymeRules.primal_type(config, ($(esc(:RTA))).parameters[1])
481481
ST = EnzymeRules.shadow_type(config, ($(esc(:RTA))).parameters[1])
482-
AugmentedReturnType = :(EnzymeRules.AugmentedReturn{$PT,$ST,typeof(cache)})
482+
AugmentedReturnType = :($(EnzymeRules.AugmentedReturn){$PT, $ST, typeof(cache)})
483483

484484
genres = if needs_primal(config)
485485
if needs_shadow(config)

0 commit comments

Comments
 (0)