std1.0.0-beta-7 SafeC docs

std :: ml::device

Macro DEV_TAG_SHIFT

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

#define DEV_TAG_SHIFT (sizeof(unsigned long) * 8UL - 2UL)

16-bit storage: on a backend that takes it (storage16), activations of a 16-bit precision live on the device in fp16 / bf16. A buffer's element type rides in the top two bits of its handle (DEV_TAG_*); every kernel, copy, GEMM and convolution reads it from there.