Class ComputeGraph

java.lang.Object
io.github.kirstenali.deepj.tensor.ComputeGraph

public final class ComputeGraph extends Object
Collects GPU operations lazily and flushes them as a single command buffer.

Operations are recorded as a flat int[] command stream. Buffer IDs reference persistent GPU-side buffers managed by a GpuRuntime. Data stays GPU-resident between ops -- only uploaded at graph entry and downloaded on materialization.

This class is backend-agnostic: Metal, CUDA, Vulkan, etc. are all supported by supplying the appropriate GpuRuntime implementation.