Docs / nablatensor-core / com.nablatensor.engine
abstract class
GpuAadExecutable
The half of an engine that every accelerator replay shares: the channel layout of the per-work-group partial buffer, the reduction of those partials into a value and a gradient, and the dispatch-length budget.
Each work-group writes channels doubles (floats on Vulkan): the summed output value for the scenarios it covered, followed by the summed adjoint of each differentiable input. The host adds those up and divides by the scenario count. That layout is the same whether the dispatch came from CUDA, HIP, OpenCL or a SPIR-V pipeline, so it lives here rather than in each of them.
DeviceAadExecutable covers the three "linear buffer + kernel arguments" runtimes on top of a DeviceRuntime; the Vulkan engine extends this directly, because descriptor sets and push constants do not fit that surface. The host counterpart is HostAadExecutable.
Public only so the engine modules can extend it; not part of the supported API.
Constructors
Fields
Partial-buffer stride: the value, plus one adjoint per input when asked for.
Methods
Running sums across however many dispatches one replay took: [0] is the output value and [1 + j] the adjoint of input j, matching the partial-buffer channel order.
Adds the groups partial records at the front of partials.
Single-precision partial buffer, as the Vulkan pipeline writes it.
The summed channels divided by the scenario count. The device kernels do not carry a sum of squares, so the standard error is left unestimated.
Per-dispatch wall-clock budget, honouring -Dnablatensor.maxLaunchSeconds. A GPU is the one backend where an overlong dispatch is actively dangerous: when the device also drives a display, the driver's watchdog recovers by resetting it, so each engine passes a fallback an order of magnitude below its own watchdog.