Skip to content

Commit 994e02a

Browse files
swetha097mcw
authored andcommitted
Resolve PR comments
1 parent d6cc466 commit 994e02a

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6074,9 +6074,9 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
60746074
return false;
60756075
}
60766076

6077-
void forward_get_rows(const ggml_compute_params *params,
6078-
ggml_tensor *dst) {
6079-
const ggml_tensor *src0 = dst->src[0];
6077+
void forward_get_rows(const ggml_compute_params * params,
6078+
ggml_tensor * dst) {
6079+
const ggml_tensor * src0 = dst->src[0];
60806080

60816081
switch (src0->type) {
60826082
case GGML_TYPE_Q4_0: {
@@ -6089,10 +6089,10 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
60896089
}
60906090

60916091
static void ggml_compute_forward_get_rows_q4_0x8(
6092-
const ggml_compute_params *params,
6093-
ggml_tensor *dst) {
6094-
const ggml_tensor *src0 = dst->src[0];
6095-
const ggml_tensor *src1 = dst->src[1];
6092+
const ggml_compute_params * params,
6093+
ggml_tensor * dst) {
6094+
const ggml_tensor * src0 = dst->src[0];
6095+
const ggml_tensor * src1 = dst->src[1];
60966096

60976097
GGML_TENSOR_BINARY_OP_LOCALS
60986098

@@ -6132,10 +6132,10 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
61326132
int row_group_idx = i01 / nrows_interleaved;
61336133
const int row_idx_in_group = i01 % nrows_interleaved;
61346134

6135-
const char *base_ptr_for_higher_dims_in_src0 = (const char *)src0->data + i11 * nb02 + i12 * nb03;
6135+
const char * base_ptr_for_higher_dims_in_src0 = (const char *)src0->data + i11 * nb02 + i12 * nb03;
61366136

61376137
// Pointer to the first block_q4_0x8 of the identified row_group_idx
6138-
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);
6138+
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);
61396139

61406140
dequantize_row_q4_0x8(
61416141
p_first_repacked_block_of_group_x8,
@@ -6152,8 +6152,8 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
61526152
* @param row_idx_in_group Index (0-7) of the logical row to dequantize.
61536153
*/
61546154
static void dequantize_row_q4_0x8(
6155-
const block_q4_0x8 *GGML_RESTRICT p_repacked_group_column_blocks,
6156-
float *GGML_RESTRICT y,
6155+
const block_q4_0x8 * GGML_RESTRICT p_repacked_group_column_blocks,
6156+
float * GGML_RESTRICT y,
61576157
int64_t k,
61586158
int row_idx_in_group) {
61596159
const int GGML_Q4_0_X8_INTERLEAVE_SIZE = 8;
@@ -6168,23 +6168,23 @@ template <typename BLOC_TYPE, int64_t INTER_SIZE, int64_t NB_COLS, ggml_type PAR
61686168
const int qk4_0_half_elements = QK4_0 / 2;
61696169

61706170
for (int i = 0; i < nb; ++i) {
6171-
const block_q4_0x8 *current_column_repacked_block = &p_repacked_group_column_blocks[i];
6171+
const block_q4_0x8 * current_column_repacked_block = &p_repacked_group_column_blocks[i];
61726172
const float d_val = GGML_FP16_TO_FP32(current_column_repacked_block->d[row_idx_in_group]);
6173-
float *y_curr = y + i * QK4_0;
6173+
float * y_curr = y + i * QK4_0;
61746174

6175-
const int8_t *qs_first_half_repacked_ptr = &(current_column_repacked_block->qs[row_idx_in_group * bytes_for_half_elements]);
6175+
const int8_t * qs_first_half_repacked_ptr = &(current_column_repacked_block->qs[row_idx_in_group * bytes_for_half_elements]);
61766176

61776177
uint64_t first_half_chunk_u64;
61786178
memcpy(&first_half_chunk_u64, qs_first_half_repacked_ptr, sizeof(uint64_t));
61796179
first_half_chunk_u64 ^= xor_mask; // Reverse the XOR
6180-
const uint8_t *original_qs_first_half_bytes = (const uint8_t *)&first_half_chunk_u64;
6180+
const uint8_t * original_qs_first_half_bytes = (const uint8_t *)&first_half_chunk_u64;
61816181

6182-
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)]);
6182+
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)]);
61836183

61846184
uint64_t second_half_chunk_u64;
61856185
memcpy(&second_half_chunk_u64, qs_second_half_repacked_ptr, sizeof(uint64_t));
61866186
second_half_chunk_u64 ^= xor_mask; // Reverse the XOR
6187-
const uint8_t *original_qs_second_half_bytes = (const uint8_t *)&second_half_chunk_u64;
6187+
const uint8_t * original_qs_second_half_bytes = (const uint8_t *)&second_half_chunk_u64;
61886188

61896189
// dequantizing all QK4_0's for this block.
61906190
for (int j = 0; j < bytes_for_half_elements; ++j) {
@@ -6530,10 +6530,10 @@ class extra_buffer_type : ggml::cpu::extra_buffer_type {
65306530
//if (op->src[1]->type == GGML_TYPE_Q8_0) {
65316531
// return true;
65326532
//}
6533-
} else if (op->op == GGML_OP_GET_ROWS
6534-
&& op->src[0]->buffer
6535-
&& (ggml_n_dims(op->src[0]) == 2)
6536-
&& op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type()
6533+
} else if (op->op == GGML_OP_GET_ROWS
6534+
&& op->src[0]->buffer
6535+
&& (ggml_n_dims(op->src[0]) == 2)
6536+
&& op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type()
65376537
&& ggml_aarch64_get_optimal_repack_type(op->src[0])) {
65386538
if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) {
65396539
return false;

src/whisper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ static bool weight_buft_supported(const whisper_hparams & hparams, ggml_tensor *
14501450
ggml_context * ctx = ctx_ptr.get();
14511451

14521452
ggml_tensor * op_tensor = nullptr;
1453-
1453+
14541454
int64_t n_ctx = hparams.n_audio_ctx;
14551455

14561456
switch (op) {

0 commit comments

Comments
 (0)