You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, please advise. I want to replace the matrix calculation in the ggml_compute_forward_mul_mat whisper.cpp part with the https://github.com/marty1885/llama.cpp/blob/rknpu2-backend/ggml-rknpu2.c matrix multiplication, I modified pack->ordered_data to src0->data, Finally I found out that the reasoning was wrong, and I tried to use void matmul(const float* A, const float* B, float* C, int M, int K, int N) {
for (int i = 0; I < M; ++i) {
for (int j = 0; j < N; ++j) {
C[i * N + j] = 0;
for (int k = 0; k < K; ++k) {
C[i * N + j] += A[i * K + k] * B[k * N + j];
}
}
}
Replace the calculation part of the CPU in the ggml_compute_forward_mul_mat, and the inference result is also incorrect. How can I directly do inference calculations in a matmul-like way, thanks
The text was updated successfully, but these errors were encountered:
Hello, please advise. I want to replace the matrix calculation in the ggml_compute_forward_mul_mat whisper.cpp part with the https://github.com/marty1885/llama.cpp/blob/rknpu2-backend/ggml-rknpu2.c matrix multiplication, I modified pack->ordered_data to src0->data, Finally I found out that the reasoning was wrong, and I tried to use void matmul(const float* A, const float* B, float* C, int M, int K, int N) {
for (int i = 0; I < M; ++i) {
for (int j = 0; j < N; ++j) {
C[i * N + j] = 0;
for (int k = 0; k < K; ++k) {
C[i * N + j] += A[i * K + k] * B[k * N + j];
}
}
}
Replace the calculation part of the CPU in the ggml_compute_forward_mul_mat, and the inference result is also incorrect. How can I directly do inference calculations in a matmul-like way, thanks
The text was updated successfully, but these errors were encountered: