1 #ifndef CKERNEL_DTYPE_H
2 #define CKERNEL_DTYPE_H
53 #define CK_DT_MASK(dt) (1u << (uint32_t)(dt))
142 size_t n_blocks = (n_elements + block_size - 1) / block_size;
static int ck_dtype_supported(CKDataTypeMask mask, CKDataType dt)
static size_t ck_dtype_block_size(CKDataType dt)
Get the number of elements per quantization block.
static size_t ck_dtype_block_bytes(CKDataType dt)
Get bytes per block for quantized types.
CKDataType
Supported data types in C-Kernel-Engine.
static int ck_dtype_is_quantized(CKDataType dt)
Check if a data type is block-quantized (GGML-style)
static size_t ck_dtype_bytes(CKDataType dt)
Get bytes per element for non-quantized types.
static size_t ck_dtype_row_bytes(CKDataType dt, size_t n_elements)
Calculate total bytes for n_elements of given dtype.
int32_t int32_t int32_t int32_t int32_t mask