Skip to main content

Module context

Module context 

Source
Expand description

AD context for guard-based shape resolution.

During AD graph construction, linalg rules such as SVD, QR, and LU need concrete matrix dimensions to choose between structurally different subgraphs. ShapeGuardContext records those dimension comparisons as guards so cached AD graphs can later be invalidated when the observed shape relationship changes.

Structsยง

ShapeGuard
A recorded dimension comparison made during AD graph construction.
ShapeGuardContext
AD context providing dimension resolution and guard recording.