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

Function ggml_map_custom3_impl

external/ggml/src/ggml.c:6103–6129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6101 result->src[2] = v;
6102 result->src[3] = q_scale;
6103 result->src[4] = k_scale;
6104
6105 return result;
6106}
6107
6108struct ggml_tensor * ggml_convrot_linear(
6109 struct ggml_context * ctx,
6110 struct ggml_tensor * weight_i8,
6111 struct ggml_tensor * input,
6112 struct ggml_tensor * weight_scale,
6113 struct ggml_tensor * bias,
6114 int group_size) {
6115 GGML_ASSERT(weight_i8->type == GGML_TYPE_I8);
6116 GGML_ASSERT(input->type == GGML_TYPE_F32);
6117 GGML_ASSERT(weight_scale->type == GGML_TYPE_F32);
6118 GGML_ASSERT(bias == NULL || bias->type == GGML_TYPE_F32);
6119 GGML_ASSERT(ggml_is_contiguous(weight_i8));
6120 GGML_ASSERT(ggml_is_contiguous(input));
6121 GGML_ASSERT(ggml_is_contiguous(weight_scale));
6122 GGML_ASSERT(bias == NULL || ggml_is_contiguous(bias));
6123 GGML_ASSERT(group_size > 0);
6124
6125 const int64_t in_features = weight_i8->ne[0];
6126 const int64_t out_features = weight_i8->ne[1];
6127 GGML_ASSERT(input->ne[0] == in_features);
6128 GGML_ASSERT(in_features % group_size == 0);
6129 GGML_ASSERT(ggml_nelements(weight_scale) == out_features);
6130 GGML_ASSERT(bias == NULL || bias->ne[0] == out_features);
6131
6132 int64_t ne[4] = { out_features, input->ne[1], input->ne[2], input->ne[3] };

Callers 2

ggml_map_custom3Function · 0.85
ggml_map_custom3_inplaceFunction · 0.85

Calls 3

ggml_view_tensorFunction · 0.85
ggml_dup_tensorFunction · 0.85
ggml_set_op_paramsFunction · 0.85

Tested by

no test coverage detected