GPU workers diagrams
Start with how the application begins, then follow data between its folders. Open an operation to see its decisions, calls, failures and cleanup. Its explanation supplies the exact contract and linked dependencies.
This view includes 2 application source files. Package and interface boundaries show checked contracts; their runtime implementations are not expanded. The views describe the checked program, not desired requirements or a recorded execution.
Where execution begins
Startup
Within a task and ownership scope, it sets first to a worker task running calculate with left from a list containing 1.0, 2.0, 3.0 and right from a list containing 4.0, 5.0, 6.0 with copies of its inputs on a separate heap. It sets second to a worker task running calculate with left from a list containing 10.0, 20.0 and right from a list containing 1.0, 2.0 with copies of its inputs on a separate heap. It reads the result of waiting for first and second in input order; propagate failures once and binds [0] as firstResult and [1] as secondResult. source
For each value in a snapshot of firstResult, it prints value. After the loop, for each value in a snapshot of secondResult, it prints value. On leaving this scope, join its child tasks and release its local values. If this work raises GpuError as error, it prints error.explain; then it calls exit with status 1. source
If this work raises ConcurrencyError, it prints "Worker capacity is exhausted". source
Data flow
Mermaid source
flowchart TD
n0["compute"]
n1["Startup"]
n1 -->|"calculate(left, right) → list of float"| n0
Package boundaries
compute package calls
Mermaid source
flowchart LR
n0["compute"]
n1["@greenpandastudios/aug-gpu"]
n0 -->|"add(left, right) / download(buffer) + 2 more → list of float / own Buffer + 1 more"| n1
Startup package calls
Mermaid source
flowchart LR
n0["Startup"]
n1["@greenpandastudios/aug-gpu"]
n0 -->|"GpuError.explain → string"| n1
Follow the data
Each row opens the complete operations and call sites behind one pair of logical units. A grouped arrow records calls between those units; connected arrows need not belong to the same execution path.
| From | To | Operations | Read |
|---|---|---|---|
| compute | @greenpandastudios/aug-gpu | 4 | Inputs, results and call sites |
| Startup | compute | 1 | Inputs, results and call sites |
| Startup | @greenpandastudios/aug-gpu | 1 | Inputs, results and call sites |
Data crossing these boundaries (6 contracts)
compute → @greenpandastudios/aug-gpu
4 operations, 5 sites
Inputs: left: Buffer, right: Buffer. Result: own Buffer.
| Caller or entry | Evidence |
|---|---|
| calculate | Call site · Caller explanation |
Inputs: buffer: Buffer. Result: List<float>.
| Caller or entry | Evidence |
|---|---|
| calculate | Call site · Caller explanation |
No caller-supplied inputs. Result: own Device.
| Caller or entry | Evidence |
|---|---|
| calculate | Call site · Caller explanation |
Inputs: device: Device, values: List<float>. Result: own Buffer.
| Caller or entry | Evidence |
|---|---|
| calculate | Call site · Caller explanation |
| calculate | Call site · Caller explanation |
Startup → compute
1 operation, 2 sites
Inputs: left: List<float>, right: List<float>. Result: List<float>.
| Caller or entry | Evidence |
|---|---|
| Startup | Call site · Caller explanation |
| Startup | Call site · Caller explanation |
Startup → @greenpandastudios/aug-gpu
1 operation, 1 site
No caller-supplied inputs. Result: string.
| Caller or entry | Evidence |
|---|---|
| Startup | Call site · Caller explanation |
Open a module
| Module | Read |
|---|---|
| compute.aug | Flow and sequences · Explanation |
| main.aug | Flow and sequences · Explanation |
These are static call boundaries, not a request trace. Interface implementations and foreign internals stop at their checked contracts. Dotted arrows defer a callback or browser action. Imports alone do not imply a call.