gpuLoad (Function)
Signature: gpuLoad(path: string, offset: int, count: int) -> Result<GpuBuffer<float>, Error>
Description: Reads count little-endian IEEE-754 binary32 values starting at a byte offset of a file into a GpuBuffer
Parameters
- path (string): The file to read
- offset (int): The byte offset the first value starts at
- count (int): How many values to read
Returns: Result<GpuBuffer
Example
gpuLoad("gpt2_124M.bin", 1024, 768) ?: toGpu([0.0])
gpuLoad ("gpt2_124M.bin", 1024, 768) ?: toGpu [0.0]