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

Function ggml_compute_forward_repeat

external/ggml/src/ggml-cpu/ops.cpp:1786–1815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1784 for (int k1 = 0; k1 < ne01; k1++) {
1785 for (int i0 = 0; i0 < nr0; i0++) {
1786 ggml_fp16_t * y = (ggml_fp16_t *) ((char *) dst->data + (i3*ne03 + k3)*nb3 + (i2*ne02 + k2)*nb2 + (i1*ne01 + k1)*nb1 + (i0*ne00)*nb0);
1787 ggml_fp16_t * x = (ggml_fp16_t *) ((char *) src0->data + ( k3)*nb03 + ( k2)*nb02 + ( k1)*nb01);
1788 // ggml_vec_cpy_f16(ne00, y, x)
1789 for (int i = 0; i < ne00; ++i) {
1790 y[i] = x[i];
1791 }
1792 }
1793 }
1794 }
1795 }
1796 }
1797 }
1798 }
1799}
1800
1801void ggml_compute_forward_repeat(
1802 const ggml_compute_params * params,
1803 ggml_tensor * dst) {
1804
1805 const ggml_tensor * src0 = dst->src[0];
1806
1807 switch (src0->type) {
1808 case GGML_TYPE_F16:
1809 case GGML_TYPE_BF16:
1810 case GGML_TYPE_I16:
1811 {
1812 ggml_compute_forward_repeat_f16(params, dst);
1813 } break;
1814 case GGML_TYPE_F32:
1815 case GGML_TYPE_I32:
1816 {
1817 ggml_compute_forward_repeat_f32(params, dst);
1818 } break;

Callers 2

ggml_compute_forwardFunction · 0.85
compute_forwardMethod · 0.85

Tested by

no test coverage detected