You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the core of Dagger.jl is a scheduler heavily inspired by [Dask](https://docs.dask.org/en/latest/). It can run computations represented as [directed-acyclic-graphs](https://en.wikipedia.org/wiki/Directed_acyclic_graph) (DAGs) efficiently on many Julia worker processes.
14
+
At the core of Dagger.jl is a scheduler heavily inspired by [Dask](https://docs.dask.org/en/latest/). It can run computations represented as [directed-acyclic-graphs](https://en.wikipedia.org/wiki/Directed_acyclic_graph) (DAGs) efficiently on many Julia worker processes and threads, as well as GPUs via [DaggerGPU.jl](https://github.com/JuliaGPU/DaggerGPU.jl).
15
15
16
16
17
17
## Installation
@@ -24,10 +24,17 @@ julia> ] add Dagger
24
24
25
25
## Usage
26
26
27
-
Once installed, the `Dagger` package can by used by typing
27
+
Once installed, the `Dagger` package can by used like so
28
28
29
29
```julia
30
+
using Distributed; addprocs() # get us some workers
Copy file name to clipboardExpand all lines: src/chunks.jl
+18-3
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ the result of evaluating a Thunk.
16
16
function domain end
17
17
18
18
"""
19
+
UnitDomain
20
+
19
21
Default domain -- has no information about the value
20
22
"""
21
23
struct UnitDomain end
@@ -29,9 +31,22 @@ domain(x::Any) = UnitDomain()
29
31
###### Chunk ######
30
32
31
33
"""
32
-
A reference to a piece of data located on a remote worker. `Chunk`s are typically created with `Dagger.tochunk(data)`, and the data can then be accessed from any worker with `collect(::Chunk)`. `Chunk`s are serialization-safe, and use distributed refcounting (provided by `MemPool.DRef`) to ensure that the data referenced by a `Chunk` won't be GC'd, as long as a reference exists on some worker.
33
-
34
-
Each `Chunk` is associated with a given `Dagger.Processor`, which is (in a sense) the processor that "owns" or contains the data. Calling `collect(::Chunk)` will perform data movement and conversions defined by that processor to safely serialize the data to the calling worker.
34
+
Chunk
35
+
36
+
A reference to a piece of data located on a remote worker. `Chunk`s are
37
+
typically created with `Dagger.tochunk(data)`, and the data can then be
38
+
accessed from any worker with `collect(::Chunk)`. `Chunk`s are
39
+
serialization-safe, and use distributed refcounting (provided by
40
+
`MemPool.DRef`) to ensure that the data referenced by a `Chunk` won't be GC'd,
41
+
as long as a reference exists on some worker.
42
+
43
+
Each `Chunk` is associated with a given `Dagger.Processor`, which is (in a
44
+
sense) the processor that "owns" or contains the data. Calling
45
+
`collect(::Chunk)` will perform data movement and conversions defined by that
46
+
processor to safely serialize the data to the calling worker.
0 commit comments