Interface GpuRuntime
public interface GpuRuntime
Abstraction over a GPU compute runtime (Metal, CUDA, Vulkan, etc.).
ComputeGraph delegates all native/driver calls through this interface,
keeping the graph logic itself backend-agnostic.
-
Method Summary
Modifier and TypeMethodDescriptionvoidallocBuffers(int[] ids, int[] sizes, int count) Batch-allocate GPU buffers.voiddownloadBuffer(int bufId, float[] out) Download GPU buffer contents into a CPU float array.voidflushOps(int[] cmdStream, int cmdStreamLength) Execute a batch of ops encoded as a flatint[]command stream, all in one command buffer submission.voidreleaseBuffers(int[] ids, int count) Release multiple GPU buffers by id.voiduploadBuffer(int bufId, float[] data) Upload CPU float data into an existing GPU buffer.
-
Method Details
-
allocBuffers
void allocBuffers(int[] ids, int[] sizes, int count) Batch-allocate GPU buffers.ids[i]getssizes[i]floats. -
uploadBuffer
void uploadBuffer(int bufId, float[] data) Upload CPU float data into an existing GPU buffer. -
downloadBuffer
void downloadBuffer(int bufId, float[] out) Download GPU buffer contents into a CPU float array. -
releaseBuffers
void releaseBuffers(int[] ids, int count) Release multiple GPU buffers by id. -
flushOps
void flushOps(int[] cmdStream, int cmdStreamLength) Execute a batch of ops encoded as a flatint[]command stream, all in one command buffer submission.
-