diff --git a/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp b/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp index 5f143e254..a2b549254 100644 --- a/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp +++ b/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp @@ -6074,9 +6074,9 @@ template src[0]; + void forward_get_rows(const ggml_compute_params * params, + ggml_tensor * dst) { + const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_Q4_0: { @@ -6089,10 +6089,10 @@ template src[0]; - const ggml_tensor *src1 = dst->src[1]; + const ggml_compute_params * params, + ggml_tensor * dst) { + const ggml_tensor * src0 = dst->src[0]; + const ggml_tensor * src1 = dst->src[1]; GGML_TENSOR_BINARY_OP_LOCALS @@ -6132,10 +6132,10 @@ template data + i11 * nb02 + i12 * nb03; + const char * base_ptr_for_higher_dims_in_src0 = (const char *)src0->data + i11 * nb02 + i12 * nb03; // Pointer to the first block_q4_0x8 of the identified row_group_idx - const block_q4_0x8 *p_first_repacked_block_of_group_x8 = (const block_q4_0x8 *)(base_ptr_for_higher_dims_in_src0 + row_group_idx * stride_between_actual_row_groups); + const block_q4_0x8 * p_first_repacked_block_of_group_x8 = (const block_q4_0x8 *)(base_ptr_for_higher_dims_in_src0 + row_group_idx * stride_between_actual_row_groups); dequantize_row_q4_0x8( p_first_repacked_block_of_group_x8, @@ -6152,8 +6152,8 @@ template d[row_idx_in_group]); - float *y_curr = y + i * QK4_0; + float * y_curr = y + i * QK4_0; - const int8_t *qs_first_half_repacked_ptr = &(current_column_repacked_block->qs[row_idx_in_group * bytes_for_half_elements]); + const int8_t * qs_first_half_repacked_ptr = &(current_column_repacked_block->qs[row_idx_in_group * bytes_for_half_elements]); uint64_t first_half_chunk_u64; memcpy(&first_half_chunk_u64, qs_first_half_repacked_ptr, sizeof(uint64_t)); first_half_chunk_u64 ^= xor_mask; // Reverse the XOR - const uint8_t *original_qs_first_half_bytes = (const uint8_t *)&first_half_chunk_u64; + const uint8_t * original_qs_first_half_bytes = (const uint8_t *)&first_half_chunk_u64; - const int8_t *qs_second_half_repacked_ptr = &(current_column_repacked_block->qs[offset_to_second_half_data + (row_idx_in_group * bytes_for_half_elements)]); + const int8_t * qs_second_half_repacked_ptr = &(current_column_repacked_block->qs[offset_to_second_half_data + (row_idx_in_group * bytes_for_half_elements)]); uint64_t second_half_chunk_u64; memcpy(&second_half_chunk_u64, qs_second_half_repacked_ptr, sizeof(uint64_t)); second_half_chunk_u64 ^= xor_mask; // Reverse the XOR - const uint8_t *original_qs_second_half_bytes = (const uint8_t *)&second_half_chunk_u64; + const uint8_t * original_qs_second_half_bytes = (const uint8_t *)&second_half_chunk_u64; // dequantizing all QK4_0's for this block. for (int j = 0; j < bytes_for_half_elements; ++j) { @@ -6530,10 +6530,10 @@ class extra_buffer_type : ggml::cpu::extra_buffer_type { //if (op->src[1]->type == GGML_TYPE_Q8_0) { // return true; //} - } else if (op->op == GGML_OP_GET_ROWS - && op->src[0]->buffer - && (ggml_n_dims(op->src[0]) == 2) - && op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type() + } else if (op->op == GGML_OP_GET_ROWS + && op->src[0]->buffer + && (ggml_n_dims(op->src[0]) == 2) + && op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type() && ggml_aarch64_get_optimal_repack_type(op->src[0])) { if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) { return false; diff --git a/src/whisper.cpp b/src/whisper.cpp index 3ac77dc70..30bfa1078 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -1450,7 +1450,7 @@ static bool weight_buft_supported(const whisper_hparams & hparams, ggml_tensor * ggml_context * ctx = ctx_ptr.get(); ggml_tensor * op_tensor = nullptr; - + int64_t n_ctx = hparams.n_audio_ctx; switch (op) {