tensors.aug diagrams
Project overview · Compiled explanation
Sequences
Call arrows identify checked targets; loop and branch frames determine when they run. Open that target’s module to follow its implementation. Branches describe alternatives; loops describe repeated work. Native calls and interface dispatch stop at their declared contracts. Exit notes end that path; enclosing recovery and cleanup remain visible.
calculate
Add two CPU tensors using LibTorch and return the sum of their elements.
Failures can raise TensorError.
100%
Mermaid source
sequenceDiagram
participant p0 as calculate
participant p1 as aug-pytorch/api
p0->>p1: tensor(values=[1.0, 2.0, 3.0])
p1-->>p0: left: Tensor
Note over p0: Own left; release on scope exits
p0->>p1: tensor(values=[4.0, 5.0, 6.0])
p1-->>p0: right: Tensor
Note over p0: Own right; release on scope exits
p0->>p1: add(left=left, right=right)
p1-->>p0: result: Tensor
Note over p0: Own result; release on scope exits
p0->>p1: sum(tensor=result)
p1-->>p0: sum result: float
Note over p0: Return sum(tensor=result); required cleanup runs before<br/>exit
Note over p0: May leave with checked errors: TensorError