-
Notifications
You must be signed in to change notification settings - Fork 79
refactor: move SparseArrays into an extension #2585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/analyses/activity.jl b/src/analyses/activity.jl
index fac4476..2200589 100644
--- a/src/analyses/activity.jl
+++ b/src/analyses/activity.jl
@@ -80,7 +80,7 @@ end
@inline ptreltype(::Type{Complex{T}}) where {T} = T
@inline ptreltype(::Type{Tuple{Vararg{T}}}) where {T} = T
@inline ptreltype(::Type{IdDict{K,V}}) where {K,V} = V
-@inline ptreltype(::Type{IdDict{K,V} where K}) where {V} = V
+@inline ptreltype(::Type{IdDict{K, V} where {K}}) where {V} = V
@static if VERSION < v"1.11-"
else
@inline ptreltype(::Type{Memory{T}}) where T = T
@@ -93,7 +93,7 @@ end
@inline is_arrayorvararg_ty(::Type{Core.LLVMPtr{T,N} where N}) where {T} = true
@inline is_arrayorvararg_ty(::Type{Base.RefValue{T}}) where {T} = true
@inline is_arrayorvararg_ty(::Type{IdDict{K,V}}) where {K,V} = true
-@inline is_arrayorvararg_ty(::Type{IdDict{K,V} where K}) where {V} = true
+@inline is_arrayorvararg_ty(::Type{IdDict{K, V} where {K}}) where {V} = true
@static if VERSION < v"1.11-"
else
@inline is_arrayorvararg_ty(::Type{Memory{T}}) where T = true |
Benchmark Results
Benchmark PlotsA plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/17784875671/artifacts/4030272579. |
f60555f to
3d9ca6c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2585 +/- ##
==========================================
- Coverage 75.10% 75.09% -0.02%
==========================================
Files 56 57 +1
Lines 17724 17728 +4
==========================================
+ Hits 13312 13313 +1
- Misses 4412 4415 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
| # add the extra poitner offset when loading here]. However for pointers constructed by ccall outside julia | ||
| # to a julia object, which are not inline by type but appear so, like SparseArrays, this is a problem | ||
| # and merits further investigation. x/ref https://github.com/EnzymeAD/Enzyme.jl/issues/2085 | ||
| if !Base.allocatedinline(typ) && typ != SparseArrays.cholmod_dense_struct && typ != SparseArrays.cholmod_sparse_struct && typ != SparseArrays.cholmod_factor_struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately presently this cannot be moved into an extension (it will not get picked up from generated function shenanigans). the longer term soltn i need to figure out is how to handle this specific edge case of a ccall return, but I haven't gotten to so yet [and it only came up for sparsearrays]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would need to perform an invoke in world (probably invole_in_world_total) with the world being the job.world
No description provided.