MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / ggml_quantize_init

Function ggml_quantize_init

external/ggml/src/ggml.c:7792–7808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7790 const int32_t * axes = (const int32_t *) tensor->op_params;
7791 const int axis0 = axes[0] & 0x3;
7792 const int axis1 = axes[1] & 0x3;
7793 const int axis2 = axes[2] & 0x3;
7794 const int axis3 = axes[3] & 0x3;
7795 int axb[4] = {0,0,0,0}; // axes backward
7796 axb[axis0] = 0;
7797 axb[axis1] = 1;
7798 axb[axis2] = 2;
7799 axb[axis3] = 3;
7800 ggml_add_or_set(ctx, cgraph, isrc0, ggml_permute(ctx, grad, axb[0], axb[1], axb[2], axb[3]));
7801 }
7802 } break;
7803 case GGML_OP_TRANSPOSE: {
7804 if (src0_needs_grads) {
7805 ggml_add_or_set(ctx, cgraph, isrc0, ggml_transpose(ctx, grad));
7806 }
7807 } break;
7808 case GGML_OP_GET_ROWS: {
7809 if (src0_needs_grads) {
7810 ggml_add_or_set(ctx, cgraph, isrc0, ggml_get_rows_back(ctx, grad, src1, src0));
7811 }

Callers 3

ggml_quantize_chunkFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 4

iq2xs_init_implFunction · 0.85
iq3xs_init_implFunction · 0.85

Tested by 2

mainFunction · 0.68
mainFunction · 0.68