std1.0.0-beta-7 SafeC docs

std :: ml::gpu_rocm

Struct std::RocmHalfBuf

#include <std/ml/gpu_rocm.h> source

struct RocmHalfBuf {
    unsigned long dev;
    unsigned long len;
    int dtype;
}

A buffer of 'len' fp16 or bf16 values ('dtype') in GPU memory; dev == 0 for an invalid (failed or freed) buffer.

Fields

§unsigned long devsource
§unsigned long lensource
§int dtypesource

Methods

§void free()source · definition
§static struct RocmHalfBuf alloc(unsigned long n, int dtype)source · definition

uninitialized

§static struct RocmHalfBuf upload([]const float host, int dtype)source · definition