1#ifndef CK_PACKED_Q8_DOT_ORDERED_H
2#define CK_PACKED_Q8_DOT_ORDERED_H
10 for (
size_t i = 0; i < width; i +=
QK8_0, weight +=
sizeof(
block_q8_0)) {
12 for (
size_t j = 0; j <
QK8_0; ++j) {
13 const int code = weight[j + 2];
14 const float value = scale * (float)(code < 128 ? code : code - 256);
15 sum += (double)input[i + j] * (
double)value;
Quantization block structures for weight-only quantization.
static float ck_fp16_to_fp32_soft(ck_half h)
Convert FP16 (ck_half) to FP32 — software implementation.
static float ck_packed_q8_dot_ordered(const float *input, const unsigned char *weight, size_t width)