ggml-hexagon: add Q4_1 support#60
Conversation
Co-authored-by: max-krasnyansky <1380796+max-krasnyansky@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Co-authored-by: max-krasnyansky <1380796+max-krasnyansky@users.noreply.github.com>
Co-authored-by: max-krasnyansky <1380796+max-krasnyansky@users.noreply.github.com>
Co-authored-by: max-krasnyansky <1380796+max-krasnyansky@users.noreply.github.com>
This PR adds support for
Q4_1data type forMUL_MAToperations in the Hexagon backend.Changes:
HTP_TYPE_Q4_1andHTP_TYPE_Q8_1mappings and theirx4x2constants.get_alloc_size) to accommodate theQK_Q4_1x4x2(160 bytes) andQK_Q8_1x4x2block dimensions.repack_q4_1_q4x4x2andrepack_q8_1_q8x4x2pack/unpack functions toggml-hexagon.cpp, modifying the buffer assignment operations (set_tensorandget_tensor) accordingly.quantize_row_f32_q8_1x4x2forFP32activations inmatmul-ops.c, taking into account offset calculations.vec_dot_q4_1x4x2_q8_1x4x2_1x1,2x1, and2x2, utilizing the newly created minimum layout offsets format.ggml_hexagon_supported_mul_matandggml_hexagon_supported_mul_mat_id.HTP_TYPE_Q4_1, handling its corresponding minimum offset logic directly within the dequantization passhmx-matmul-ops.c.PR created automatically by Jules for task 12614708629588356175 started by @max-krasnyansky