Conversation
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/rules/typeunstablerules.jl b/src/rules/typeunstablerules.jl
index 7283fc45..74d9d088 100644
--- a/src/rules/typeunstablerules.jl
+++ b/src/rules/typeunstablerules.jl
@@ -1226,8 +1226,8 @@ function rt_jl_getfield_aug(
dptr::T,
::Type{Val{symname}},
::Val{isconst},
- dptrs::Vararg{T,Nargs},
-) where {NT,T,Nargs,symname,isconst}
+ dptrs::Vararg{T, Nargs},
+ ) where {NT, T, Nargs, symname, isconst}
res = if dptr isa Base.RefValue
Base.getfield(dptr[], symname)
else
@@ -1274,8 +1274,8 @@ function idx_jl_getfield_aug(
dptr::T,
::Type{Val{symname}},
::Val{isconst},
- dptrs::Vararg{T,Nargs},
-) where {NT,T,Nargs,symname,isconst}
+ dptrs::Vararg{T, Nargs},
+ ) where {NT, T, Nargs, symname, isconst}
res = if dptr isa Base.RefValue
Base.getfield(dptr[], symname + 1)
else
@@ -1343,8 +1343,8 @@ function rt_jl_getfield_rev(
dret,
::Type{Val{symname}},
::Val{isconst},
- dptrs::Vararg{T,Nargs},
-) where {T,Nargs,symname,isconst}
+ dptrs::Vararg{T, Nargs},
+ ) where {T, Nargs, symname, isconst}
cur = if dptr isa Base.RefValue
getfield(dptr[], symname)
else
@@ -1425,8 +1425,8 @@ function idx_jl_getfield_rev(
dret,
::Type{Val{symname}},
::Val{isconst},
- dptrs::Vararg{T,Nargs},
-) where {T,Nargs,symname,isconst}
+ dptrs::Vararg{T, Nargs},
+ ) where {T, Nargs, symname, isconst}
cur = if dptr isa Base.RefValue
Base.getfield(dptr[], symname + 1)
else
diff --git a/test/typeunstable.jl b/test/typeunstable.jl
index b1a69d08..77d602aa 100644
--- a/test/typeunstable.jl
+++ b/test/typeunstable.jl
@@ -275,14 +275,17 @@ end
function loss_3280(p)
prob = MiniProblem3280([1.0], (0.0, 1.0), p, pairs((;)))
active_field = Enzyme.Compiler.idx_jl_getfield_aug(
- Val(NamedTuple{(1,)}), prob, Val{2}, Val(false))
+ Val(NamedTuple{(1,)}), prob, Val{2}, Val(false)
+ )
return sum(abs2, active_field)
end
@testset "idx_jl_getfield_aug calling convention (Issue 3280 reproducer)" begin
p = [0.5]
dp = zero(p)
- Enzyme.autodiff(set_runtime_activity(Reverse), Enzyme.Const(loss_3280), Enzyme.Active,
- Enzyme.Duplicated(p, dp))
+ Enzyme.autodiff(
+ set_runtime_activity(Reverse), Enzyme.Const(loss_3280), Enzyme.Active,
+ Enzyme.Duplicated(p, dp)
+ )
@test dp ≈ [1.0]
end
\ No newline at end of file |
Contributor
Benchmark Results
Benchmark PlotsA plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/28959180802/artifacts/8175583651. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #3291