Skip to content

GPU workers diagrams ​

GPU workers

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 ​

100%
Mermaid source
flowchart TD
    n0["compute"]
    n1["Startup"]
    n1 -->|"calculate(left, right) → list of float"| n0

Package boundaries ​

compute package calls
100%
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
100%
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.

FromToOperationsRead
compute@greenpandastudios/aug-gpu4Inputs, results and call sites
Startupcompute1Inputs, results and call sites
Startup@greenpandastudios/aug-gpu1Inputs, results and call sites

Data crossing these boundaries (6 contracts) ​

compute → @greenpandastudios/aug-gpu ​

4 operations, 5 sites

add

Inputs: left: Buffer, right: Buffer. Result: own Buffer.

Caller or entryEvidence
calculateCall site · Caller explanation

download

Inputs: buffer: Buffer. Result: List<float>.

Caller or entryEvidence
calculateCall site · Caller explanation

openDevice

No caller-supplied inputs. Result: own Device.

Caller or entryEvidence
calculateCall site · Caller explanation

upload

Inputs: device: Device, values: List<float>. Result: own Buffer.

Caller or entryEvidence
calculateCall site · Caller explanation
calculateCall site · Caller explanation

Startup → compute ​

1 operation, 2 sites

calculate

Inputs: left: List<float>, right: List<float>. Result: List<float>.

Caller or entryEvidence
StartupCall site · Caller explanation
StartupCall site · Caller explanation

Startup → @greenpandastudios/aug-gpu ​

1 operation, 1 site

GpuError.explain

No caller-supplied inputs. Result: string.

Caller or entryEvidence
StartupCall site · Caller explanation

Open a module ​

ModuleRead
compute.augFlow and sequences · Explanation
main.augFlow 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.

Last updated:

The world runs on language