MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_compute_forward_step_f32

Function ggml_compute_forward_step_f32

ggml.c:8718–8740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8716// ggml_compute_forward_step
8717
8718static void ggml_compute_forward_step_f32(
8719 const struct ggml_compute_params * params,
8720 const struct ggml_tensor * src0,
8721 struct ggml_tensor * dst) {
8722 assert(params->ith == 0);
8723 assert(ggml_are_same_shape(src0, dst));
8724
8725 if (params->type == GGML_TASK_INIT || params->type == GGML_TASK_FINALIZE) {
8726 return;
8727 }
8728
8729 const int n = ggml_nrows(src0);
8730 const int nc = src0->ne[0];
8731
8732 assert(dst->nb[0] == sizeof(float));
8733 assert(src0->nb[0] == sizeof(float));
8734
8735 for (int i = 0; i < n; i++) {
8736 ggml_vec_step_f32(nc,
8737 (float *) ((char *) dst->data + i*( dst->nb[1])),
8738 (float *) ((char *) src0->data + i*(src0->nb[1])));
8739 }
8740}
8741
8742static void ggml_compute_forward_step(
8743 const struct ggml_compute_params * params,

Callers 1

Calls 3

ggml_are_same_shapeFunction · 0.70
ggml_nrowsFunction · 0.70
ggml_vec_step_f32Function · 0.70

Tested by

no test coverage detected