Skip to content
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

Handle cache improvements #2352

Merged
merged 7 commits into from
Apr 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Collect memory before allocating library handles.
  • Loading branch information
maleadt committed Apr 27, 2024
commit da3b6f9b16d6dffa1598777780a37efcea57d191
1 change: 1 addition & 0 deletions lib/utils/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function Base.pop!(cache::HandleCache{K,V}, key::K) where {K,V}
# we could (and used to) run `GC.gc(false)` here to free up old handles,
# but that can be expensive when using lots of short-lived tasks.
if handle === nothing
CUDA.maybe_collect()
handle = cache.ctor(key)
end

Expand Down