Skip to content

Commit c18704d

Browse files
committed
disk_caching: Pass Dagger module in remotecall
1 parent 8548c6f commit c18704d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/caching.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ function enable_disk_caching!(
6666
processes::Vector{Int}=procs(),
6767
)
6868
results = [
69-
remotecall(id) do
70-
!isdefined(Main, :Dagger) && Main.eval(:(using Dagger))
71-
Dagger.MemPool.setup_global_device!(
72-
Dagger.MemPool.DiskCacheConfig(;
69+
# N.B. We pass the Dagger module to help serialization find it remotely
70+
remotecall(id, Dagger) do _Dagger
71+
_Dagger.MemPool.setup_global_device!(
72+
_Dagger.MemPool.DiskCacheConfig(;
7373
toggle=true, membound=mem_limits[id], diskbound=disk_limit_mb * 2^20
7474
),
7575
)

0 commit comments

Comments
 (0)